1. Packages
  2. Nutanix
  3. API Docs
  4. Subnet
Nutanix v0.5.0 published on Monday, Nov 4, 2024 by Piers Karsenbarg

nutanix.Subnet

Explore with Pulumi AI

nutanix logo
Nutanix v0.5.0 published on Monday, Nov 4, 2024 by Piers Karsenbarg

    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"]
    AvailabilityZoneReference Dictionary<string, string>
    • (Optional) The reference to a availability_zone.
    Categories List<PiersKarsenbarg.Nutanix.Inputs.SubnetCategory>
    • (Optional) The categories of the resource.
    ClusterUuid string
    • (Required) The UUID of the cluster.
    DefaultGatewayIp string
    • (Optional) Default gateway IP address.
    Description string
    • (Optional) A description for subnet.
    DhcpDomainNameServerLists List<string>
    • (Optional). List of Domain Name Server addresses .
    DhcpDomainSearchLists List<string>
    • (Optional).The DNS domain search list .
    DhcpOptions Dictionary<string, string>
    • (Optional) Spec for defining DHCP options.
    DhcpServerAddress Dictionary<string, string>
    • (Optional) Host address.
    DhcpServerAddressPort int
    • (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.
    IpConfigPoolListRanges List<string>
    -(Optional) Range of IPs.
    IsExternal bool
    • (Optional) Whether the subnet is external subnet or not.
    Name string
    • (Optional) Subnet name (Readonly).
    NetworkFunctionChainReference Dictionary<string, string>
    • (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.
    VpcReferenceUuid string
    VPC reference uuid
    VswitchName string
    • (Optional).
    SubnetType string
    • (Optional). Valid Types are ["VLAN", "OVERLAY"]
    AvailabilityZoneReference map[string]string
    • (Optional) The reference to a availability_zone.
    Categories []SubnetCategoryArgs
    • (Optional) The categories of the resource.
    ClusterUuid string
    • (Required) The UUID of the cluster.
    DefaultGatewayIp string
    • (Optional) Default gateway IP address.
    Description string
    • (Optional) A description for subnet.
    DhcpDomainNameServerLists []string
    • (Optional). List of Domain Name Server addresses .
    DhcpDomainSearchLists []string
    • (Optional).The DNS domain search list .
    DhcpOptions map[string]string
    • (Optional) Spec for defining DHCP options.
    DhcpServerAddress map[string]string
    • (Optional) Host address.
    DhcpServerAddressPort int
    • (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.
    IpConfigPoolListRanges []string
    -(Optional) Range of IPs.
    IsExternal bool
    • (Optional) Whether the subnet is external subnet or not.
    Name string
    • (Optional) Subnet name (Readonly).
    NetworkFunctionChainReference map[string]string
    • (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.
    VpcReferenceUuid string
    VPC reference uuid
    VswitchName string
    • (Optional).
    subnetType String
    • (Optional). Valid Types are ["VLAN", "OVERLAY"]
    availabilityZoneReference Map<String,String>
    • (Optional) The reference to a availability_zone.
    categories List<SubnetCategory>
    • (Optional) The categories of the resource.
    clusterUuid String
    • (Required) The UUID of the cluster.
    defaultGatewayIp String
    • (Optional) Default gateway IP address.
    description String
    • (Optional) A description for subnet.
    dhcpDomainNameServerLists List<String>
    • (Optional). List of Domain Name Server addresses .
    dhcpDomainSearchLists List<String>
    • (Optional).The DNS domain search list .
    dhcpOptions Map<String,String>
    • (Optional) Spec for defining DHCP options.
    dhcpServerAddress Map<String,String>
    • (Optional) Host address.
    dhcpServerAddressPort Integer
    • (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.
    ipConfigPoolListRanges List<String>
    -(Optional) Range of IPs.
    isExternal Boolean
    • (Optional) Whether the subnet is external subnet or not.
    name String
    • (Optional) Subnet name (Readonly).
    networkFunctionChainReference Map<String,String>
    • (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.
    vpcReferenceUuid String
    VPC reference uuid
    vswitchName String
    • (Optional).
    subnetType string
    • (Optional). Valid Types are ["VLAN", "OVERLAY"]
    availabilityZoneReference {[key: string]: string}
    • (Optional) The reference to a availability_zone.
    categories SubnetCategory[]
    • (Optional) The categories of the resource.
    clusterUuid string
    • (Required) The UUID of the cluster.
    defaultGatewayIp string
    • (Optional) Default gateway IP address.
    description string
    • (Optional) A description for subnet.
    dhcpDomainNameServerLists string[]
    • (Optional). List of Domain Name Server addresses .
    dhcpDomainSearchLists string[]
    • (Optional).The DNS domain search list .
    dhcpOptions {[key: string]: string}
    • (Optional) Spec for defining DHCP options.
    dhcpServerAddress {[key: string]: string}
    • (Optional) Host address.
    dhcpServerAddressPort number
    • (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.
    ipConfigPoolListRanges string[]
    -(Optional) Range of IPs.
    isExternal boolean
    • (Optional) Whether the subnet is external subnet or not.
    name string
    • (Optional) Subnet name (Readonly).
    networkFunctionChainReference {[key: string]: string}
    • (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.
    vpcReferenceUuid string
    VPC reference uuid
    vswitchName string
    • (Optional).
    subnet_type str
    • (Optional). Valid Types are ["VLAN", "OVERLAY"]
    availability_zone_reference Mapping[str, str]
    • (Optional) The reference to a availability_zone.
    categories Sequence[SubnetCategoryArgs]
    • (Optional) The categories of the resource.
    cluster_uuid str
    • (Required) The UUID of the cluster.
    default_gateway_ip str
    • (Optional) Default gateway IP address.
    description str
    • (Optional) A description for subnet.
    dhcp_domain_name_server_lists Sequence[str]
    • (Optional). List of Domain Name Server addresses .
    dhcp_domain_search_lists Sequence[str]
    • (Optional).The DNS domain search list .
    dhcp_options Mapping[str, str]
    • (Optional) Spec for defining DHCP options.
    dhcp_server_address Mapping[str, str]
    • (Optional) Host address.
    dhcp_server_address_port int
    • (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_pool_list_ranges Sequence[str]
    -(Optional) Range of IPs.
    is_external bool
    • (Optional) Whether the subnet is external subnet or not.
    name str
    • (Optional) Subnet name (Readonly).
    network_function_chain_reference Mapping[str, str]
    • (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_uuid str
    VPC reference uuid
    vswitch_name str
    • (Optional).
    subnetType String
    • (Optional). Valid Types are ["VLAN", "OVERLAY"]
    availabilityZoneReference Map<String>
    • (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.
    defaultGatewayIp String
    • (Optional) Default gateway IP address.
    description String
    • (Optional) A description for subnet.
    dhcpDomainNameServerLists List<String>
    • (Optional). List of Domain Name Server addresses .
    dhcpDomainSearchLists List<String>
    • (Optional).The DNS domain search list .
    dhcpOptions Map<String>
    • (Optional) Spec for defining DHCP options.
    dhcpServerAddress Map<String>
    • (Optional) Host address.
    dhcpServerAddressPort Number
    • (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.
    ipConfigPoolListRanges List<String>
    -(Optional) Range of IPs.
    isExternal Boolean
    • (Optional) Whether the subnet is external subnet or not.
    name String
    • (Optional) Subnet name (Readonly).
    networkFunctionChainReference Map<String>
    • (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.
    vpcReferenceUuid String
    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) -> 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.
    The following state arguments are supported:
    ApiVersion string
    The version of the API.
    AvailabilityZoneReference Dictionary<string, string>
    • (Optional) The reference to a availability_zone.
    Categories List<PiersKarsenbarg.Nutanix.Inputs.SubnetCategory>
    • (Optional) The categories of the resource.
    ClusterName string
    ClusterUuid string
    • (Required) The UUID of the cluster.
    DefaultGatewayIp string
    • (Optional) Default gateway IP address.
    Description string
    • (Optional) A description for subnet.
    DhcpDomainNameServerLists List<string>
    • (Optional). List of Domain Name Server addresses .
    DhcpDomainSearchLists List<string>
    • (Optional).The DNS domain search list .
    DhcpOptions Dictionary<string, string>
    • (Optional) Spec for defining DHCP options.
    DhcpServerAddress Dictionary<string, string>
    • (Optional) Host address.
    DhcpServerAddressPort int
    • (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.
    IpConfigPoolListRanges List<string>
    -(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).
    NetworkFunctionChainReference Dictionary<string, string>
    • (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.
    VpcReferenceUuid string
    VPC reference uuid
    VswitchName string
    • (Optional).
    ApiVersion string
    The version of the API.
    AvailabilityZoneReference map[string]string
    • (Optional) The reference to a availability_zone.
    Categories []SubnetCategoryArgs
    • (Optional) The categories of the resource.
    ClusterName string
    ClusterUuid string
    • (Required) The UUID of the cluster.
    DefaultGatewayIp string
    • (Optional) Default gateway IP address.
    Description string
    • (Optional) A description for subnet.
    DhcpDomainNameServerLists []string
    • (Optional). List of Domain Name Server addresses .
    DhcpDomainSearchLists []string
    • (Optional).The DNS domain search list .
    DhcpOptions map[string]string
    • (Optional) Spec for defining DHCP options.
    DhcpServerAddress map[string]string
    • (Optional) Host address.
    DhcpServerAddressPort int
    • (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.
    IpConfigPoolListRanges []string
    -(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).
    NetworkFunctionChainReference map[string]string
    • (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.
    VpcReferenceUuid string
    VPC reference uuid
    VswitchName string
    • (Optional).
    apiVersion String
    The version of the API.
    availabilityZoneReference Map<String,String>
    • (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.
    defaultGatewayIp String
    • (Optional) Default gateway IP address.
    description String
    • (Optional) A description for subnet.
    dhcpDomainNameServerLists List<String>
    • (Optional). List of Domain Name Server addresses .
    dhcpDomainSearchLists List<String>
    • (Optional).The DNS domain search list .
    dhcpOptions Map<String,String>
    • (Optional) Spec for defining DHCP options.
    dhcpServerAddress Map<String,String>
    • (Optional) Host address.
    dhcpServerAddressPort Integer
    • (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.
    ipConfigPoolListRanges List<String>
    -(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).
    networkFunctionChainReference Map<String,String>
    • (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.
    vpcReferenceUuid String
    VPC reference uuid
    vswitchName String
    • (Optional).
    apiVersion string
    The version of the API.
    availabilityZoneReference {[key: string]: string}
    • (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.
    defaultGatewayIp string
    • (Optional) Default gateway IP address.
    description string
    • (Optional) A description for subnet.
    dhcpDomainNameServerLists string[]
    • (Optional). List of Domain Name Server addresses .
    dhcpDomainSearchLists string[]
    • (Optional).The DNS domain search list .
    dhcpOptions {[key: string]: string}
    • (Optional) Spec for defining DHCP options.
    dhcpServerAddress {[key: string]: string}
    • (Optional) Host address.
    dhcpServerAddressPort number
    • (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.
    ipConfigPoolListRanges string[]
    -(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).
    networkFunctionChainReference {[key: string]: string}
    • (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.
    vpcReferenceUuid string
    VPC reference uuid
    vswitchName string
    • (Optional).
    api_version str
    The version of the API.
    availability_zone_reference Mapping[str, str]
    • (Optional) The reference to a availability_zone.
    categories Sequence[SubnetCategoryArgs]
    • (Optional) The categories of the resource.
    cluster_name str
    cluster_uuid str
    • (Required) The UUID of the cluster.
    default_gateway_ip str
    • (Optional) Default gateway IP address.
    description str
    • (Optional) A description for subnet.
    dhcp_domain_name_server_lists Sequence[str]
    • (Optional). List of Domain Name Server addresses .
    dhcp_domain_search_lists Sequence[str]
    • (Optional).The DNS domain search list .
    dhcp_options Mapping[str, str]
    • (Optional) Spec for defining DHCP options.
    dhcp_server_address Mapping[str, str]
    • (Optional) Host address.
    dhcp_server_address_port int
    • (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_pool_list_ranges Sequence[str]
    -(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_chain_reference Mapping[str, str]
    • (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_uuid str
    VPC reference uuid
    vswitch_name str
    • (Optional).
    apiVersion String
    The version of the API.
    availabilityZoneReference Map<String>
    • (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.
    defaultGatewayIp String
    • (Optional) Default gateway IP address.
    description String
    • (Optional) A description for subnet.
    dhcpDomainNameServerLists List<String>
    • (Optional). List of Domain Name Server addresses .
    dhcpDomainSearchLists List<String>
    • (Optional).The DNS domain search list .
    dhcpOptions Map<String>
    • (Optional) Spec for defining DHCP options.
    dhcpServerAddress Map<String>
    • (Optional) Host address.
    dhcpServerAddressPort Number
    • (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.
    ipConfigPoolListRanges List<String>
    -(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).
    networkFunctionChainReference Map<String>
    • (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.
    vpcReferenceUuid String
    VPC reference uuid
    vswitchName String
    • (Optional).

    Supporting Types

    SubnetCategory, SubnetCategoryArgs

    Name string
    • (Optional) Subnet name (Readonly).
    Value string
    • value of the key.
    Name string
    • (Optional) Subnet name (Readonly).
    Value string
    • value of the key.
    name String
    • (Optional) Subnet name (Readonly).
    value String
    • value of the key.
    name string
    • (Optional) Subnet name (Readonly).
    value string
    • value of the key.
    name str
    • (Optional) Subnet name (Readonly).
    value str
    • value of the key.
    name String
    • (Optional) Subnet name (Readonly).
    value String
    • value of the key.

    Package Details

    Repository
    nutanix pierskarsenbarg/pulumi-nutanix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the nutanix Terraform Provider.
    nutanix logo
    Nutanix v0.5.0 published on Monday, Nov 4, 2024 by Piers Karsenbarg