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:
- SubnetType string
- (Optional). Valid Types are ["VLAN", "OVERLAY"]
 
- AvailabilityZone Dictionary<string, string>Reference 
- (Optional) The reference to a availability_zone.
 
- Categories
List<PiersKarsenbarg. Nutanix. Inputs. Subnet Category> 
- (Optional) The categories of the resource.
 
- ClusterUuid string
- (Required) The UUID of the cluster.
 
- DefaultGateway stringIp 
- (Optional) Default gateway IP address.
 
- Description string
- (Optional) A description for subnet.
 
- DhcpDomain List<string>Name Server Lists 
- (Optional). List of Domain Name Server addresses .
 
- DhcpDomain List<string>Search Lists 
- (Optional).The DNS domain search list .
 
- DhcpOptions Dictionary<string, string>
- (Optional) Spec for defining DHCP options.
 
- DhcpServer Dictionary<string, string>Address 
- (Optional) Host address.
 
- DhcpServer intAddress Port 
- (Optional) Port Number.
 
- EnableNat 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.
 
- IpConfig List<string>Pool List Ranges 
- -(Optional) Range of IPs.
- IsExternal bool
- (Optional) Whether the subnet is external subnet or not.
 
- Name string
- (Optional) Subnet name (Readonly).
 
- NetworkFunction Dictionary<string, string>Chain Reference 
- (Optional) The reference to a network_function_chain.
 
- OwnerReference Dictionary<string, string>
- (Optional) The reference to a user.
 
- PrefixLength int
- (Optional).
 
- ProjectReference Dictionary<string, string>
- (Optional) The reference to a project.
 
- SubnetIp string
- (Optional) Subnet IP address.
 
- VlanId int
- (Optional). For VLAN subnet.
 
- VpcReference stringUuid 
- VPC reference uuid
- VswitchName string
- (Optional).
 
- SubnetType string
- (Optional). Valid Types are ["VLAN", "OVERLAY"]
 
- AvailabilityZone map[string]stringReference 
- (Optional) The reference to a availability_zone.
 
- Categories
[]SubnetCategory Args 
- (Optional) The categories of the resource.
 
- ClusterUuid string
- (Required) The UUID of the cluster.
 
- DefaultGateway stringIp 
- (Optional) Default gateway IP address.
 
- Description string
- (Optional) A description for subnet.
 
- DhcpDomain []stringName Server Lists 
- (Optional). List of Domain Name Server addresses .
 
- DhcpDomain []stringSearch Lists 
- (Optional).The DNS domain search list .
 
- DhcpOptions map[string]string
- (Optional) Spec for defining DHCP options.
 
- DhcpServer map[string]stringAddress 
- (Optional) Host address.
 
- DhcpServer intAddress Port 
- (Optional) Port Number.
 
- EnableNat 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.
 
- IpConfig []stringPool List Ranges 
- -(Optional) Range of IPs.
- IsExternal bool
- (Optional) Whether the subnet is external subnet or not.
 
- Name string
- (Optional) Subnet name (Readonly).
 
- NetworkFunction map[string]stringChain Reference 
- (Optional) The reference to a network_function_chain.
 
- OwnerReference map[string]string
- (Optional) The reference to a user.
 
- PrefixLength int
- (Optional).
 
- ProjectReference map[string]string
- (Optional) The reference to a project.
 
- SubnetIp string
- (Optional) Subnet IP address.
 
- VlanId int
- (Optional). For VLAN subnet.
 
- VpcReference stringUuid 
- VPC reference uuid
- VswitchName string
- (Optional).
 
- subnetType String
- (Optional). Valid Types are ["VLAN", "OVERLAY"]
 
- availabilityZone Map<String,String>Reference 
- (Optional) The reference to a availability_zone.
 
- categories
List<SubnetCategory> 
- (Optional) The categories of the resource.
 
- clusterUuid String
- (Required) The UUID of the cluster.
 
- defaultGateway StringIp 
- (Optional) Default gateway IP address.
 
- description String
- (Optional) A description for subnet.
 
- dhcpDomain List<String>Name Server Lists 
- (Optional). List of Domain Name Server addresses .
 
- dhcpDomain List<String>Search Lists 
- (Optional).The DNS domain search list .
 
- dhcpOptions Map<String,String>
- (Optional) Spec for defining DHCP options.
 
- dhcpServer Map<String,String>Address 
- (Optional) Host address.
 
- dhcpServer IntegerAddress Port 
- (Optional) Port Number.
 
- enableNat 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.
 
- ipConfig List<String>Pool List Ranges 
- -(Optional) Range of IPs.
- isExternal Boolean
- (Optional) Whether the subnet is external subnet or not.
 
- name String
- (Optional) Subnet name (Readonly).
 
- networkFunction Map<String,String>Chain Reference 
- (Optional) The reference to a network_function_chain.
 
- ownerReference Map<String,String>
- (Optional) The reference to a user.
 
- prefixLength Integer
- (Optional).
 
- projectReference Map<String,String>
- (Optional) The reference to a project.
 
- subnetIp String
- (Optional) Subnet IP address.
 
- vlanId Integer
- (Optional). For VLAN subnet.
 
- vpcReference StringUuid 
- VPC reference uuid
- vswitchName String
- (Optional).
 
- subnetType string
- (Optional). Valid Types are ["VLAN", "OVERLAY"]
 
- availabilityZone {[key: string]: string}Reference 
- (Optional) The reference to a availability_zone.
 
- categories
SubnetCategory[] 
- (Optional) The categories of the resource.
 
- clusterUuid string
- (Required) The UUID of the cluster.
 
- defaultGateway stringIp 
- (Optional) Default gateway IP address.
 
- description string
- (Optional) A description for subnet.
 
- dhcpDomain string[]Name Server Lists 
- (Optional). List of Domain Name Server addresses .
 
- dhcpDomain string[]Search Lists 
- (Optional).The DNS domain search list .
 
- dhcpOptions {[key: string]: string}
- (Optional) Spec for defining DHCP options.
 
- dhcpServer {[key: string]: string}Address 
- (Optional) Host address.
 
- dhcpServer numberAddress Port 
- (Optional) Port Number.
 
- enableNat 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.
 
- ipConfig string[]Pool List Ranges 
- -(Optional) Range of IPs.
- isExternal boolean
- (Optional) Whether the subnet is external subnet or not.
 
- name string
- (Optional) Subnet name (Readonly).
 
- networkFunction {[key: string]: string}Chain Reference 
- (Optional) The reference to a network_function_chain.
 
- ownerReference {[key: string]: string}
- (Optional) The reference to a user.
 
- prefixLength number
- (Optional).
 
- projectReference {[key: string]: string}
- (Optional) The reference to a project.
 
- subnetIp string
- (Optional) Subnet IP address.
 
- vlanId number
- (Optional). For VLAN subnet.
 
- vpcReference stringUuid 
- VPC reference uuid
- vswitchName 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[SubnetCategory 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).
 
- subnetType String
- (Optional). Valid Types are ["VLAN", "OVERLAY"]
 
- availabilityZone Map<String>Reference 
- (Optional) The reference to a availability_zone.
 
- categories List<Property Map>
- (Optional) The categories of the resource.
 
- clusterUuid String
- (Required) The UUID of the cluster.
 
- defaultGateway StringIp 
- (Optional) Default gateway IP address.
 
- description String
- (Optional) A description for subnet.
 
- dhcpDomain List<String>Name Server Lists 
- (Optional). List of Domain Name Server addresses .
 
- dhcpDomain List<String>Search Lists 
- (Optional).The DNS domain search list .
 
- dhcpOptions Map<String>
- (Optional) Spec for defining DHCP options.
 
- dhcpServer Map<String>Address 
- (Optional) Host address.
 
- dhcpServer NumberAddress Port 
- (Optional) Port Number.
 
- enableNat 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.
 
- ipConfig List<String>Pool List Ranges 
- -(Optional) Range of IPs.
- isExternal Boolean
- (Optional) Whether the subnet is external subnet or not.
 
- name String
- (Optional) Subnet name (Readonly).
 
- networkFunction Map<String>Chain Reference 
- (Optional) The reference to a network_function_chain.
 
- ownerReference Map<String>
- (Optional) The reference to a user.
 
- prefixLength Number
- (Optional).
 
- projectReference Map<String>
- (Optional) The reference to a project.
 
- subnetIp String
- (Optional) Subnet IP address.
 
- vlanId Number
- (Optional). For VLAN subnet.
 
- vpcReference StringUuid 
- VPC reference uuid
- vswitchName String
- (Optional).
 
Outputs
All input properties are implicitly available as output properties. Additionally, the Subnet resource produces the following output properties:
- ApiVersion string
- The version of the API.
- ClusterName 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.
 
- ApiVersion string
- The version of the API.
- ClusterName 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.
 
- apiVersion String
- The version of the API.
- clusterName 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.
 
- apiVersion string
- The version of the API.
- clusterName 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.
 
- apiVersion String
- The version of the API.
- clusterName 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) -> Subnetfunc 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)resources:  _:    type: nutanix:Subnet    get:      id: ${id}- 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.
- ApiVersion string
- The version of the API.
- AvailabilityZone Dictionary<string, string>Reference 
- (Optional) The reference to a availability_zone.
 
- Categories
List<PiersKarsenbarg. Nutanix. Inputs. Subnet Category> 
- (Optional) The categories of the resource.
 
- ClusterName string
- ClusterUuid string
- (Required) The UUID of the cluster.
 
- DefaultGateway stringIp 
- (Optional) Default gateway IP address.
 
- Description string
- (Optional) A description for subnet.
 
- DhcpDomain List<string>Name Server Lists 
- (Optional). List of Domain Name Server addresses .
 
- DhcpDomain List<string>Search Lists 
- (Optional).The DNS domain search list .
 
- DhcpOptions Dictionary<string, string>
- (Optional) Spec for defining DHCP options.
 
- DhcpServer Dictionary<string, string>Address 
- (Optional) Host address.
 
- DhcpServer intAddress Port 
- (Optional) Port Number.
 
- EnableNat 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.
 
- IpConfig List<string>Pool List Ranges 
- -(Optional) Range of IPs.
- IsExternal 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).
 
- NetworkFunction Dictionary<string, string>Chain Reference 
- (Optional) The reference to a network_function_chain.
 
- OwnerReference Dictionary<string, string>
- (Optional) The reference to a user.
 
- PrefixLength int
- (Optional).
 
- ProjectReference Dictionary<string, string>
- (Optional) The reference to a project.
 
- State string
- The state of the subnet.
 
- SubnetIp string
- (Optional) Subnet IP address.
 
- SubnetType string
- (Optional). Valid Types are ["VLAN", "OVERLAY"]
 
- VlanId int
- (Optional). For VLAN subnet.
 
- VpcReference stringUuid 
- VPC reference uuid
- VswitchName string
- (Optional).
 
- ApiVersion string
- The version of the API.
- AvailabilityZone map[string]stringReference 
- (Optional) The reference to a availability_zone.
 
- Categories
[]SubnetCategory Args 
- (Optional) The categories of the resource.
 
- ClusterName string
- ClusterUuid string
- (Required) The UUID of the cluster.
 
- DefaultGateway stringIp 
- (Optional) Default gateway IP address.
 
- Description string
- (Optional) A description for subnet.
 
- DhcpDomain []stringName Server Lists 
- (Optional). List of Domain Name Server addresses .
 
- DhcpDomain []stringSearch Lists 
- (Optional).The DNS domain search list .
 
- DhcpOptions map[string]string
- (Optional) Spec for defining DHCP options.
 
- DhcpServer map[string]stringAddress 
- (Optional) Host address.
 
- DhcpServer intAddress Port 
- (Optional) Port Number.
 
- EnableNat 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.
 
- IpConfig []stringPool List Ranges 
- -(Optional) Range of IPs.
- IsExternal 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).
 
- NetworkFunction map[string]stringChain Reference 
- (Optional) The reference to a network_function_chain.
 
- OwnerReference map[string]string
- (Optional) The reference to a user.
 
- PrefixLength int
- (Optional).
 
- ProjectReference map[string]string
- (Optional) The reference to a project.
 
- State string
- The state of the subnet.
 
- SubnetIp string
- (Optional) Subnet IP address.
 
- SubnetType string
- (Optional). Valid Types are ["VLAN", "OVERLAY"]
 
- VlanId int
- (Optional). For VLAN subnet.
 
- VpcReference stringUuid 
- VPC reference uuid
- VswitchName string
- (Optional).
 
- apiVersion String
- The version of the API.
- availabilityZone Map<String,String>Reference 
- (Optional) The reference to a availability_zone.
 
- categories
List<SubnetCategory> 
- (Optional) The categories of the resource.
 
- clusterName String
- clusterUuid String
- (Required) The UUID of the cluster.
 
- defaultGateway StringIp 
- (Optional) Default gateway IP address.
 
- description String
- (Optional) A description for subnet.
 
- dhcpDomain List<String>Name Server Lists 
- (Optional). List of Domain Name Server addresses .
 
- dhcpDomain List<String>Search Lists 
- (Optional).The DNS domain search list .
 
- dhcpOptions Map<String,String>
- (Optional) Spec for defining DHCP options.
 
- dhcpServer Map<String,String>Address 
- (Optional) Host address.
 
- dhcpServer IntegerAddress Port 
- (Optional) Port Number.
 
- enableNat 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.
 
- ipConfig List<String>Pool List Ranges 
- -(Optional) Range of IPs.
- isExternal 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).
 
- networkFunction Map<String,String>Chain Reference 
- (Optional) The reference to a network_function_chain.
 
- ownerReference Map<String,String>
- (Optional) The reference to a user.
 
- prefixLength Integer
- (Optional).
 
- projectReference Map<String,String>
- (Optional) The reference to a project.
 
- state String
- The state of the subnet.
 
- subnetIp String
- (Optional) Subnet IP address.
 
- subnetType String
- (Optional). Valid Types are ["VLAN", "OVERLAY"]
 
- vlanId Integer
- (Optional). For VLAN subnet.
 
- vpcReference StringUuid 
- VPC reference uuid
- vswitchName String
- (Optional).
 
- apiVersion string
- The version of the API.
- availabilityZone {[key: string]: string}Reference 
- (Optional) The reference to a availability_zone.
 
- categories
SubnetCategory[] 
- (Optional) The categories of the resource.
 
- clusterName string
- clusterUuid string
- (Required) The UUID of the cluster.
 
- defaultGateway stringIp 
- (Optional) Default gateway IP address.
 
- description string
- (Optional) A description for subnet.
 
- dhcpDomain string[]Name Server Lists 
- (Optional). List of Domain Name Server addresses .
 
- dhcpDomain string[]Search Lists 
- (Optional).The DNS domain search list .
 
- dhcpOptions {[key: string]: string}
- (Optional) Spec for defining DHCP options.
 
- dhcpServer {[key: string]: string}Address 
- (Optional) Host address.
 
- dhcpServer numberAddress Port 
- (Optional) Port Number.
 
- enableNat 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.
 
- ipConfig string[]Pool List Ranges 
- -(Optional) Range of IPs.
- isExternal 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).
 
- networkFunction {[key: string]: string}Chain Reference 
- (Optional) The reference to a network_function_chain.
 
- ownerReference {[key: string]: string}
- (Optional) The reference to a user.
 
- prefixLength number
- (Optional).
 
- projectReference {[key: string]: string}
- (Optional) The reference to a project.
 
- state string
- The state of the subnet.
 
- subnetIp string
- (Optional) Subnet IP address.
 
- subnetType string
- (Optional). Valid Types are ["VLAN", "OVERLAY"]
 
- vlanId number
- (Optional). For VLAN subnet.
 
- vpcReference stringUuid 
- VPC reference uuid
- vswitchName 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[SubnetCategory 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).
 
- apiVersion String
- The version of the API.
- availabilityZone Map<String>Reference 
- (Optional) The reference to a availability_zone.
 
- categories List<Property Map>
- (Optional) The categories of the resource.
 
- clusterName String
- clusterUuid String
- (Required) The UUID of the cluster.
 
- defaultGateway StringIp 
- (Optional) Default gateway IP address.
 
- description String
- (Optional) A description for subnet.
 
- dhcpDomain List<String>Name Server Lists 
- (Optional). List of Domain Name Server addresses .
 
- dhcpDomain List<String>Search Lists 
- (Optional).The DNS domain search list .
 
- dhcpOptions Map<String>
- (Optional) Spec for defining DHCP options.
 
- dhcpServer Map<String>Address 
- (Optional) Host address.
 
- dhcpServer NumberAddress Port 
- (Optional) Port Number.
 
- enableNat 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.
 
- ipConfig List<String>Pool List Ranges 
- -(Optional) Range of IPs.
- isExternal Boolean
- (Optional) Whether the subnet is external subnet or not.
 
- metadata Map<String>
- (Required) The subnet kind metadata.
 
- name String
- (Optional) Subnet name (Readonly).
 
- networkFunction Map<String>Chain Reference 
- (Optional) The reference to a network_function_chain.
 
- ownerReference Map<String>
- (Optional) The reference to a user.
 
- prefixLength Number
- (Optional).
 
- projectReference Map<String>
- (Optional) The reference to a project.
 
- state String
- The state of the subnet.
 
- subnetIp String
- (Optional) Subnet IP address.
 
- subnetType String
- (Optional). Valid Types are ["VLAN", "OVERLAY"]
 
- vlanId Number
- (Optional). For VLAN subnet.
 
- vpcReference StringUuid 
- VPC reference uuid
- vswitchName 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 nutanixTerraform Provider.
