NetworkInterface
Manages a Network Interface.
Create a NetworkInterface Resource
new NetworkInterface(name: string, args: NetworkInterfaceArgs, opts?: CustomResourceOptions);def NetworkInterface(resource_name, opts=None, dns_servers=None, enable_accelerated_networking=None, enable_ip_forwarding=None, internal_dns_name_label=None, ip_configurations=None, location=None, name=None, resource_group_name=None, tags=None, __props__=None);func NewNetworkInterface(ctx *Context, name string, args NetworkInterfaceArgs, opts ...ResourceOption) (*NetworkInterface, error)public NetworkInterface(string name, NetworkInterfaceArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args NetworkInterfaceArgs
- 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 NetworkInterfaceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkInterfaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
NetworkInterface Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The NetworkInterface resource accepts the following input properties:
- Ip
Configurations List<NetworkInterface Ip Configuration Args> One or more
ip_configurationblocks as defined below.- Resource
Group stringName The name of the Resource Group in which to create the Network Interface. Changing this forces a new resource to be created.
- Dns
Servers List<string> A list of IP Addresses defining the DNS Servers which should be used for this Network Interface.
- Enable
Accelerated boolNetworking Should Accelerated Networking be enabled? Defaults to
false.- Enable
Ip boolForwarding Should IP Forwarding be enabled? Defaults to
false.- Internal
Dns stringName Label The (relative) DNS Name used for internal communications between Virtual Machines in the same Virtual Network.
- Location string
The location where the Network Interface should exist. Changing this forces a new resource to be created.
- Name string
The name of the Network Interface. Changing this forces a new resource to be created.
- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Ip
Configurations []NetworkInterface Ip Configuration One or more
ip_configurationblocks as defined below.- Resource
Group stringName The name of the Resource Group in which to create the Network Interface. Changing this forces a new resource to be created.
- Dns
Servers []string A list of IP Addresses defining the DNS Servers which should be used for this Network Interface.
- Enable
Accelerated boolNetworking Should Accelerated Networking be enabled? Defaults to
false.- Enable
Ip boolForwarding Should IP Forwarding be enabled? Defaults to
false.- Internal
Dns stringName Label The (relative) DNS Name used for internal communications between Virtual Machines in the same Virtual Network.
- Location string
The location where the Network Interface should exist. Changing this forces a new resource to be created.
- Name string
The name of the Network Interface. Changing this forces a new resource to be created.
- map[string]string
A mapping of tags to assign to the resource.
- ip
Configurations NetworkInterface Ip Configuration[] One or more
ip_configurationblocks as defined below.- resource
Group stringName The name of the Resource Group in which to create the Network Interface. Changing this forces a new resource to be created.
- dns
Servers string[] A list of IP Addresses defining the DNS Servers which should be used for this Network Interface.
- enable
Accelerated booleanNetworking Should Accelerated Networking be enabled? Defaults to
false.- enable
Ip booleanForwarding Should IP Forwarding be enabled? Defaults to
false.- internal
Dns stringName Label The (relative) DNS Name used for internal communications between Virtual Machines in the same Virtual Network.
- location string
The location where the Network Interface should exist. Changing this forces a new resource to be created.
- name string
The name of the Network Interface. Changing this forces a new resource to be created.
- {[key: string]: string}
A mapping of tags to assign to the resource.
- ip_
configurations List[NetworkInterface Ip Configuration] One or more
ip_configurationblocks as defined below.- resource_
group_ strname The name of the Resource Group in which to create the Network Interface. Changing this forces a new resource to be created.
- dns_
servers List[str] A list of IP Addresses defining the DNS Servers which should be used for this Network Interface.
- enable_
accelerated_ boolnetworking Should Accelerated Networking be enabled? Defaults to
false.- enable_
ip_ boolforwarding Should IP Forwarding be enabled? Defaults to
false.- internal_
dns_ strname_ label The (relative) DNS Name used for internal communications between Virtual Machines in the same Virtual Network.
- location str
The location where the Network Interface should exist. Changing this forces a new resource to be created.
- name str
The name of the Network Interface. Changing this forces a new resource to be created.
- Dict[str, str]
A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkInterface resource produces the following output properties:
- Applied
Dns List<string>Servers If the Virtual Machine using this Network Interface is part of an Availability Set, then this list will have the union of all DNS servers from all Network Interfaces that are part of the Availability Set.
- Id string
- The provider-assigned unique ID for this managed resource.
- Internal
Domain stringName Suffix Even if
internal_dns_name_labelis not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value ofinternal_domain_name_suffix.- Mac
Address string The Media Access Control (MAC) Address of the Network Interface.
- Private
Ip stringAddress The Static IP Address which should be used.
- Private
Ip List<string>Addresses The private IP addresses of the network interface.
- Virtual
Machine stringId The ID of the Virtual Machine which this Network Interface is connected to.
- Applied
Dns []stringServers If the Virtual Machine using this Network Interface is part of an Availability Set, then this list will have the union of all DNS servers from all Network Interfaces that are part of the Availability Set.
- Id string
- The provider-assigned unique ID for this managed resource.
- Internal
Domain stringName Suffix Even if
internal_dns_name_labelis not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value ofinternal_domain_name_suffix.- Mac
Address string The Media Access Control (MAC) Address of the Network Interface.
- Private
Ip stringAddress The Static IP Address which should be used.
- Private
Ip []stringAddresses The private IP addresses of the network interface.
- Virtual
Machine stringId The ID of the Virtual Machine which this Network Interface is connected to.
- applied
Dns string[]Servers If the Virtual Machine using this Network Interface is part of an Availability Set, then this list will have the union of all DNS servers from all Network Interfaces that are part of the Availability Set.
- id string
- The provider-assigned unique ID for this managed resource.
- internal
Domain stringName Suffix Even if
internal_dns_name_labelis not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value ofinternal_domain_name_suffix.- mac
Address string The Media Access Control (MAC) Address of the Network Interface.
- private
Ip stringAddress The Static IP Address which should be used.
- private
Ip string[]Addresses The private IP addresses of the network interface.
- virtual
Machine stringId The ID of the Virtual Machine which this Network Interface is connected to.
- applied_
dns_ List[str]servers If the Virtual Machine using this Network Interface is part of an Availability Set, then this list will have the union of all DNS servers from all Network Interfaces that are part of the Availability Set.
- id str
- The provider-assigned unique ID for this managed resource.
- internal_
domain_ strname_ suffix Even if
internal_dns_name_labelis not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value ofinternal_domain_name_suffix.- mac_
address str The Media Access Control (MAC) Address of the Network Interface.
- private_
ip_ straddress The Static IP Address which should be used.
- private_
ip_ List[str]addresses The private IP addresses of the network interface.
- virtual_
machine_ strid The ID of the Virtual Machine which this Network Interface is connected to.
Look up an Existing NetworkInterface Resource
Get an existing NetworkInterface 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?: NetworkInterfaceState, opts?: CustomResourceOptions): NetworkInterfacestatic get(resource_name, id, opts=None, applied_dns_servers=None, dns_servers=None, enable_accelerated_networking=None, enable_ip_forwarding=None, internal_dns_name_label=None, internal_domain_name_suffix=None, ip_configurations=None, location=None, mac_address=None, name=None, private_ip_address=None, private_ip_addresses=None, resource_group_name=None, tags=None, virtual_machine_id=None, __props__=None);func GetNetworkInterface(ctx *Context, name string, id IDInput, state *NetworkInterfaceState, opts ...ResourceOption) (*NetworkInterface, error)public static NetworkInterface Get(string name, Input<string> id, NetworkInterfaceState? 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:
- Applied
Dns List<string>Servers If the Virtual Machine using this Network Interface is part of an Availability Set, then this list will have the union of all DNS servers from all Network Interfaces that are part of the Availability Set.
- Dns
Servers List<string> A list of IP Addresses defining the DNS Servers which should be used for this Network Interface.
- Enable
Accelerated boolNetworking Should Accelerated Networking be enabled? Defaults to
false.- Enable
Ip boolForwarding Should IP Forwarding be enabled? Defaults to
false.- Internal
Dns stringName Label The (relative) DNS Name used for internal communications between Virtual Machines in the same Virtual Network.
- Internal
Domain stringName Suffix Even if
internal_dns_name_labelis not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value ofinternal_domain_name_suffix.- Ip
Configurations List<NetworkInterface Ip Configuration Args> One or more
ip_configurationblocks as defined below.- Location string
The location where the Network Interface should exist. Changing this forces a new resource to be created.
- Mac
Address string The Media Access Control (MAC) Address of the Network Interface.
- Name string
The name of the Network Interface. Changing this forces a new resource to be created.
- Private
Ip stringAddress The Static IP Address which should be used.
- Private
Ip List<string>Addresses The private IP addresses of the network interface.
- Resource
Group stringName The name of the Resource Group in which to create the Network Interface. Changing this forces a new resource to be created.
- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Virtual
Machine stringId The ID of the Virtual Machine which this Network Interface is connected to.
- Applied
Dns []stringServers If the Virtual Machine using this Network Interface is part of an Availability Set, then this list will have the union of all DNS servers from all Network Interfaces that are part of the Availability Set.
- Dns
Servers []string A list of IP Addresses defining the DNS Servers which should be used for this Network Interface.
- Enable
Accelerated boolNetworking Should Accelerated Networking be enabled? Defaults to
false.- Enable
Ip boolForwarding Should IP Forwarding be enabled? Defaults to
false.- Internal
Dns stringName Label The (relative) DNS Name used for internal communications between Virtual Machines in the same Virtual Network.
- Internal
Domain stringName Suffix Even if
internal_dns_name_labelis not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value ofinternal_domain_name_suffix.- Ip
Configurations []NetworkInterface Ip Configuration One or more
ip_configurationblocks as defined below.- Location string
The location where the Network Interface should exist. Changing this forces a new resource to be created.
- Mac
Address string The Media Access Control (MAC) Address of the Network Interface.
- Name string
The name of the Network Interface. Changing this forces a new resource to be created.
- Private
Ip stringAddress The Static IP Address which should be used.
- Private
Ip []stringAddresses The private IP addresses of the network interface.
- Resource
Group stringName The name of the Resource Group in which to create the Network Interface. Changing this forces a new resource to be created.
- map[string]string
A mapping of tags to assign to the resource.
- Virtual
Machine stringId The ID of the Virtual Machine which this Network Interface is connected to.
- applied
Dns string[]Servers If the Virtual Machine using this Network Interface is part of an Availability Set, then this list will have the union of all DNS servers from all Network Interfaces that are part of the Availability Set.
- dns
Servers string[] A list of IP Addresses defining the DNS Servers which should be used for this Network Interface.
- enable
Accelerated booleanNetworking Should Accelerated Networking be enabled? Defaults to
false.- enable
Ip booleanForwarding Should IP Forwarding be enabled? Defaults to
false.- internal
Dns stringName Label The (relative) DNS Name used for internal communications between Virtual Machines in the same Virtual Network.
- internal
Domain stringName Suffix Even if
internal_dns_name_labelis not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value ofinternal_domain_name_suffix.- ip
Configurations NetworkInterface Ip Configuration[] One or more
ip_configurationblocks as defined below.- location string
The location where the Network Interface should exist. Changing this forces a new resource to be created.
- mac
Address string The Media Access Control (MAC) Address of the Network Interface.
- name string
The name of the Network Interface. Changing this forces a new resource to be created.
- private
Ip stringAddress The Static IP Address which should be used.
- private
Ip string[]Addresses The private IP addresses of the network interface.
- resource
Group stringName The name of the Resource Group in which to create the Network Interface. Changing this forces a new resource to be created.
- {[key: string]: string}
A mapping of tags to assign to the resource.
- virtual
Machine stringId The ID of the Virtual Machine which this Network Interface is connected to.
- applied_
dns_ List[str]servers If the Virtual Machine using this Network Interface is part of an Availability Set, then this list will have the union of all DNS servers from all Network Interfaces that are part of the Availability Set.
- dns_
servers List[str] A list of IP Addresses defining the DNS Servers which should be used for this Network Interface.
- enable_
accelerated_ boolnetworking Should Accelerated Networking be enabled? Defaults to
false.- enable_
ip_ boolforwarding Should IP Forwarding be enabled? Defaults to
false.- internal_
dns_ strname_ label The (relative) DNS Name used for internal communications between Virtual Machines in the same Virtual Network.
- internal_
domain_ strname_ suffix Even if
internal_dns_name_labelis not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value ofinternal_domain_name_suffix.- ip_
configurations List[NetworkInterface Ip Configuration] One or more
ip_configurationblocks as defined below.- location str
The location where the Network Interface should exist. Changing this forces a new resource to be created.
- mac_
address str The Media Access Control (MAC) Address of the Network Interface.
- name str
The name of the Network Interface. Changing this forces a new resource to be created.
- private_
ip_ straddress The Static IP Address which should be used.
- private_
ip_ List[str]addresses The private IP addresses of the network interface.
- resource_
group_ strname The name of the Resource Group in which to create the Network Interface. Changing this forces a new resource to be created.
- Dict[str, str]
A mapping of tags to assign to the resource.
- virtual_
machine_ strid The ID of the Virtual Machine which this Network Interface is connected to.
Supporting Types
NetworkInterfaceIpConfiguration
- Name string
A name used for this IP Configuration.
- Private
Ip stringAddress Allocation The allocation method used for the Private IP Address. Possible values are
DynamicandStatic.- Primary bool
Is this the Primary IP Configuration? Must be
truefor the firstip_configurationwhen multiple are specified. Defaults tofalse.- Private
Ip stringAddress The Static IP Address which should be used.
- Private
Ip stringAddress Version The IP Version to use. Possible values are
IPv4orIPv6. Defaults toIPv4.- Public
Ip stringAddress Id Reference to a Public IP Address to associate with this NIC
- Subnet
Id string The ID of the Subnet where this Network Interface should be located in.
- Name string
A name used for this IP Configuration.
- Private
Ip stringAddress Allocation The allocation method used for the Private IP Address. Possible values are
DynamicandStatic.- Primary bool
Is this the Primary IP Configuration? Must be
truefor the firstip_configurationwhen multiple are specified. Defaults tofalse.- Private
Ip stringAddress The Static IP Address which should be used.
- Private
Ip stringAddress Version The IP Version to use. Possible values are
IPv4orIPv6. Defaults toIPv4.- Public
Ip stringAddress Id Reference to a Public IP Address to associate with this NIC
- Subnet
Id string The ID of the Subnet where this Network Interface should be located in.
- name string
A name used for this IP Configuration.
- private
Ip stringAddress Allocation The allocation method used for the Private IP Address. Possible values are
DynamicandStatic.- primary boolean
Is this the Primary IP Configuration? Must be
truefor the firstip_configurationwhen multiple are specified. Defaults tofalse.- private
Ip stringAddress The Static IP Address which should be used.
- private
Ip stringAddress Version The IP Version to use. Possible values are
IPv4orIPv6. Defaults toIPv4.- public
Ip stringAddress Id Reference to a Public IP Address to associate with this NIC
- subnet
Id string The ID of the Subnet where this Network Interface should be located in.
- name str
A name used for this IP Configuration.
- private
Ip strAddress Allocation The allocation method used for the Private IP Address. Possible values are
DynamicandStatic.- primary bool
Is this the Primary IP Configuration? Must be
truefor the firstip_configurationwhen multiple are specified. Defaults tofalse.- private
Ip strAddress Version The IP Version to use. Possible values are
IPv4orIPv6. Defaults toIPv4.- private_
ip_ straddress The Static IP Address which should be used.
- public_
ip_ straddress_ id Reference to a Public IP Address to associate with this NIC
- subnet_
id str The ID of the Subnet where this Network Interface should be located in.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.