title: "Subnet" title_tag: "huaweicloud.Vpc.Subnet" meta_desc: "Documentation for the huaweicloud.Vpc.Subnet resource with examples, input properties, output properties, lookup functions, and supporting types." layout: api no_edit_this_page: true
Provides a VPC subnet resource within HuaweiCloud.
Create Subnet Resource {#create}
new Subnet(name: string, args: SubnetArgs, opts?: CustomResourceOptions);
@overload
def Subnet(resource_name: str,
opts: Optional[ResourceOptions] = None,
availability_zone: Optional[str] = None,
cidr: Optional[str] = None,
description: Optional[str] = None,
dhcp_enable: Optional[bool] = None,
dns_lists: Optional[Sequence[str]] = None,
gateway_ip: Optional[str] = None,
ipv6_enable: Optional[bool] = None,
name: Optional[str] = None,
primary_dns: Optional[str] = None,
region: Optional[str] = None,
secondary_dns: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
vpc_id: Optional[str] = None)
@overload
def Subnet(resource_name: str,
args: SubnetArgs,
opts: Optional[ResourceOptions] = 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: huaweicloud:Vpc:Subnet
properties: # The arguments to resource properties.
options: # 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.
- 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.
Subnet Resource Properties {#properties}
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Subnet resource accepts the following input properties:
- Cidr string
- Specifies the network segment on which the subnet resides. The value must be in CIDR format and within the CIDR block of the VPC. The subnet mask cannot be greater than 28. Changing this creates a new Subnet.
-
Gateway
Ip string - Specifies the gateway of the subnet. The value must be a valid IP address in the subnet segment. Changing this creates a new Subnet.
-
Vpc
Id string - Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new Subnet.
-
Availability
Zone string - Specifies the availability zone (AZ) to which the subnet belongs. The value must be an existing AZ in the system. Changing this creates a new Subnet.
- Description string
Specifies supplementary information about the subnet. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
-
Dhcp
Enable bool - Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
-
Dns
Lists List<string> - Specifies the DNS server address list of a subnet. This field is required if you need to use more than two DNS servers. This parameter value is the superset of both DNS server address 1 and DNS server address 2.
- Ipv6Enable bool
- Specifies whether the IPv6 function is enabled for the subnet. Defaults to false.
- Name string
- Specifies the subnet name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), and hyphens (-).
-
Primary
Dns string - Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
- Region string
Specifies tThe region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new Subnet.
-
Secondary
Dns string - Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
- Dictionary<string, string>
The key/value pairs to associate with the subnet.
- Cidr string
- Specifies the network segment on which the subnet resides. The value must be in CIDR format and within the CIDR block of the VPC. The subnet mask cannot be greater than 28. Changing this creates a new Subnet.
-
Gateway
Ip string - Specifies the gateway of the subnet. The value must be a valid IP address in the subnet segment. Changing this creates a new Subnet.
-
Vpc
Id string - Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new Subnet.
-
Availability
Zone string - Specifies the availability zone (AZ) to which the subnet belongs. The value must be an existing AZ in the system. Changing this creates a new Subnet.
- Description string
Specifies supplementary information about the subnet. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
-
Dhcp
Enable bool - Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
-
Dns
Lists []string - Specifies the DNS server address list of a subnet. This field is required if you need to use more than two DNS servers. This parameter value is the superset of both DNS server address 1 and DNS server address 2.
- Ipv6Enable bool
- Specifies whether the IPv6 function is enabled for the subnet. Defaults to false.
- Name string
- Specifies the subnet name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), and hyphens (-).
-
Primary
Dns string - Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
- Region string
Specifies tThe region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new Subnet.
-
Secondary
Dns string - Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
- map[string]string
The key/value pairs to associate with the subnet.
- cidr String
- Specifies the network segment on which the subnet resides. The value must be in CIDR format and within the CIDR block of the VPC. The subnet mask cannot be greater than 28. Changing this creates a new Subnet.
-
gateway
Ip String - Specifies the gateway of the subnet. The value must be a valid IP address in the subnet segment. Changing this creates a new Subnet.
-
vpc
Id String - Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new Subnet.
-
availability
Zone String - Specifies the availability zone (AZ) to which the subnet belongs. The value must be an existing AZ in the system. Changing this creates a new Subnet.
- description String
Specifies supplementary information about the subnet. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
-
dhcp
Enable Boolean - Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
-
dns
Lists List<String> - Specifies the DNS server address list of a subnet. This field is required if you need to use more than two DNS servers. This parameter value is the superset of both DNS server address 1 and DNS server address 2.
- ipv6Enable Boolean
- Specifies whether the IPv6 function is enabled for the subnet. Defaults to false.
- name String
- Specifies the subnet name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), and hyphens (-).
-
primary
Dns String - Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
- region String
Specifies tThe region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new Subnet.
-
secondary
Dns String - Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
- Map<String,String>
The key/value pairs to associate with the subnet.
- cidr string
- Specifies the network segment on which the subnet resides. The value must be in CIDR format and within the CIDR block of the VPC. The subnet mask cannot be greater than 28. Changing this creates a new Subnet.
-
gateway
Ip string - Specifies the gateway of the subnet. The value must be a valid IP address in the subnet segment. Changing this creates a new Subnet.
-
vpc
Id string - Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new Subnet.
-
availability
Zone string - Specifies the availability zone (AZ) to which the subnet belongs. The value must be an existing AZ in the system. Changing this creates a new Subnet.
- description string
Specifies supplementary information about the subnet. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
-
dhcp
Enable boolean - Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
-
dns
Lists string[] - Specifies the DNS server address list of a subnet. This field is required if you need to use more than two DNS servers. This parameter value is the superset of both DNS server address 1 and DNS server address 2.
- ipv6Enable boolean
- Specifies whether the IPv6 function is enabled for the subnet. Defaults to false.
- name string
- Specifies the subnet name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), and hyphens (-).
-
primary
Dns string - Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
- region string
Specifies tThe region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new Subnet.
-
secondary
Dns string - Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
- {[key: string]: string}
The key/value pairs to associate with the subnet.
- cidr str
- Specifies the network segment on which the subnet resides. The value must be in CIDR format and within the CIDR block of the VPC. The subnet mask cannot be greater than 28. Changing this creates a new Subnet.
-
gateway_
ip str - Specifies the gateway of the subnet. The value must be a valid IP address in the subnet segment. Changing this creates a new Subnet.
-
vpc_
id str - Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new Subnet.
-
availability_
zone str - Specifies the availability zone (AZ) to which the subnet belongs. The value must be an existing AZ in the system. Changing this creates a new Subnet.
- description str
Specifies supplementary information about the subnet. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
-
dhcp_
enable bool - Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
-
dns_
lists Sequence[str] - Specifies the DNS server address list of a subnet. This field is required if you need to use more than two DNS servers. This parameter value is the superset of both DNS server address 1 and DNS server address 2.
-
ipv6_
enable bool - Specifies whether the IPv6 function is enabled for the subnet. Defaults to false.
- name str
- Specifies the subnet name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), and hyphens (-).
-
primary_
dns str - Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
- region str
Specifies tThe region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new Subnet.
-
secondary_
dns str - Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
- Mapping[str, str]
The key/value pairs to associate with the subnet.
- cidr String
- Specifies the network segment on which the subnet resides. The value must be in CIDR format and within the CIDR block of the VPC. The subnet mask cannot be greater than 28. Changing this creates a new Subnet.
-
gateway
Ip String - Specifies the gateway of the subnet. The value must be a valid IP address in the subnet segment. Changing this creates a new Subnet.
-
vpc
Id String - Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new Subnet.
-
availability
Zone String - Specifies the availability zone (AZ) to which the subnet belongs. The value must be an existing AZ in the system. Changing this creates a new Subnet.
- description String
Specifies supplementary information about the subnet. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
-
dhcp
Enable Boolean - Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
-
dns
Lists List<String> - Specifies the DNS server address list of a subnet. This field is required if you need to use more than two DNS servers. This parameter value is the superset of both DNS server address 1 and DNS server address 2.
- ipv6Enable Boolean
- Specifies whether the IPv6 function is enabled for the subnet. Defaults to false.
- name String
- Specifies the subnet name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), and hyphens (-).
-
primary
Dns String - Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
- region String
Specifies tThe region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new Subnet.
-
secondary
Dns String - Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
- Map<String>
The key/value pairs to associate with the subnet.
Outputs
All input properties are implicitly available as output properties. Additionally, the Subnet resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
-
Ipv4Subnet
Id string The ID of the IPv4 subnet (Native OpenStack API).
- Ipv6Cidr string
The IPv6 subnet CIDR block.
- Ipv6Gateway string
The IPv6 subnet gateway.
-
Ipv6Subnet
Id string The ID of the IPv6 subnet (Native OpenStack API).
-
Subnet
Id string schema: Deprecated
- Id string
The provider-assigned unique ID for this managed resource.
-
Ipv4Subnet
Id string The ID of the IPv4 subnet (Native OpenStack API).
- Ipv6Cidr string
The IPv6 subnet CIDR block.
- Ipv6Gateway string
The IPv6 subnet gateway.
-
Ipv6Subnet
Id string The ID of the IPv6 subnet (Native OpenStack API).
-
Subnet
Id string schema: Deprecated
- id String
The provider-assigned unique ID for this managed resource.
-
ipv4Subnet
Id String The ID of the IPv4 subnet (Native OpenStack API).
- ipv6Cidr String
The IPv6 subnet CIDR block.
- ipv6Gateway String
The IPv6 subnet gateway.
-
ipv6Subnet
Id String The ID of the IPv6 subnet (Native OpenStack API).
-
subnet
Id String schema: Deprecated
- id string
The provider-assigned unique ID for this managed resource.
-
ipv4Subnet
Id string The ID of the IPv4 subnet (Native OpenStack API).
- ipv6Cidr string
The IPv6 subnet CIDR block.
- ipv6Gateway string
The IPv6 subnet gateway.
-
ipv6Subnet
Id string The ID of the IPv6 subnet (Native OpenStack API).
-
subnet
Id string schema: Deprecated
- id str
The provider-assigned unique ID for this managed resource.
-
ipv4_
subnet_ strid The ID of the IPv4 subnet (Native OpenStack API).
-
ipv6_
cidr str The IPv6 subnet CIDR block.
-
ipv6_
gateway str The IPv6 subnet gateway.
-
ipv6_
subnet_ strid The ID of the IPv6 subnet (Native OpenStack API).
-
subnet_
id str schema: Deprecated
- id String
The provider-assigned unique ID for this managed resource.
-
ipv4Subnet
Id String The ID of the IPv4 subnet (Native OpenStack API).
- ipv6Cidr String
The IPv6 subnet CIDR block.
- ipv6Gateway String
The IPv6 subnet gateway.
-
ipv6Subnet
Id String The ID of the IPv6 subnet (Native OpenStack API).
-
subnet
Id String schema: Deprecated
Look up Existing Subnet Resource {#look-up}
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,
availability_zone: Optional[str] = None,
cidr: Optional[str] = None,
description: Optional[str] = None,
dhcp_enable: Optional[bool] = None,
dns_lists: Optional[Sequence[str]] = None,
gateway_ip: Optional[str] = None,
ipv4_subnet_id: Optional[str] = None,
ipv6_cidr: Optional[str] = None,
ipv6_enable: Optional[bool] = None,
ipv6_gateway: Optional[str] = None,
ipv6_subnet_id: Optional[str] = None,
name: Optional[str] = None,
primary_dns: Optional[str] = None,
region: Optional[str] = None,
secondary_dns: Optional[str] = None,
subnet_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
vpc_id: 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.
-
Availability
Zone string - Specifies the availability zone (AZ) to which the subnet belongs. The value must be an existing AZ in the system. Changing this creates a new Subnet.
- Cidr string
- Specifies the network segment on which the subnet resides. The value must be in CIDR format and within the CIDR block of the VPC. The subnet mask cannot be greater than 28. Changing this creates a new Subnet.
- Description string
Specifies supplementary information about the subnet. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
-
Dhcp
Enable bool - Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
-
Dns
Lists List<string> - Specifies the DNS server address list of a subnet. This field is required if you need to use more than two DNS servers. This parameter value is the superset of both DNS server address 1 and DNS server address 2.
-
Gateway
Ip string - Specifies the gateway of the subnet. The value must be a valid IP address in the subnet segment. Changing this creates a new Subnet.
-
Ipv4Subnet
Id string The ID of the IPv4 subnet (Native OpenStack API).
- Ipv6Cidr string
The IPv6 subnet CIDR block.
- Ipv6Enable bool
- Specifies whether the IPv6 function is enabled for the subnet. Defaults to false.
- Ipv6Gateway string
The IPv6 subnet gateway.
-
Ipv6Subnet
Id string The ID of the IPv6 subnet (Native OpenStack API).
- Name string
- Specifies the subnet name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), and hyphens (-).
-
Primary
Dns string - Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
- Region string
Specifies tThe region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new Subnet.
-
Secondary
Dns string - Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
-
Subnet
Id string schema: Deprecated
- Dictionary<string, string>
The key/value pairs to associate with the subnet.
-
Vpc
Id string - Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new Subnet.
-
Availability
Zone string - Specifies the availability zone (AZ) to which the subnet belongs. The value must be an existing AZ in the system. Changing this creates a new Subnet.
- Cidr string
- Specifies the network segment on which the subnet resides. The value must be in CIDR format and within the CIDR block of the VPC. The subnet mask cannot be greater than 28. Changing this creates a new Subnet.
- Description string
Specifies supplementary information about the subnet. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
-
Dhcp
Enable bool - Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
-
Dns
Lists []string - Specifies the DNS server address list of a subnet. This field is required if you need to use more than two DNS servers. This parameter value is the superset of both DNS server address 1 and DNS server address 2.
-
Gateway
Ip string - Specifies the gateway of the subnet. The value must be a valid IP address in the subnet segment. Changing this creates a new Subnet.
-
Ipv4Subnet
Id string The ID of the IPv4 subnet (Native OpenStack API).
- Ipv6Cidr string
The IPv6 subnet CIDR block.
- Ipv6Enable bool
- Specifies whether the IPv6 function is enabled for the subnet. Defaults to false.
- Ipv6Gateway string
The IPv6 subnet gateway.
-
Ipv6Subnet
Id string The ID of the IPv6 subnet (Native OpenStack API).
- Name string
- Specifies the subnet name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), and hyphens (-).
-
Primary
Dns string - Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
- Region string
Specifies tThe region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new Subnet.
-
Secondary
Dns string - Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
-
Subnet
Id string schema: Deprecated
- map[string]string
The key/value pairs to associate with the subnet.
-
Vpc
Id string - Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new Subnet.
-
availability
Zone String - Specifies the availability zone (AZ) to which the subnet belongs. The value must be an existing AZ in the system. Changing this creates a new Subnet.
- cidr String
- Specifies the network segment on which the subnet resides. The value must be in CIDR format and within the CIDR block of the VPC. The subnet mask cannot be greater than 28. Changing this creates a new Subnet.
- description String
Specifies supplementary information about the subnet. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
-
dhcp
Enable Boolean - Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
-
dns
Lists List<String> - Specifies the DNS server address list of a subnet. This field is required if you need to use more than two DNS servers. This parameter value is the superset of both DNS server address 1 and DNS server address 2.
-
gateway
Ip String - Specifies the gateway of the subnet. The value must be a valid IP address in the subnet segment. Changing this creates a new Subnet.
-
ipv4Subnet
Id String The ID of the IPv4 subnet (Native OpenStack API).
- ipv6Cidr String
The IPv6 subnet CIDR block.
- ipv6Enable Boolean
- Specifies whether the IPv6 function is enabled for the subnet. Defaults to false.
- ipv6Gateway String
The IPv6 subnet gateway.
-
ipv6Subnet
Id String The ID of the IPv6 subnet (Native OpenStack API).
- name String
- Specifies the subnet name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), and hyphens (-).
-
primary
Dns String - Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
- region String
Specifies tThe region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new Subnet.
-
secondary
Dns String - Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
-
subnet
Id String schema: Deprecated
- Map<String,String>
The key/value pairs to associate with the subnet.
-
vpc
Id String - Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new Subnet.
-
availability
Zone string - Specifies the availability zone (AZ) to which the subnet belongs. The value must be an existing AZ in the system. Changing this creates a new Subnet.
- cidr string
- Specifies the network segment on which the subnet resides. The value must be in CIDR format and within the CIDR block of the VPC. The subnet mask cannot be greater than 28. Changing this creates a new Subnet.
- description string
Specifies supplementary information about the subnet. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
-
dhcp
Enable boolean - Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
-
dns
Lists string[] - Specifies the DNS server address list of a subnet. This field is required if you need to use more than two DNS servers. This parameter value is the superset of both DNS server address 1 and DNS server address 2.
-
gateway
Ip string - Specifies the gateway of the subnet. The value must be a valid IP address in the subnet segment. Changing this creates a new Subnet.
-
ipv4Subnet
Id string The ID of the IPv4 subnet (Native OpenStack API).
- ipv6Cidr string
The IPv6 subnet CIDR block.
- ipv6Enable boolean
- Specifies whether the IPv6 function is enabled for the subnet. Defaults to false.
- ipv6Gateway string
The IPv6 subnet gateway.
-
ipv6Subnet
Id string The ID of the IPv6 subnet (Native OpenStack API).
- name string
- Specifies the subnet name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), and hyphens (-).
-
primary
Dns string - Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
- region string
Specifies tThe region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new Subnet.
-
secondary
Dns string - Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
-
subnet
Id string schema: Deprecated
- {[key: string]: string}
The key/value pairs to associate with the subnet.
-
vpc
Id string - Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new Subnet.
-
availability_
zone str - Specifies the availability zone (AZ) to which the subnet belongs. The value must be an existing AZ in the system. Changing this creates a new Subnet.
- cidr str
- Specifies the network segment on which the subnet resides. The value must be in CIDR format and within the CIDR block of the VPC. The subnet mask cannot be greater than 28. Changing this creates a new Subnet.
- description str
Specifies supplementary information about the subnet. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
-
dhcp_
enable bool - Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
-
dns_
lists Sequence[str] - Specifies the DNS server address list of a subnet. This field is required if you need to use more than two DNS servers. This parameter value is the superset of both DNS server address 1 and DNS server address 2.
-
gateway_
ip str - Specifies the gateway of the subnet. The value must be a valid IP address in the subnet segment. Changing this creates a new Subnet.
-
ipv4_
subnet_ strid The ID of the IPv4 subnet (Native OpenStack API).
-
ipv6_
cidr str The IPv6 subnet CIDR block.
-
ipv6_
enable bool - Specifies whether the IPv6 function is enabled for the subnet. Defaults to false.
-
ipv6_
gateway str The IPv6 subnet gateway.
-
ipv6_
subnet_ strid The ID of the IPv6 subnet (Native OpenStack API).
- name str
- Specifies the subnet name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), and hyphens (-).
-
primary_
dns str - Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
- region str
Specifies tThe region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new Subnet.
-
secondary_
dns str - Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
-
subnet_
id str schema: Deprecated
- Mapping[str, str]
The key/value pairs to associate with the subnet.
-
vpc_
id str - Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new Subnet.
-
availability
Zone String - Specifies the availability zone (AZ) to which the subnet belongs. The value must be an existing AZ in the system. Changing this creates a new Subnet.
- cidr String
- Specifies the network segment on which the subnet resides. The value must be in CIDR format and within the CIDR block of the VPC. The subnet mask cannot be greater than 28. Changing this creates a new Subnet.
- description String
Specifies supplementary information about the subnet. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
-
dhcp
Enable Boolean - Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
-
dns
Lists List<String> - Specifies the DNS server address list of a subnet. This field is required if you need to use more than two DNS servers. This parameter value is the superset of both DNS server address 1 and DNS server address 2.
-
gateway
Ip String - Specifies the gateway of the subnet. The value must be a valid IP address in the subnet segment. Changing this creates a new Subnet.
-
ipv4Subnet
Id String The ID of the IPv4 subnet (Native OpenStack API).
- ipv6Cidr String
The IPv6 subnet CIDR block.
- ipv6Enable Boolean
- Specifies whether the IPv6 function is enabled for the subnet. Defaults to false.
- ipv6Gateway String
The IPv6 subnet gateway.
-
ipv6Subnet
Id String The ID of the IPv6 subnet (Native OpenStack API).
- name String
- Specifies the subnet name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), and hyphens (-).
-
primary
Dns String - Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
- region String
Specifies tThe region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new Subnet.
-
secondary
Dns String - Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
-
subnet
Id String schema: Deprecated
- Map<String>
The key/value pairs to associate with the subnet.
-
vpc
Id String - Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new Subnet.
Import
Subnets can be imported using the subnet Network ID
, e.g.
$ pulumi import huaweicloud:Vpc/subnet:Subnet huaweicloud_vpc_subnet 4779ab1c-7c1a-44b1-a02e-93dfc361b32d
Package Details
- Repository
- https://github.com/huaweicloud/pulumi-huaweicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
huaweicloud
Terraform Provider.