import * as pulumi from "@pulumi/pulumi"; /** * Manages a Public IP Address. * * > **Note** If this resource is to be associated with a resource that requires disassociation before destruction (such as `azure.network.NetworkInterface`) it is recommended to set the `lifecycle` argument `createBeforeDestroy = true`. Otherwise, it can fail to disassociate on destruction. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "West Europe", * }); * const examplePublicIp = new azure.network.PublicIp("example", { * name: "acceptanceTestPublicIp1", * resourceGroupName: example.name, * location: example.location, * allocationMethod: "Static", * tags: { * environment: "Production", * }, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Network` - 2025-01-01 * * ## Import * * Public IPs can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:network/publicIp:PublicIp myPublicIp /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/publicIPAddresses/myPublicIpAddress1 * ``` */ export declare class PublicIp extends pulumi.CustomResource { /** * Get an existing PublicIp resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: PublicIpState, opts?: pulumi.CustomResourceOptions): PublicIp; /** * Returns true if the given object is an instance of PublicIp. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is PublicIp; /** * Defines the allocation method for this IP address. Possible values are `Static` or `Dynamic`. * * > **Note** `Dynamic` Public IP Addresses aren't allocated until they're assigned to a resource (such as a Virtual Machine or a Load Balancer) by design within Azure. See `ipAddress` argument. * * !> **Note:** `Dynamic` allocation is only available with `Basic` SKU public IP addresses. Since `Basic` SKU public IP addresses have been deprecated (see `sku` below), `Dynamic` allocation is no longer available for new public IP addresses. */ readonly allocationMethod: pulumi.Output; /** * The DDoS protection mode of the public IP. Possible values are `Disabled`, `Enabled`, and `VirtualNetworkInherited`. Defaults to `VirtualNetworkInherited`. */ readonly ddosProtectionMode: pulumi.Output; /** * The ID of DDoS protection plan associated with the public IP. * * > **Note:** `ddosProtectionPlanId` can only be set when `ddosProtectionMode` is `Enabled`. */ readonly ddosProtectionPlanId: pulumi.Output; /** * Label for the Domain Name. Will be used to make up the FQDN. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. */ readonly domainNameLabel: pulumi.Output; /** * Scope for the domain name label. If a domain name label scope is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system with a hashed value includes in FQDN. Possible values are `NoReuse`, `ResourceGroupReuse`, `SubscriptionReuse` and `TenantReuse`. */ readonly domainNameLabelScope: pulumi.Output; /** * Specifies the Edge Zone within the Azure Region where this Public IP should exist. Changing this forces a new Public IP to be created. */ readonly edgeZone: pulumi.Output; /** * Fully qualified domain name of the A DNS record associated with the public IP. `domainNameLabel` must be specified to get the `fqdn`. This is the concatenation of the `domainNameLabel` and the regionalized DNS zone */ readonly fqdn: pulumi.Output; /** * Specifies the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. */ readonly idleTimeoutInMinutes: pulumi.Output; /** * The IP address value that was allocated. */ readonly ipAddress: pulumi.Output; /** * A mapping of IP tags to assign to the public IP. Changing this forces a new resource to be created. * * > **Note** IP Tag `RoutingPreference` requires multiple `zones` and `Standard` SKU to be set. */ readonly ipTags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The IP Version to use, IPv6 or IPv4. Changing this forces a new resource to be created. Defaults to `IPv4`. * * > **Note** Only `Static` IP address allocation is supported for IPv6. */ readonly ipVersion: pulumi.Output; /** * Specifies the supported Azure location where the Public IP should exist. Changing this forces a new resource to be created. */ readonly location: pulumi.Output; /** * Specifies the name of the Public IP. Changing this forces a new Public IP to be created. */ readonly name: pulumi.Output; /** * If specified then public IP address allocated will be provided from the public IP prefix resource. Changing this forces a new resource to be created. */ readonly publicIpPrefixId: pulumi.Output; /** * The name of the Resource Group where this Public IP should exist. Changing this forces a new Public IP to be created. */ readonly resourceGroupName: pulumi.Output; /** * A fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. */ readonly reverseFqdn: pulumi.Output; /** * The SKU of the Public IP. Possible values are `Basic`, `Standard`, and `StandardV2`. Defaults to `Standard`. Changing this forces a new resource to be created. * * > **Note** Public IP `Standard` and `StandardV2` SKUs require `allocationMethod` to be set to `Static`. * * !> **Note:** `sku` can no longer be set to `Basic` as of 31 March 2025 for new resources. This also affects `allocationMethod` set to `Dynamic`, as it is only available with the `Basic` SKU. Please see the Azure Update [retirement notification](https://azure.microsoft.com/updates/upgrade-to-standard-sku-public-ip-addresses-in-azure-by-30-september-2025-basic-sku-will-be-retired/) for more information. */ readonly sku: pulumi.Output; /** * The SKU Tier that should be used for the Public IP. Possible values are `Regional` and `Global`. Defaults to `Regional`. Changing this forces a new resource to be created. * * > **Note** When `skuTier` is set to `Global`, `sku` must be set to `Standard`. */ readonly skuTier: pulumi.Output; /** * A mapping of tags to assign to the resource. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * A collection containing the availability zone to allocate the Public IP in. Changing this forces a new resource to be created. * * > **Note:** Availability Zones are only supported with a [Standard SKU](https://docs.microsoft.com/azure/virtual-network/virtual-network-ip-addresses-overview-arm#standard) and [in select regions](https://docs.microsoft.com/azure/availability-zones/az-overview) at this time. Standard SKU Public IP Addresses that do not specify a zone are **not** zone-redundant by default. */ readonly zones: pulumi.Output; /** * Create a PublicIp resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: PublicIpArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering PublicIp resources. */ export interface PublicIpState { /** * Defines the allocation method for this IP address. Possible values are `Static` or `Dynamic`. * * > **Note** `Dynamic` Public IP Addresses aren't allocated until they're assigned to a resource (such as a Virtual Machine or a Load Balancer) by design within Azure. See `ipAddress` argument. * * !> **Note:** `Dynamic` allocation is only available with `Basic` SKU public IP addresses. Since `Basic` SKU public IP addresses have been deprecated (see `sku` below), `Dynamic` allocation is no longer available for new public IP addresses. */ allocationMethod?: pulumi.Input; /** * The DDoS protection mode of the public IP. Possible values are `Disabled`, `Enabled`, and `VirtualNetworkInherited`. Defaults to `VirtualNetworkInherited`. */ ddosProtectionMode?: pulumi.Input; /** * The ID of DDoS protection plan associated with the public IP. * * > **Note:** `ddosProtectionPlanId` can only be set when `ddosProtectionMode` is `Enabled`. */ ddosProtectionPlanId?: pulumi.Input; /** * Label for the Domain Name. Will be used to make up the FQDN. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. */ domainNameLabel?: pulumi.Input; /** * Scope for the domain name label. If a domain name label scope is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system with a hashed value includes in FQDN. Possible values are `NoReuse`, `ResourceGroupReuse`, `SubscriptionReuse` and `TenantReuse`. */ domainNameLabelScope?: pulumi.Input; /** * Specifies the Edge Zone within the Azure Region where this Public IP should exist. Changing this forces a new Public IP to be created. */ edgeZone?: pulumi.Input; /** * Fully qualified domain name of the A DNS record associated with the public IP. `domainNameLabel` must be specified to get the `fqdn`. This is the concatenation of the `domainNameLabel` and the regionalized DNS zone */ fqdn?: pulumi.Input; /** * Specifies the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. */ idleTimeoutInMinutes?: pulumi.Input; /** * The IP address value that was allocated. */ ipAddress?: pulumi.Input; /** * A mapping of IP tags to assign to the public IP. Changing this forces a new resource to be created. * * > **Note** IP Tag `RoutingPreference` requires multiple `zones` and `Standard` SKU to be set. */ ipTags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The IP Version to use, IPv6 or IPv4. Changing this forces a new resource to be created. Defaults to `IPv4`. * * > **Note** Only `Static` IP address allocation is supported for IPv6. */ ipVersion?: pulumi.Input; /** * Specifies the supported Azure location where the Public IP should exist. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * Specifies the name of the Public IP. Changing this forces a new Public IP to be created. */ name?: pulumi.Input; /** * If specified then public IP address allocated will be provided from the public IP prefix resource. Changing this forces a new resource to be created. */ publicIpPrefixId?: pulumi.Input; /** * The name of the Resource Group where this Public IP should exist. Changing this forces a new Public IP to be created. */ resourceGroupName?: pulumi.Input; /** * A fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. */ reverseFqdn?: pulumi.Input; /** * The SKU of the Public IP. Possible values are `Basic`, `Standard`, and `StandardV2`. Defaults to `Standard`. Changing this forces a new resource to be created. * * > **Note** Public IP `Standard` and `StandardV2` SKUs require `allocationMethod` to be set to `Static`. * * !> **Note:** `sku` can no longer be set to `Basic` as of 31 March 2025 for new resources. This also affects `allocationMethod` set to `Dynamic`, as it is only available with the `Basic` SKU. Please see the Azure Update [retirement notification](https://azure.microsoft.com/updates/upgrade-to-standard-sku-public-ip-addresses-in-azure-by-30-september-2025-basic-sku-will-be-retired/) for more information. */ sku?: pulumi.Input; /** * The SKU Tier that should be used for the Public IP. Possible values are `Regional` and `Global`. Defaults to `Regional`. Changing this forces a new resource to be created. * * > **Note** When `skuTier` is set to `Global`, `sku` must be set to `Standard`. */ skuTier?: pulumi.Input; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * A collection containing the availability zone to allocate the Public IP in. Changing this forces a new resource to be created. * * > **Note:** Availability Zones are only supported with a [Standard SKU](https://docs.microsoft.com/azure/virtual-network/virtual-network-ip-addresses-overview-arm#standard) and [in select regions](https://docs.microsoft.com/azure/availability-zones/az-overview) at this time. Standard SKU Public IP Addresses that do not specify a zone are **not** zone-redundant by default. */ zones?: pulumi.Input[]>; } /** * The set of arguments for constructing a PublicIp resource. */ export interface PublicIpArgs { /** * Defines the allocation method for this IP address. Possible values are `Static` or `Dynamic`. * * > **Note** `Dynamic` Public IP Addresses aren't allocated until they're assigned to a resource (such as a Virtual Machine or a Load Balancer) by design within Azure. See `ipAddress` argument. * * !> **Note:** `Dynamic` allocation is only available with `Basic` SKU public IP addresses. Since `Basic` SKU public IP addresses have been deprecated (see `sku` below), `Dynamic` allocation is no longer available for new public IP addresses. */ allocationMethod: pulumi.Input; /** * The DDoS protection mode of the public IP. Possible values are `Disabled`, `Enabled`, and `VirtualNetworkInherited`. Defaults to `VirtualNetworkInherited`. */ ddosProtectionMode?: pulumi.Input; /** * The ID of DDoS protection plan associated with the public IP. * * > **Note:** `ddosProtectionPlanId` can only be set when `ddosProtectionMode` is `Enabled`. */ ddosProtectionPlanId?: pulumi.Input; /** * Label for the Domain Name. Will be used to make up the FQDN. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. */ domainNameLabel?: pulumi.Input; /** * Scope for the domain name label. If a domain name label scope is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system with a hashed value includes in FQDN. Possible values are `NoReuse`, `ResourceGroupReuse`, `SubscriptionReuse` and `TenantReuse`. */ domainNameLabelScope?: pulumi.Input; /** * Specifies the Edge Zone within the Azure Region where this Public IP should exist. Changing this forces a new Public IP to be created. */ edgeZone?: pulumi.Input; /** * Specifies the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. */ idleTimeoutInMinutes?: pulumi.Input; /** * A mapping of IP tags to assign to the public IP. Changing this forces a new resource to be created. * * > **Note** IP Tag `RoutingPreference` requires multiple `zones` and `Standard` SKU to be set. */ ipTags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The IP Version to use, IPv6 or IPv4. Changing this forces a new resource to be created. Defaults to `IPv4`. * * > **Note** Only `Static` IP address allocation is supported for IPv6. */ ipVersion?: pulumi.Input; /** * Specifies the supported Azure location where the Public IP should exist. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * Specifies the name of the Public IP. Changing this forces a new Public IP to be created. */ name?: pulumi.Input; /** * If specified then public IP address allocated will be provided from the public IP prefix resource. Changing this forces a new resource to be created. */ publicIpPrefixId?: pulumi.Input; /** * The name of the Resource Group where this Public IP should exist. Changing this forces a new Public IP to be created. */ resourceGroupName: pulumi.Input; /** * A fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. */ reverseFqdn?: pulumi.Input; /** * The SKU of the Public IP. Possible values are `Basic`, `Standard`, and `StandardV2`. Defaults to `Standard`. Changing this forces a new resource to be created. * * > **Note** Public IP `Standard` and `StandardV2` SKUs require `allocationMethod` to be set to `Static`. * * !> **Note:** `sku` can no longer be set to `Basic` as of 31 March 2025 for new resources. This also affects `allocationMethod` set to `Dynamic`, as it is only available with the `Basic` SKU. Please see the Azure Update [retirement notification](https://azure.microsoft.com/updates/upgrade-to-standard-sku-public-ip-addresses-in-azure-by-30-september-2025-basic-sku-will-be-retired/) for more information. */ sku?: pulumi.Input; /** * The SKU Tier that should be used for the Public IP. Possible values are `Regional` and `Global`. Defaults to `Regional`. Changing this forces a new resource to be created. * * > **Note** When `skuTier` is set to `Global`, `sku` must be set to `Standard`. */ skuTier?: pulumi.Input; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * A collection containing the availability zone to allocate the Public IP in. Changing this forces a new resource to be created. * * > **Note:** Availability Zones are only supported with a [Standard SKU](https://docs.microsoft.com/azure/virtual-network/virtual-network-ip-addresses-overview-arm#standard) and [in select regions](https://docs.microsoft.com/azure/availability-zones/az-overview) at this time. Standard SKU Public IP Addresses that do not specify a zone are **not** zone-redundant by default. */ zones?: pulumi.Input[]>; }