PublicIp
Manages a Public IP Address.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West US",
});
var examplePublicIp = new Azure.Network.PublicIp("examplePublicIp", new Azure.Network.PublicIpArgs
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
AllocationMethod = "Static",
Tags =
{
{ "environment", "Production" },
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/network"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West US"),
})
if err != nil {
return err
}
_, err = network.NewPublicIp(ctx, "examplePublicIp", &network.PublicIpArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
AllocationMethod: pulumi.String("Static"),
Tags: pulumi.Map{
"environment": pulumi.String("Production"),
},
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West US")
example_public_ip = azure.network.PublicIp("examplePublicIp",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
allocation_method="Static",
tags={
"environment": "Production",
})import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West US"});
const examplePublicIp = new azure.network.PublicIp("examplePublicIp", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
allocationMethod: "Static",
tags: {
environment: "Production",
},
});Create a PublicIp Resource
new PublicIp(name: string, args: PublicIpArgs, opts?: CustomResourceOptions);def PublicIp(resource_name, opts=None, allocation_method=None, domain_name_label=None, idle_timeout_in_minutes=None, ip_version=None, location=None, name=None, public_ip_prefix_id=None, resource_group_name=None, reverse_fqdn=None, sku=None, tags=None, zones=None, __props__=None);func NewPublicIp(ctx *Context, name string, args PublicIpArgs, opts ...ResourceOption) (*PublicIp, error)public PublicIp(string name, PublicIpArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args PublicIpArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PublicIpArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PublicIpArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
PublicIp Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The PublicIp resource accepts the following input properties:
- Allocation
Method string Defines the allocation method for this IP address. Possible values are
StaticorDynamic.- Resource
Group stringName The name of the resource group in which to create the public ip.
- Domain
Name stringLabel 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.
- Idle
Timeout intIn Minutes Specifies the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes.
- Ip
Version string The IP Version to use, IPv6 or IPv4.
- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Public IP resource . Changing this forces a new resource to be created.
- Public
Ip stringPrefix Id If specified then public IP address allocated will be provided from the public IP prefix resource.
- Reverse
Fqdn string 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.
- Sku string
The SKU of the Public IP. Accepted values are
BasicandStandard. Defaults toBasic.- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Zones string
A collection containing the availability zone to allocate the Public IP in.
- Allocation
Method string Defines the allocation method for this IP address. Possible values are
StaticorDynamic.- Resource
Group stringName The name of the resource group in which to create the public ip.
- Domain
Name stringLabel 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.
- Idle
Timeout intIn Minutes Specifies the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes.
- Ip
Version string The IP Version to use, IPv6 or IPv4.
- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Public IP resource . Changing this forces a new resource to be created.
- Public
Ip stringPrefix Id If specified then public IP address allocated will be provided from the public IP prefix resource.
- Reverse
Fqdn string 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.
- Sku string
The SKU of the Public IP. Accepted values are
BasicandStandard. Defaults toBasic.- map[string]string
A mapping of tags to assign to the resource.
- Zones string
A collection containing the availability zone to allocate the Public IP in.
- allocation
Method string Defines the allocation method for this IP address. Possible values are
StaticorDynamic.- resource
Group stringName The name of the resource group in which to create the public ip.
- domain
Name stringLabel 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.
- idle
Timeout numberIn Minutes Specifies the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes.
- ip
Version string The IP Version to use, IPv6 or IPv4.
- location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name string
Specifies the name of the Public IP resource . Changing this forces a new resource to be created.
- public
Ip stringPrefix Id If specified then public IP address allocated will be provided from the public IP prefix resource.
- reverse
Fqdn string 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.
- sku string
The SKU of the Public IP. Accepted values are
BasicandStandard. Defaults toBasic.- {[key: string]: string}
A mapping of tags to assign to the resource.
- zones string
A collection containing the availability zone to allocate the Public IP in.
- allocation_
method str Defines the allocation method for this IP address. Possible values are
StaticorDynamic.- resource_
group_ strname The name of the resource group in which to create the public ip.
- domain_
name_ strlabel 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.
- idle_
timeout_ floatin_ minutes Specifies the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes.
- ip_
version str The IP Version to use, IPv6 or IPv4.
- location str
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name str
Specifies the name of the Public IP resource . Changing this forces a new resource to be created.
- public_
ip_ strprefix_ id If specified then public IP address allocated will be provided from the public IP prefix resource.
- reverse_
fqdn str 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.
- sku str
The SKU of the Public IP. Accepted values are
BasicandStandard. Defaults toBasic.- Dict[str, str]
A mapping of tags to assign to the resource.
- zones str
A collection containing the availability zone to allocate the Public IP in.
Outputs
All input properties are implicitly available as output properties. Additionally, the PublicIp resource produces the following output properties:
- Fqdn string
Fully qualified domain name of the A DNS record associated with the public IP.
domain_name_labelmust be specified to get thefqdn. This is the concatenation of thedomain_name_labeland the regionalized DNS zone- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Address string The IP address value that was allocated.
- Fqdn string
Fully qualified domain name of the A DNS record associated with the public IP.
domain_name_labelmust be specified to get thefqdn. This is the concatenation of thedomain_name_labeland the regionalized DNS zone- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Address string The IP address value that was allocated.
- fqdn string
Fully qualified domain name of the A DNS record associated with the public IP.
domain_name_labelmust be specified to get thefqdn. This is the concatenation of thedomain_name_labeland the regionalized DNS zone- id string
- The provider-assigned unique ID for this managed resource.
- ip
Address string The IP address value that was allocated.
- fqdn str
Fully qualified domain name of the A DNS record associated with the public IP.
domain_name_labelmust be specified to get thefqdn. This is the concatenation of thedomain_name_labeland the regionalized DNS zone- id str
- The provider-assigned unique ID for this managed resource.
- ip_
address str The IP address value that was allocated.
Look up an Existing PublicIp Resource
Get an existing PublicIp resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: PublicIpState, opts?: CustomResourceOptions): PublicIpstatic get(resource_name, id, opts=None, allocation_method=None, domain_name_label=None, fqdn=None, idle_timeout_in_minutes=None, ip_address=None, ip_version=None, location=None, name=None, public_ip_prefix_id=None, resource_group_name=None, reverse_fqdn=None, sku=None, tags=None, zones=None, __props__=None);func GetPublicIp(ctx *Context, name string, id IDInput, state *PublicIpState, opts ...ResourceOption) (*PublicIp, error)public static PublicIp Get(string name, Input<string> id, PublicIpState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Allocation
Method string Defines the allocation method for this IP address. Possible values are
StaticorDynamic.- Domain
Name stringLabel 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.
- Fqdn string
Fully qualified domain name of the A DNS record associated with the public IP.
domain_name_labelmust be specified to get thefqdn. This is the concatenation of thedomain_name_labeland the regionalized DNS zone- Idle
Timeout intIn Minutes Specifies the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes.
- Ip
Address string The IP address value that was allocated.
- Ip
Version string The IP Version to use, IPv6 or IPv4.
- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Public IP resource . Changing this forces a new resource to be created.
- Public
Ip stringPrefix Id If specified then public IP address allocated will be provided from the public IP prefix resource.
- Resource
Group stringName The name of the resource group in which to create the public ip.
- Reverse
Fqdn string 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.
- Sku string
The SKU of the Public IP. Accepted values are
BasicandStandard. Defaults toBasic.- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Zones string
A collection containing the availability zone to allocate the Public IP in.
- Allocation
Method string Defines the allocation method for this IP address. Possible values are
StaticorDynamic.- Domain
Name stringLabel 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.
- Fqdn string
Fully qualified domain name of the A DNS record associated with the public IP.
domain_name_labelmust be specified to get thefqdn. This is the concatenation of thedomain_name_labeland the regionalized DNS zone- Idle
Timeout intIn Minutes Specifies the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes.
- Ip
Address string The IP address value that was allocated.
- Ip
Version string The IP Version to use, IPv6 or IPv4.
- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Public IP resource . Changing this forces a new resource to be created.
- Public
Ip stringPrefix Id If specified then public IP address allocated will be provided from the public IP prefix resource.
- Resource
Group stringName The name of the resource group in which to create the public ip.
- Reverse
Fqdn string 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.
- Sku string
The SKU of the Public IP. Accepted values are
BasicandStandard. Defaults toBasic.- map[string]string
A mapping of tags to assign to the resource.
- Zones string
A collection containing the availability zone to allocate the Public IP in.
- allocation
Method string Defines the allocation method for this IP address. Possible values are
StaticorDynamic.- domain
Name stringLabel 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.
- fqdn string
Fully qualified domain name of the A DNS record associated with the public IP.
domain_name_labelmust be specified to get thefqdn. This is the concatenation of thedomain_name_labeland the regionalized DNS zone- idle
Timeout numberIn Minutes Specifies the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes.
- ip
Address string The IP address value that was allocated.
- ip
Version string The IP Version to use, IPv6 or IPv4.
- location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name string
Specifies the name of the Public IP resource . Changing this forces a new resource to be created.
- public
Ip stringPrefix Id If specified then public IP address allocated will be provided from the public IP prefix resource.
- resource
Group stringName The name of the resource group in which to create the public ip.
- reverse
Fqdn string 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.
- sku string
The SKU of the Public IP. Accepted values are
BasicandStandard. Defaults toBasic.- {[key: string]: string}
A mapping of tags to assign to the resource.
- zones string
A collection containing the availability zone to allocate the Public IP in.
- allocation_
method str Defines the allocation method for this IP address. Possible values are
StaticorDynamic.- domain_
name_ strlabel 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.
- fqdn str
Fully qualified domain name of the A DNS record associated with the public IP.
domain_name_labelmust be specified to get thefqdn. This is the concatenation of thedomain_name_labeland the regionalized DNS zone- idle_
timeout_ floatin_ minutes Specifies the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes.
- ip_
address str The IP address value that was allocated.
- ip_
version str The IP Version to use, IPv6 or IPv4.
- location str
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name str
Specifies the name of the Public IP resource . Changing this forces a new resource to be created.
- public_
ip_ strprefix_ id If specified then public IP address allocated will be provided from the public IP prefix resource.
- resource_
group_ strname The name of the resource group in which to create the public ip.
- reverse_
fqdn str 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.
- sku str
The SKU of the Public IP. Accepted values are
BasicandStandard. Defaults toBasic.- Dict[str, str]
A mapping of tags to assign to the resource.
- zones str
A collection containing the availability zone to allocate the Public IP in.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.