nutanix.Subnet
Explore with Pulumi AI
Provides a resource to create a subnet based on the input parameters. A subnet is a block of IP addresses.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nutanix.NutanixFunctions;
import com.pulumi.nutanix.Subnet;
import com.pulumi.nutanix.SubnetArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var clusters = NutanixFunctions.getClusters(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
ctx.export("cluster", clusters.applyValue(getClustersResult -> getClustersResult.entities()[0].metadata().uuid()));
var next_iac_managed = new Subnet("next-iac-managed", SubnetArgs.builder()
.clusterUuid(clusters.applyValue(getClustersResult -> getClustersResult.entities()[0].metadata().uuid()))
.vlanId(101)
.subnetType("VLAN")
.prefixLength(20)
.defaultGatewayIp("10.5.80.1")
.subnetIp("10.5.80.0")
.dhcpDomainNameServerLists(
"8.8.8.8",
"4.2.2.2")
.dhcpDomainSearchLists(
"nutanix.com",
"eng.nutanix.com")
.build());
}
}
resources:
next-iac-managed:
type: nutanix:Subnet
properties:
# What cluster will this VLAN live on?
clusterUuid: ${clusters.entities[0].metadata.uuid}
vlanId: 101
subnetType: VLAN
# Managed L3 Networks
# # This bit is only needed if you intend to turn on IPAM
prefixLength: 20
defaultGatewayIp: 10.5.80.1
subnetIp: 10.5.80.0
dhcpDomainNameServerLists:
- 8.8.8.8
- 4.2.2.2
dhcpDomainSearchLists:
- nutanix.com
- eng.nutanix.com
variables:
clusters:
fn::invoke:
Function: nutanix:getClusters
Arguments:
metadata:
length: 2
outputs:
cluster: ${clusters.entities[0].metadata.uuid}
Create Subnet Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Subnet(name: string, args: SubnetArgs, opts?: CustomResourceOptions);
@overload
def Subnet(resource_name: str,
args: SubnetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Subnet(resource_name: str,
opts: Optional[ResourceOptions] = None,
subnet_type: Optional[str] = None,
enable_nat: Optional[bool] = None,
default_gateway_ip: Optional[str] = None,
is_external: Optional[bool] = None,
description: Optional[str] = None,
dhcp_domain_name_server_lists: Optional[Sequence[str]] = None,
dhcp_domain_search_lists: Optional[Sequence[str]] = None,
dhcp_options: Optional[Mapping[str, str]] = None,
dhcp_server_address: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
availability_zone_reference: Optional[Mapping[str, str]] = None,
vswitch_name: Optional[str] = None,
cluster_uuid: Optional[str] = None,
dhcp_server_address_port: Optional[int] = None,
network_function_chain_reference: Optional[Mapping[str, str]] = None,
owner_reference: Optional[Mapping[str, str]] = None,
prefix_length: Optional[int] = None,
project_reference: Optional[Mapping[str, str]] = None,
subnet_ip: Optional[str] = None,
categories: Optional[Sequence[SubnetCategoryArgs]] = None,
vlan_id: Optional[int] = None,
vpc_reference_uuid: Optional[str] = None,
ip_config_pool_list_ranges: Optional[Sequence[str]] = None)
func NewSubnet(ctx *Context, name string, args SubnetArgs, opts ...ResourceOption) (*Subnet, error)
public Subnet(string name, SubnetArgs args, CustomResourceOptions? opts = null)
public Subnet(String name, SubnetArgs args)
public Subnet(String name, SubnetArgs args, CustomResourceOptions options)
type: nutanix:Subnet
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SubnetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SubnetArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SubnetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SubnetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SubnetArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var subnetResource = new Nutanix.Subnet("subnetResource", new()
{
SubnetType = "string",
EnableNat = false,
DefaultGatewayIp = "string",
IsExternal = false,
Description = "string",
DhcpDomainNameServerLists = new[]
{
"string",
},
DhcpDomainSearchLists = new[]
{
"string",
},
DhcpOptions =
{
{ "string", "string" },
},
DhcpServerAddress =
{
{ "string", "string" },
},
Name = "string",
AvailabilityZoneReference =
{
{ "string", "string" },
},
VswitchName = "string",
ClusterUuid = "string",
DhcpServerAddressPort = 0,
NetworkFunctionChainReference =
{
{ "string", "string" },
},
OwnerReference =
{
{ "string", "string" },
},
PrefixLength = 0,
ProjectReference =
{
{ "string", "string" },
},
SubnetIp = "string",
Categories = new[]
{
new Nutanix.Inputs.SubnetCategoryArgs
{
Name = "string",
Value = "string",
},
},
VlanId = 0,
VpcReferenceUuid = "string",
IpConfigPoolListRanges = new[]
{
"string",
},
});
example, err := nutanix.NewSubnet(ctx, "subnetResource", &nutanix.SubnetArgs{
SubnetType: pulumi.String("string"),
EnableNat: pulumi.Bool(false),
DefaultGatewayIp: pulumi.String("string"),
IsExternal: pulumi.Bool(false),
Description: pulumi.String("string"),
DhcpDomainNameServerLists: pulumi.StringArray{
pulumi.String("string"),
},
DhcpDomainSearchLists: pulumi.StringArray{
pulumi.String("string"),
},
DhcpOptions: pulumi.StringMap{
"string": pulumi.String("string"),
},
DhcpServerAddress: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
AvailabilityZoneReference: pulumi.StringMap{
"string": pulumi.String("string"),
},
VswitchName: pulumi.String("string"),
ClusterUuid: pulumi.String("string"),
DhcpServerAddressPort: pulumi.Int(0),
NetworkFunctionChainReference: pulumi.StringMap{
"string": pulumi.String("string"),
},
OwnerReference: pulumi.StringMap{
"string": pulumi.String("string"),
},
PrefixLength: pulumi.Int(0),
ProjectReference: pulumi.StringMap{
"string": pulumi.String("string"),
},
SubnetIp: pulumi.String("string"),
Categories: nutanix.SubnetCategoryArray{
&nutanix.SubnetCategoryArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
VlanId: pulumi.Int(0),
VpcReferenceUuid: pulumi.String("string"),
IpConfigPoolListRanges: pulumi.StringArray{
pulumi.String("string"),
},
})
var subnetResource = new Subnet("subnetResource", SubnetArgs.builder()
.subnetType("string")
.enableNat(false)
.defaultGatewayIp("string")
.isExternal(false)
.description("string")
.dhcpDomainNameServerLists("string")
.dhcpDomainSearchLists("string")
.dhcpOptions(Map.of("string", "string"))
.dhcpServerAddress(Map.of("string", "string"))
.name("string")
.availabilityZoneReference(Map.of("string", "string"))
.vswitchName("string")
.clusterUuid("string")
.dhcpServerAddressPort(0)
.networkFunctionChainReference(Map.of("string", "string"))
.ownerReference(Map.of("string", "string"))
.prefixLength(0)
.projectReference(Map.of("string", "string"))
.subnetIp("string")
.categories(SubnetCategoryArgs.builder()
.name("string")
.value("string")
.build())
.vlanId(0)
.vpcReferenceUuid("string")
.ipConfigPoolListRanges("string")
.build());
subnet_resource = nutanix.Subnet("subnetResource",
subnet_type="string",
enable_nat=False,
default_gateway_ip="string",
is_external=False,
description="string",
dhcp_domain_name_server_lists=["string"],
dhcp_domain_search_lists=["string"],
dhcp_options={
"string": "string",
},
dhcp_server_address={
"string": "string",
},
name="string",
availability_zone_reference={
"string": "string",
},
vswitch_name="string",
cluster_uuid="string",
dhcp_server_address_port=0,
network_function_chain_reference={
"string": "string",
},
owner_reference={
"string": "string",
},
prefix_length=0,
project_reference={
"string": "string",
},
subnet_ip="string",
categories=[{
"name": "string",
"value": "string",
}],
vlan_id=0,
vpc_reference_uuid="string",
ip_config_pool_list_ranges=["string"])
const subnetResource = new nutanix.Subnet("subnetResource", {
subnetType: "string",
enableNat: false,
defaultGatewayIp: "string",
isExternal: false,
description: "string",
dhcpDomainNameServerLists: ["string"],
dhcpDomainSearchLists: ["string"],
dhcpOptions: {
string: "string",
},
dhcpServerAddress: {
string: "string",
},
name: "string",
availabilityZoneReference: {
string: "string",
},
vswitchName: "string",
clusterUuid: "string",
dhcpServerAddressPort: 0,
networkFunctionChainReference: {
string: "string",
},
ownerReference: {
string: "string",
},
prefixLength: 0,
projectReference: {
string: "string",
},
subnetIp: "string",
categories: [{
name: "string",
value: "string",
}],
vlanId: 0,
vpcReferenceUuid: "string",
ipConfigPoolListRanges: ["string"],
});
type: nutanix:Subnet
properties:
availabilityZoneReference:
string: string
categories:
- name: string
value: string
clusterUuid: string
defaultGatewayIp: string
description: string
dhcpDomainNameServerLists:
- string
dhcpDomainSearchLists:
- string
dhcpOptions:
string: string
dhcpServerAddress:
string: string
dhcpServerAddressPort: 0
enableNat: false
ipConfigPoolListRanges:
- string
isExternal: false
name: string
networkFunctionChainReference:
string: string
ownerReference:
string: string
prefixLength: 0
projectReference:
string: string
subnetIp: string
subnetType: string
vlanId: 0
vpcReferenceUuid: string
vswitchName: string
Subnet Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Subnet resource accepts the following input properties:
- Subnet
Type string - (Optional). Valid Types are ["VLAN", "OVERLAY"]
- Availability
Zone Dictionary<string, string>Reference - (Optional) The reference to a availability_zone.
- Categories
List<Piers
Karsenbarg. Nutanix. Inputs. Subnet Category> - (Optional) The categories of the resource.
- Cluster
Uuid string - (Required) The UUID of the cluster.
- Default
Gateway stringIp - (Optional) Default gateway IP address.
- Description string
- (Optional) A description for subnet.
- Dhcp
Domain List<string>Name Server Lists - (Optional). List of Domain Name Server addresses .
- Dhcp
Domain List<string>Search Lists - (Optional).The DNS domain search list .
- Dhcp
Options Dictionary<string, string> - (Optional) Spec for defining DHCP options.
- Dhcp
Server Dictionary<string, string>Address - (Optional) Host address.
- Dhcp
Server intAddress Port - (Optional) Port Number.
- Enable
Nat bool - (Optional) Whether NAT should be performed for VPCs attaching to the subnet. This field is supported only for external subnets. NAT is enabled by default on external subnets.
- Ip
Config List<string>Pool List Ranges - -(Optional) Range of IPs.
- Is
External bool - (Optional) Whether the subnet is external subnet or not.
- Name string
- (Optional) Subnet name (Readonly).
- Network
Function Dictionary<string, string>Chain Reference - (Optional) The reference to a network_function_chain.
- Owner
Reference Dictionary<string, string> - (Optional) The reference to a user.
- Prefix
Length int - (Optional).
- Project
Reference Dictionary<string, string> - (Optional) The reference to a project.
- Subnet
Ip string - (Optional) Subnet IP address.
- Vlan
Id int - (Optional). For VLAN subnet.
- Vpc
Reference stringUuid - VPC reference uuid
- Vswitch
Name string - (Optional).
- Subnet
Type string - (Optional). Valid Types are ["VLAN", "OVERLAY"]
- Availability
Zone map[string]stringReference - (Optional) The reference to a availability_zone.
- Categories
[]Subnet
Category Args - (Optional) The categories of the resource.
- Cluster
Uuid string - (Required) The UUID of the cluster.
- Default
Gateway stringIp - (Optional) Default gateway IP address.
- Description string
- (Optional) A description for subnet.
- Dhcp
Domain []stringName Server Lists - (Optional). List of Domain Name Server addresses .
- Dhcp
Domain []stringSearch Lists - (Optional).The DNS domain search list .
- Dhcp
Options map[string]string - (Optional) Spec for defining DHCP options.
- Dhcp
Server map[string]stringAddress - (Optional) Host address.
- Dhcp
Server intAddress Port - (Optional) Port Number.
- Enable
Nat bool - (Optional) Whether NAT should be performed for VPCs attaching to the subnet. This field is supported only for external subnets. NAT is enabled by default on external subnets.
- Ip
Config []stringPool List Ranges - -(Optional) Range of IPs.
- Is
External bool - (Optional) Whether the subnet is external subnet or not.
- Name string
- (Optional) Subnet name (Readonly).
- Network
Function map[string]stringChain Reference - (Optional) The reference to a network_function_chain.
- Owner
Reference map[string]string - (Optional) The reference to a user.
- Prefix
Length int - (Optional).
- Project
Reference map[string]string - (Optional) The reference to a project.
- Subnet
Ip string - (Optional) Subnet IP address.
- Vlan
Id int - (Optional). For VLAN subnet.
- Vpc
Reference stringUuid - VPC reference uuid
- Vswitch
Name string - (Optional).
- subnet
Type String - (Optional). Valid Types are ["VLAN", "OVERLAY"]
- availability
Zone Map<String,String>Reference - (Optional) The reference to a availability_zone.
- categories
List<Subnet
Category> - (Optional) The categories of the resource.
- cluster
Uuid String - (Required) The UUID of the cluster.
- default
Gateway StringIp - (Optional) Default gateway IP address.
- description String
- (Optional) A description for subnet.
- dhcp
Domain List<String>Name Server Lists - (Optional). List of Domain Name Server addresses .
- dhcp
Domain List<String>Search Lists - (Optional).The DNS domain search list .
- dhcp
Options Map<String,String> - (Optional) Spec for defining DHCP options.
- dhcp
Server Map<String,String>Address - (Optional) Host address.
- dhcp
Server IntegerAddress Port - (Optional) Port Number.
- enable
Nat Boolean - (Optional) Whether NAT should be performed for VPCs attaching to the subnet. This field is supported only for external subnets. NAT is enabled by default on external subnets.
- ip
Config List<String>Pool List Ranges - -(Optional) Range of IPs.
- is
External Boolean - (Optional) Whether the subnet is external subnet or not.
- name String
- (Optional) Subnet name (Readonly).
- network
Function Map<String,String>Chain Reference - (Optional) The reference to a network_function_chain.
- owner
Reference Map<String,String> - (Optional) The reference to a user.
- prefix
Length Integer - (Optional).
- project
Reference Map<String,String> - (Optional) The reference to a project.
- subnet
Ip String - (Optional) Subnet IP address.
- vlan
Id Integer - (Optional). For VLAN subnet.
- vpc
Reference StringUuid - VPC reference uuid
- vswitch
Name String - (Optional).
- subnet
Type string - (Optional). Valid Types are ["VLAN", "OVERLAY"]
- availability
Zone {[key: string]: string}Reference - (Optional) The reference to a availability_zone.
- categories
Subnet
Category[] - (Optional) The categories of the resource.
- cluster
Uuid string - (Required) The UUID of the cluster.
- default
Gateway stringIp - (Optional) Default gateway IP address.
- description string
- (Optional) A description for subnet.
- dhcp
Domain string[]Name Server Lists - (Optional). List of Domain Name Server addresses .
- dhcp
Domain string[]Search Lists - (Optional).The DNS domain search list .
- dhcp
Options {[key: string]: string} - (Optional) Spec for defining DHCP options.
- dhcp
Server {[key: string]: string}Address - (Optional) Host address.
- dhcp
Server numberAddress Port - (Optional) Port Number.
- enable
Nat boolean - (Optional) Whether NAT should be performed for VPCs attaching to the subnet. This field is supported only for external subnets. NAT is enabled by default on external subnets.
- ip
Config string[]Pool List Ranges - -(Optional) Range of IPs.
- is
External boolean - (Optional) Whether the subnet is external subnet or not.
- name string
- (Optional) Subnet name (Readonly).
- network
Function {[key: string]: string}Chain Reference - (Optional) The reference to a network_function_chain.
- owner
Reference {[key: string]: string} - (Optional) The reference to a user.
- prefix
Length number - (Optional).
- project
Reference {[key: string]: string} - (Optional) The reference to a project.
- subnet
Ip string - (Optional) Subnet IP address.
- vlan
Id number - (Optional). For VLAN subnet.
- vpc
Reference stringUuid - VPC reference uuid
- vswitch
Name string - (Optional).
- subnet_
type str - (Optional). Valid Types are ["VLAN", "OVERLAY"]
- availability_
zone_ Mapping[str, str]reference - (Optional) The reference to a availability_zone.
- categories
Sequence[Subnet
Category Args] - (Optional) The categories of the resource.
- cluster_
uuid str - (Required) The UUID of the cluster.
- default_
gateway_ strip - (Optional) Default gateway IP address.
- description str
- (Optional) A description for subnet.
- dhcp_
domain_ Sequence[str]name_ server_ lists - (Optional). List of Domain Name Server addresses .
- dhcp_
domain_ Sequence[str]search_ lists - (Optional).The DNS domain search list .
- dhcp_
options Mapping[str, str] - (Optional) Spec for defining DHCP options.
- dhcp_
server_ Mapping[str, str]address - (Optional) Host address.
- dhcp_
server_ intaddress_ port - (Optional) Port Number.
- enable_
nat bool - (Optional) Whether NAT should be performed for VPCs attaching to the subnet. This field is supported only for external subnets. NAT is enabled by default on external subnets.
- ip_
config_ Sequence[str]pool_ list_ ranges - -(Optional) Range of IPs.
- is_
external bool - (Optional) Whether the subnet is external subnet or not.
- name str
- (Optional) Subnet name (Readonly).
- network_
function_ Mapping[str, str]chain_ reference - (Optional) The reference to a network_function_chain.
- owner_
reference Mapping[str, str] - (Optional) The reference to a user.
- prefix_
length int - (Optional).
- project_
reference Mapping[str, str] - (Optional) The reference to a project.
- subnet_
ip str - (Optional) Subnet IP address.
- vlan_
id int - (Optional). For VLAN subnet.
- vpc_
reference_ struuid - VPC reference uuid
- vswitch_
name str - (Optional).
- subnet
Type String - (Optional). Valid Types are ["VLAN", "OVERLAY"]
- availability
Zone Map<String>Reference - (Optional) The reference to a availability_zone.
- categories List<Property Map>
- (Optional) The categories of the resource.
- cluster
Uuid String - (Required) The UUID of the cluster.
- default
Gateway StringIp - (Optional) Default gateway IP address.
- description String
- (Optional) A description for subnet.
- dhcp
Domain List<String>Name Server Lists - (Optional). List of Domain Name Server addresses .
- dhcp
Domain List<String>Search Lists - (Optional).The DNS domain search list .
- dhcp
Options Map<String> - (Optional) Spec for defining DHCP options.
- dhcp
Server Map<String>Address - (Optional) Host address.
- dhcp
Server NumberAddress Port - (Optional) Port Number.
- enable
Nat Boolean - (Optional) Whether NAT should be performed for VPCs attaching to the subnet. This field is supported only for external subnets. NAT is enabled by default on external subnets.
- ip
Config List<String>Pool List Ranges - -(Optional) Range of IPs.
- is
External Boolean - (Optional) Whether the subnet is external subnet or not.
- name String
- (Optional) Subnet name (Readonly).
- network
Function Map<String>Chain Reference - (Optional) The reference to a network_function_chain.
- owner
Reference Map<String> - (Optional) The reference to a user.
- prefix
Length Number - (Optional).
- project
Reference Map<String> - (Optional) The reference to a project.
- subnet
Ip String - (Optional) Subnet IP address.
- vlan
Id Number - (Optional). For VLAN subnet.
- vpc
Reference StringUuid - VPC reference uuid
- vswitch
Name String - (Optional).
Outputs
All input properties are implicitly available as output properties. Additionally, the Subnet resource produces the following output properties:
- Api
Version string - The version of the API.
- Cluster
Name string - Id string
- The provider-assigned unique ID for this managed resource.
- Metadata Dictionary<string, string>
- (Required) The subnet kind metadata.
- State string
- The state of the subnet.
- Api
Version string - The version of the API.
- Cluster
Name string - Id string
- The provider-assigned unique ID for this managed resource.
- Metadata map[string]string
- (Required) The subnet kind metadata.
- State string
- The state of the subnet.
- api
Version String - The version of the API.
- cluster
Name String - id String
- The provider-assigned unique ID for this managed resource.
- metadata Map<String,String>
- (Required) The subnet kind metadata.
- state String
- The state of the subnet.
- api
Version string - The version of the API.
- cluster
Name string - id string
- The provider-assigned unique ID for this managed resource.
- metadata {[key: string]: string}
- (Required) The subnet kind metadata.
- state string
- The state of the subnet.
- api_
version str - The version of the API.
- cluster_
name str - id str
- The provider-assigned unique ID for this managed resource.
- metadata Mapping[str, str]
- (Required) The subnet kind metadata.
- state str
- The state of the subnet.
- api
Version String - The version of the API.
- cluster
Name String - id String
- The provider-assigned unique ID for this managed resource.
- metadata Map<String>
- (Required) The subnet kind metadata.
- state String
- The state of the subnet.
Look up Existing Subnet Resource
Get an existing Subnet 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?: SubnetState, opts?: CustomResourceOptions): Subnet
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_version: Optional[str] = None,
availability_zone_reference: Optional[Mapping[str, str]] = None,
categories: Optional[Sequence[SubnetCategoryArgs]] = None,
cluster_name: Optional[str] = None,
cluster_uuid: Optional[str] = None,
default_gateway_ip: Optional[str] = None,
description: Optional[str] = None,
dhcp_domain_name_server_lists: Optional[Sequence[str]] = None,
dhcp_domain_search_lists: Optional[Sequence[str]] = None,
dhcp_options: Optional[Mapping[str, str]] = None,
dhcp_server_address: Optional[Mapping[str, str]] = None,
dhcp_server_address_port: Optional[int] = None,
enable_nat: Optional[bool] = None,
ip_config_pool_list_ranges: Optional[Sequence[str]] = None,
is_external: Optional[bool] = None,
metadata: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
network_function_chain_reference: Optional[Mapping[str, str]] = None,
owner_reference: Optional[Mapping[str, str]] = None,
prefix_length: Optional[int] = None,
project_reference: Optional[Mapping[str, str]] = None,
state: Optional[str] = None,
subnet_ip: Optional[str] = None,
subnet_type: Optional[str] = None,
vlan_id: Optional[int] = None,
vpc_reference_uuid: Optional[str] = None,
vswitch_name: Optional[str] = None) -> Subnet
func GetSubnet(ctx *Context, name string, id IDInput, state *SubnetState, opts ...ResourceOption) (*Subnet, error)
public static Subnet Get(string name, Input<string> id, SubnetState? state, CustomResourceOptions? opts = null)
public static Subnet get(String name, Output<String> id, SubnetState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Api
Version string - The version of the API.
- Availability
Zone Dictionary<string, string>Reference - (Optional) The reference to a availability_zone.
- Categories
List<Piers
Karsenbarg. Nutanix. Inputs. Subnet Category> - (Optional) The categories of the resource.
- Cluster
Name string - Cluster
Uuid string - (Required) The UUID of the cluster.
- Default
Gateway stringIp - (Optional) Default gateway IP address.
- Description string
- (Optional) A description for subnet.
- Dhcp
Domain List<string>Name Server Lists - (Optional). List of Domain Name Server addresses .
- Dhcp
Domain List<string>Search Lists - (Optional).The DNS domain search list .
- Dhcp
Options Dictionary<string, string> - (Optional) Spec for defining DHCP options.
- Dhcp
Server Dictionary<string, string>Address - (Optional) Host address.
- Dhcp
Server intAddress Port - (Optional) Port Number.
- Enable
Nat bool - (Optional) Whether NAT should be performed for VPCs attaching to the subnet. This field is supported only for external subnets. NAT is enabled by default on external subnets.
- Ip
Config List<string>Pool List Ranges - -(Optional) Range of IPs.
- Is
External bool - (Optional) Whether the subnet is external subnet or not.
- Metadata Dictionary<string, string>
- (Required) The subnet kind metadata.
- Name string
- (Optional) Subnet name (Readonly).
- Network
Function Dictionary<string, string>Chain Reference - (Optional) The reference to a network_function_chain.
- Owner
Reference Dictionary<string, string> - (Optional) The reference to a user.
- Prefix
Length int - (Optional).
- Project
Reference Dictionary<string, string> - (Optional) The reference to a project.
- State string
- The state of the subnet.
- Subnet
Ip string - (Optional) Subnet IP address.
- Subnet
Type string - (Optional). Valid Types are ["VLAN", "OVERLAY"]
- Vlan
Id int - (Optional). For VLAN subnet.
- Vpc
Reference stringUuid - VPC reference uuid
- Vswitch
Name string - (Optional).
- Api
Version string - The version of the API.
- Availability
Zone map[string]stringReference - (Optional) The reference to a availability_zone.
- Categories
[]Subnet
Category Args - (Optional) The categories of the resource.
- Cluster
Name string - Cluster
Uuid string - (Required) The UUID of the cluster.
- Default
Gateway stringIp - (Optional) Default gateway IP address.
- Description string
- (Optional) A description for subnet.
- Dhcp
Domain []stringName Server Lists - (Optional). List of Domain Name Server addresses .
- Dhcp
Domain []stringSearch Lists - (Optional).The DNS domain search list .
- Dhcp
Options map[string]string - (Optional) Spec for defining DHCP options.
- Dhcp
Server map[string]stringAddress - (Optional) Host address.
- Dhcp
Server intAddress Port - (Optional) Port Number.
- Enable
Nat bool - (Optional) Whether NAT should be performed for VPCs attaching to the subnet. This field is supported only for external subnets. NAT is enabled by default on external subnets.
- Ip
Config []stringPool List Ranges - -(Optional) Range of IPs.
- Is
External bool - (Optional) Whether the subnet is external subnet or not.
- Metadata map[string]string
- (Required) The subnet kind metadata.
- Name string
- (Optional) Subnet name (Readonly).
- Network
Function map[string]stringChain Reference - (Optional) The reference to a network_function_chain.
- Owner
Reference map[string]string - (Optional) The reference to a user.
- Prefix
Length int - (Optional).
- Project
Reference map[string]string - (Optional) The reference to a project.
- State string
- The state of the subnet.
- Subnet
Ip string - (Optional) Subnet IP address.
- Subnet
Type string - (Optional). Valid Types are ["VLAN", "OVERLAY"]
- Vlan
Id int - (Optional). For VLAN subnet.
- Vpc
Reference stringUuid - VPC reference uuid
- Vswitch
Name string - (Optional).
- api
Version String - The version of the API.
- availability
Zone Map<String,String>Reference - (Optional) The reference to a availability_zone.
- categories
List<Subnet
Category> - (Optional) The categories of the resource.
- cluster
Name String - cluster
Uuid String - (Required) The UUID of the cluster.
- default
Gateway StringIp - (Optional) Default gateway IP address.
- description String
- (Optional) A description for subnet.
- dhcp
Domain List<String>Name Server Lists - (Optional). List of Domain Name Server addresses .
- dhcp
Domain List<String>Search Lists - (Optional).The DNS domain search list .
- dhcp
Options Map<String,String> - (Optional) Spec for defining DHCP options.
- dhcp
Server Map<String,String>Address - (Optional) Host address.
- dhcp
Server IntegerAddress Port - (Optional) Port Number.
- enable
Nat Boolean - (Optional) Whether NAT should be performed for VPCs attaching to the subnet. This field is supported only for external subnets. NAT is enabled by default on external subnets.
- ip
Config List<String>Pool List Ranges - -(Optional) Range of IPs.
- is
External Boolean - (Optional) Whether the subnet is external subnet or not.
- metadata Map<String,String>
- (Required) The subnet kind metadata.
- name String
- (Optional) Subnet name (Readonly).
- network
Function Map<String,String>Chain Reference - (Optional) The reference to a network_function_chain.
- owner
Reference Map<String,String> - (Optional) The reference to a user.
- prefix
Length Integer - (Optional).
- project
Reference Map<String,String> - (Optional) The reference to a project.
- state String
- The state of the subnet.
- subnet
Ip String - (Optional) Subnet IP address.
- subnet
Type String - (Optional). Valid Types are ["VLAN", "OVERLAY"]
- vlan
Id Integer - (Optional). For VLAN subnet.
- vpc
Reference StringUuid - VPC reference uuid
- vswitch
Name String - (Optional).
- api
Version string - The version of the API.
- availability
Zone {[key: string]: string}Reference - (Optional) The reference to a availability_zone.
- categories
Subnet
Category[] - (Optional) The categories of the resource.
- cluster
Name string - cluster
Uuid string - (Required) The UUID of the cluster.
- default
Gateway stringIp - (Optional) Default gateway IP address.
- description string
- (Optional) A description for subnet.
- dhcp
Domain string[]Name Server Lists - (Optional). List of Domain Name Server addresses .
- dhcp
Domain string[]Search Lists - (Optional).The DNS domain search list .
- dhcp
Options {[key: string]: string} - (Optional) Spec for defining DHCP options.
- dhcp
Server {[key: string]: string}Address - (Optional) Host address.
- dhcp
Server numberAddress Port - (Optional) Port Number.
- enable
Nat boolean - (Optional) Whether NAT should be performed for VPCs attaching to the subnet. This field is supported only for external subnets. NAT is enabled by default on external subnets.
- ip
Config string[]Pool List Ranges - -(Optional) Range of IPs.
- is
External boolean - (Optional) Whether the subnet is external subnet or not.
- metadata {[key: string]: string}
- (Required) The subnet kind metadata.
- name string
- (Optional) Subnet name (Readonly).
- network
Function {[key: string]: string}Chain Reference - (Optional) The reference to a network_function_chain.
- owner
Reference {[key: string]: string} - (Optional) The reference to a user.
- prefix
Length number - (Optional).
- project
Reference {[key: string]: string} - (Optional) The reference to a project.
- state string
- The state of the subnet.
- subnet
Ip string - (Optional) Subnet IP address.
- subnet
Type string - (Optional). Valid Types are ["VLAN", "OVERLAY"]
- vlan
Id number - (Optional). For VLAN subnet.
- vpc
Reference stringUuid - VPC reference uuid
- vswitch
Name string - (Optional).
- api_
version str - The version of the API.
- availability_
zone_ Mapping[str, str]reference - (Optional) The reference to a availability_zone.
- categories
Sequence[Subnet
Category Args] - (Optional) The categories of the resource.
- cluster_
name str - cluster_
uuid str - (Required) The UUID of the cluster.
- default_
gateway_ strip - (Optional) Default gateway IP address.
- description str
- (Optional) A description for subnet.
- dhcp_
domain_ Sequence[str]name_ server_ lists - (Optional). List of Domain Name Server addresses .
- dhcp_
domain_ Sequence[str]search_ lists - (Optional).The DNS domain search list .
- dhcp_
options Mapping[str, str] - (Optional) Spec for defining DHCP options.
- dhcp_
server_ Mapping[str, str]address - (Optional) Host address.
- dhcp_
server_ intaddress_ port - (Optional) Port Number.
- enable_
nat bool - (Optional) Whether NAT should be performed for VPCs attaching to the subnet. This field is supported only for external subnets. NAT is enabled by default on external subnets.
- ip_
config_ Sequence[str]pool_ list_ ranges - -(Optional) Range of IPs.
- is_
external bool - (Optional) Whether the subnet is external subnet or not.
- metadata Mapping[str, str]
- (Required) The subnet kind metadata.
- name str
- (Optional) Subnet name (Readonly).
- network_
function_ Mapping[str, str]chain_ reference - (Optional) The reference to a network_function_chain.
- owner_
reference Mapping[str, str] - (Optional) The reference to a user.
- prefix_
length int - (Optional).
- project_
reference Mapping[str, str] - (Optional) The reference to a project.
- state str
- The state of the subnet.
- subnet_
ip str - (Optional) Subnet IP address.
- subnet_
type str - (Optional). Valid Types are ["VLAN", "OVERLAY"]
- vlan_
id int - (Optional). For VLAN subnet.
- vpc_
reference_ struuid - VPC reference uuid
- vswitch_
name str - (Optional).
- api
Version String - The version of the API.
- availability
Zone Map<String>Reference - (Optional) The reference to a availability_zone.
- categories List<Property Map>
- (Optional) The categories of the resource.
- cluster
Name String - cluster
Uuid String - (Required) The UUID of the cluster.
- default
Gateway StringIp - (Optional) Default gateway IP address.
- description String
- (Optional) A description for subnet.
- dhcp
Domain List<String>Name Server Lists - (Optional). List of Domain Name Server addresses .
- dhcp
Domain List<String>Search Lists - (Optional).The DNS domain search list .
- dhcp
Options Map<String> - (Optional) Spec for defining DHCP options.
- dhcp
Server Map<String>Address - (Optional) Host address.
- dhcp
Server NumberAddress Port - (Optional) Port Number.
- enable
Nat Boolean - (Optional) Whether NAT should be performed for VPCs attaching to the subnet. This field is supported only for external subnets. NAT is enabled by default on external subnets.
- ip
Config List<String>Pool List Ranges - -(Optional) Range of IPs.
- is
External Boolean - (Optional) Whether the subnet is external subnet or not.
- metadata Map<String>
- (Required) The subnet kind metadata.
- name String
- (Optional) Subnet name (Readonly).
- network
Function Map<String>Chain Reference - (Optional) The reference to a network_function_chain.
- owner
Reference Map<String> - (Optional) The reference to a user.
- prefix
Length Number - (Optional).
- project
Reference Map<String> - (Optional) The reference to a project.
- state String
- The state of the subnet.
- subnet
Ip String - (Optional) Subnet IP address.
- subnet
Type String - (Optional). Valid Types are ["VLAN", "OVERLAY"]
- vlan
Id Number - (Optional). For VLAN subnet.
- vpc
Reference StringUuid - VPC reference uuid
- vswitch
Name String - (Optional).
Supporting Types
SubnetCategory, SubnetCategoryArgs
Package Details
- Repository
- nutanix pierskarsenbarg/pulumi-nutanix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nutanix
Terraform Provider.