Data Source: azurermPublicIpPrefix
Use this data source to access information about an existing Public IP Prefix.
Example Usage (reference an existing)
import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const dataAzurermPublicIpPrefixExample =
new azurerm.dataAzurermPublicIpPrefix.DataAzurermPublicIpPrefix(
this,
"example",
{
name: "name_of_public_ip",
resource_group_name: "name_of_resource_group",
}
);
new cdktf.TerraformOutput(this, "public_ip_prefix", {
value: dataAzurermPublicIpPrefixExample.ipPrefix,
});
Argument Reference
name
- Specifies the name of the public IP prefix.resourceGroupName
- Specifies the name of the resource group.
Attributes Reference
name
- The name of the Public IP prefix resource.resourceGroupName
- The name of the resource group in which to create the public IP.location
- The supported Azure location where the resource exists.sku
- The SKU of the Public IP Prefix.prefixLength
- The number of bits of the prefix.tags
- A mapping of tags to assigned to the resource.zones
- A list of Availability Zones in which this Public IP Prefix is located.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
read
- (Defaults to 5 minutes) Used when retrieving the Public IP Prefix.