1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. VpcSubnetV1
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.VpcSubnetV1

Explore with Pulumi AI

flexibleengine logo
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

    Provides a VPC subnet resource within FlexibleEngine.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const exampleVpc = new flexibleengine.VpcV1("exampleVpc", {cidr: "192.168.0.0/16"});
    const exampleSubnet = new flexibleengine.VpcSubnetV1("exampleSubnet", {
        cidr: "192.168.0.0/24",
        gatewayIp: "192.168.0.1",
        vpcId: exampleVpc.vpcV1Id,
    });
    const exampleSubnetWithTags = new flexibleengine.VpcSubnetV1("exampleSubnetWithTags", {
        cidr: "192.168.0.0/24",
        gatewayIp: "192.168.0.1",
        vpcId: exampleVpc.vpcV1Id,
        tags: {
            foo: "bar",
            key: "value",
        },
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    example_vpc = flexibleengine.VpcV1("exampleVpc", cidr="192.168.0.0/16")
    example_subnet = flexibleengine.VpcSubnetV1("exampleSubnet",
        cidr="192.168.0.0/24",
        gateway_ip="192.168.0.1",
        vpc_id=example_vpc.vpc_v1_id)
    example_subnet_with_tags = flexibleengine.VpcSubnetV1("exampleSubnetWithTags",
        cidr="192.168.0.0/24",
        gateway_ip="192.168.0.1",
        vpc_id=example_vpc.vpc_v1_id,
        tags={
            "foo": "bar",
            "key": "value",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleVpc, err := flexibleengine.NewVpcV1(ctx, "exampleVpc", &flexibleengine.VpcV1Args{
    			Cidr: pulumi.String("192.168.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = flexibleengine.NewVpcSubnetV1(ctx, "exampleSubnet", &flexibleengine.VpcSubnetV1Args{
    			Cidr:      pulumi.String("192.168.0.0/24"),
    			GatewayIp: pulumi.String("192.168.0.1"),
    			VpcId:     exampleVpc.VpcV1Id,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = flexibleengine.NewVpcSubnetV1(ctx, "exampleSubnetWithTags", &flexibleengine.VpcSubnetV1Args{
    			Cidr:      pulumi.String("192.168.0.0/24"),
    			GatewayIp: pulumi.String("192.168.0.1"),
    			VpcId:     exampleVpc.VpcV1Id,
    			Tags: pulumi.StringMap{
    				"foo": pulumi.String("bar"),
    				"key": pulumi.String("value"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleVpc = new Flexibleengine.VpcV1("exampleVpc", new()
        {
            Cidr = "192.168.0.0/16",
        });
    
        var exampleSubnet = new Flexibleengine.VpcSubnetV1("exampleSubnet", new()
        {
            Cidr = "192.168.0.0/24",
            GatewayIp = "192.168.0.1",
            VpcId = exampleVpc.VpcV1Id,
        });
    
        var exampleSubnetWithTags = new Flexibleengine.VpcSubnetV1("exampleSubnetWithTags", new()
        {
            Cidr = "192.168.0.0/24",
            GatewayIp = "192.168.0.1",
            VpcId = exampleVpc.VpcV1Id,
            Tags = 
            {
                { "foo", "bar" },
                { "key", "value" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.VpcV1;
    import com.pulumi.flexibleengine.VpcV1Args;
    import com.pulumi.flexibleengine.VpcSubnetV1;
    import com.pulumi.flexibleengine.VpcSubnetV1Args;
    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) {
            var exampleVpc = new VpcV1("exampleVpc", VpcV1Args.builder()
                .cidr("192.168.0.0/16")
                .build());
    
            var exampleSubnet = new VpcSubnetV1("exampleSubnet", VpcSubnetV1Args.builder()
                .cidr("192.168.0.0/24")
                .gatewayIp("192.168.0.1")
                .vpcId(exampleVpc.vpcV1Id())
                .build());
    
            var exampleSubnetWithTags = new VpcSubnetV1("exampleSubnetWithTags", VpcSubnetV1Args.builder()
                .cidr("192.168.0.0/24")
                .gatewayIp("192.168.0.1")
                .vpcId(exampleVpc.vpcV1Id())
                .tags(Map.ofEntries(
                    Map.entry("foo", "bar"),
                    Map.entry("key", "value")
                ))
                .build());
    
        }
    }
    
    resources:
      exampleVpc:
        type: flexibleengine:VpcV1
        properties:
          cidr: 192.168.0.0/16
      exampleSubnet:
        type: flexibleengine:VpcSubnetV1
        properties:
          cidr: 192.168.0.0/24
          gatewayIp: 192.168.0.1
          vpcId: ${exampleVpc.vpcV1Id}
      exampleSubnetWithTags:
        type: flexibleengine:VpcSubnetV1
        properties:
          cidr: 192.168.0.0/24
          gatewayIp: 192.168.0.1
          vpcId: ${exampleVpc.vpcV1Id}
          tags:
            foo: bar
            key: value
    

    Create VpcSubnetV1 Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new VpcSubnetV1(name: string, args: VpcSubnetV1Args, opts?: CustomResourceOptions);
    @overload
    def VpcSubnetV1(resource_name: str,
                    args: VpcSubnetV1Args,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpcSubnetV1(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    gateway_ip: Optional[str] = None,
                    cidr: Optional[str] = None,
                    vpc_id: Optional[str] = None,
                    name: Optional[str] = None,
                    primary_dns: Optional[str] = None,
                    dns_lists: Optional[Sequence[str]] = None,
                    dhcp_enable: Optional[bool] = None,
                    ipv6_enable: Optional[bool] = None,
                    availability_zone: Optional[str] = None,
                    ntp_server_address: Optional[str] = None,
                    dhcp_lease_time: Optional[str] = None,
                    region: Optional[str] = None,
                    secondary_dns: Optional[str] = None,
                    tags: Optional[Mapping[str, str]] = None,
                    timeouts: Optional[VpcSubnetV1TimeoutsArgs] = None,
                    description: Optional[str] = None,
                    vpc_subnet_v1_id: Optional[str] = None)
    func NewVpcSubnetV1(ctx *Context, name string, args VpcSubnetV1Args, opts ...ResourceOption) (*VpcSubnetV1, error)
    public VpcSubnetV1(string name, VpcSubnetV1Args args, CustomResourceOptions? opts = null)
    public VpcSubnetV1(String name, VpcSubnetV1Args args)
    public VpcSubnetV1(String name, VpcSubnetV1Args args, CustomResourceOptions options)
    
    type: flexibleengine:VpcSubnetV1
    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 VpcSubnetV1Args
    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 VpcSubnetV1Args
    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 VpcSubnetV1Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcSubnetV1Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcSubnetV1Args
    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 vpcSubnetV1Resource = new Flexibleengine.VpcSubnetV1("vpcSubnetV1Resource", new()
    {
        GatewayIp = "string",
        Cidr = "string",
        VpcId = "string",
        Name = "string",
        PrimaryDns = "string",
        DnsLists = new[]
        {
            "string",
        },
        DhcpEnable = false,
        Ipv6Enable = false,
        AvailabilityZone = "string",
        NtpServerAddress = "string",
        DhcpLeaseTime = "string",
        Region = "string",
        SecondaryDns = "string",
        Tags = 
        {
            { "string", "string" },
        },
        Timeouts = new Flexibleengine.Inputs.VpcSubnetV1TimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
        Description = "string",
        VpcSubnetV1Id = "string",
    });
    
    example, err := flexibleengine.NewVpcSubnetV1(ctx, "vpcSubnetV1Resource", &flexibleengine.VpcSubnetV1Args{
    	GatewayIp:  pulumi.String("string"),
    	Cidr:       pulumi.String("string"),
    	VpcId:      pulumi.String("string"),
    	Name:       pulumi.String("string"),
    	PrimaryDns: pulumi.String("string"),
    	DnsLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	DhcpEnable:       pulumi.Bool(false),
    	Ipv6Enable:       pulumi.Bool(false),
    	AvailabilityZone: pulumi.String("string"),
    	NtpServerAddress: pulumi.String("string"),
    	DhcpLeaseTime:    pulumi.String("string"),
    	Region:           pulumi.String("string"),
    	SecondaryDns:     pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Timeouts: &flexibleengine.VpcSubnetV1TimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    	Description:   pulumi.String("string"),
    	VpcSubnetV1Id: pulumi.String("string"),
    })
    
    var vpcSubnetV1Resource = new VpcSubnetV1("vpcSubnetV1Resource", VpcSubnetV1Args.builder()
        .gatewayIp("string")
        .cidr("string")
        .vpcId("string")
        .name("string")
        .primaryDns("string")
        .dnsLists("string")
        .dhcpEnable(false)
        .ipv6Enable(false)
        .availabilityZone("string")
        .ntpServerAddress("string")
        .dhcpLeaseTime("string")
        .region("string")
        .secondaryDns("string")
        .tags(Map.of("string", "string"))
        .timeouts(VpcSubnetV1TimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .description("string")
        .vpcSubnetV1Id("string")
        .build());
    
    vpc_subnet_v1_resource = flexibleengine.VpcSubnetV1("vpcSubnetV1Resource",
        gateway_ip="string",
        cidr="string",
        vpc_id="string",
        name="string",
        primary_dns="string",
        dns_lists=["string"],
        dhcp_enable=False,
        ipv6_enable=False,
        availability_zone="string",
        ntp_server_address="string",
        dhcp_lease_time="string",
        region="string",
        secondary_dns="string",
        tags={
            "string": "string",
        },
        timeouts={
            "create": "string",
            "delete": "string",
        },
        description="string",
        vpc_subnet_v1_id="string")
    
    const vpcSubnetV1Resource = new flexibleengine.VpcSubnetV1("vpcSubnetV1Resource", {
        gatewayIp: "string",
        cidr: "string",
        vpcId: "string",
        name: "string",
        primaryDns: "string",
        dnsLists: ["string"],
        dhcpEnable: false,
        ipv6Enable: false,
        availabilityZone: "string",
        ntpServerAddress: "string",
        dhcpLeaseTime: "string",
        region: "string",
        secondaryDns: "string",
        tags: {
            string: "string",
        },
        timeouts: {
            create: "string",
            "delete": "string",
        },
        description: "string",
        vpcSubnetV1Id: "string",
    });
    
    type: flexibleengine:VpcSubnetV1
    properties:
        availabilityZone: string
        cidr: string
        description: string
        dhcpEnable: false
        dhcpLeaseTime: string
        dnsLists:
            - string
        gatewayIp: string
        ipv6Enable: false
        name: string
        ntpServerAddress: string
        primaryDns: string
        region: string
        secondaryDns: string
        tags:
            string: string
        timeouts:
            create: string
            delete: string
        vpcId: string
        vpcSubnetV1Id: string
    

    VpcSubnetV1 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 VpcSubnetV1 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.
    GatewayIp 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.
    VpcId string
    Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new subnet.
    AvailabilityZone 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
    Provides supplementary information about the subnet. The value can contain no more than 255 characters and cannot contain angle brackets (< or >).
    DhcpEnable bool
    Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
    DhcpLeaseTime string
    DnsLists 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 (-).
    NtpServerAddress string
    PrimaryDns string
    Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
    Region string
    Specifies the region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new subnet.
    SecondaryDns string
    Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
    Tags Dictionary<string, string>
    The key/value pairs to associate with the subnet.
    Timeouts VpcSubnetV1Timeouts
    VpcSubnetV1Id string
    The resource ID in UUID format.
    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.
    GatewayIp 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.
    VpcId string
    Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new subnet.
    AvailabilityZone 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
    Provides supplementary information about the subnet. The value can contain no more than 255 characters and cannot contain angle brackets (< or >).
    DhcpEnable bool
    Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
    DhcpLeaseTime string
    DnsLists []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 (-).
    NtpServerAddress string
    PrimaryDns string
    Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
    Region string
    Specifies the region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new subnet.
    SecondaryDns string
    Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
    Tags map[string]string
    The key/value pairs to associate with the subnet.
    Timeouts VpcSubnetV1TimeoutsArgs
    VpcSubnetV1Id string
    The resource ID in UUID format.
    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.
    gatewayIp 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.
    vpcId String
    Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new subnet.
    availabilityZone 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
    Provides supplementary information about the subnet. The value can contain no more than 255 characters and cannot contain angle brackets (< or >).
    dhcpEnable Boolean
    Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
    dhcpLeaseTime String
    dnsLists 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 (-).
    ntpServerAddress String
    primaryDns String
    Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
    region String
    Specifies the region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new subnet.
    secondaryDns String
    Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
    tags Map<String,String>
    The key/value pairs to associate with the subnet.
    timeouts VpcSubnetV1Timeouts
    vpcSubnetV1Id String
    The resource ID in UUID format.
    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.
    gatewayIp 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.
    vpcId string
    Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new subnet.
    availabilityZone 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
    Provides supplementary information about the subnet. The value can contain no more than 255 characters and cannot contain angle brackets (< or >).
    dhcpEnable boolean
    Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
    dhcpLeaseTime string
    dnsLists 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 (-).
    ntpServerAddress string
    primaryDns string
    Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
    region string
    Specifies the region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new subnet.
    secondaryDns string
    Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
    tags {[key: string]: string}
    The key/value pairs to associate with the subnet.
    timeouts VpcSubnetV1Timeouts
    vpcSubnetV1Id string
    The resource ID in UUID format.
    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
    Provides supplementary information about the subnet. The value can contain 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.
    dhcp_lease_time str
    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 (-).
    ntp_server_address str
    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 the 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.
    tags Mapping[str, str]
    The key/value pairs to associate with the subnet.
    timeouts VpcSubnetV1TimeoutsArgs
    vpc_subnet_v1_id str
    The resource ID in UUID format.
    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.
    gatewayIp 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.
    vpcId String
    Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new subnet.
    availabilityZone 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
    Provides supplementary information about the subnet. The value can contain no more than 255 characters and cannot contain angle brackets (< or >).
    dhcpEnable Boolean
    Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
    dhcpLeaseTime String
    dnsLists 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 (-).
    ntpServerAddress String
    primaryDns String
    Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
    region String
    Specifies the region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new subnet.
    secondaryDns String
    Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
    tags Map<String>
    The key/value pairs to associate with the subnet.
    timeouts Property Map
    vpcSubnetV1Id String
    The resource ID in UUID format.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the VpcSubnetV1 resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ipv4SubnetId string
    The ID of the IPv4 subnet (Native OpenStack API).
    Ipv6Cidr string
    The IPv6 subnet CIDR block.
    Ipv6Gateway string
    The IPv6 subnet gateway.
    Ipv6SubnetId string
    The ID of the IPv6 subnet (Native OpenStack API).
    SubnetId string
    schema: Deprecated
    Id string
    The provider-assigned unique ID for this managed resource.
    Ipv4SubnetId string
    The ID of the IPv4 subnet (Native OpenStack API).
    Ipv6Cidr string
    The IPv6 subnet CIDR block.
    Ipv6Gateway string
    The IPv6 subnet gateway.
    Ipv6SubnetId string
    The ID of the IPv6 subnet (Native OpenStack API).
    SubnetId string
    schema: Deprecated
    id String
    The provider-assigned unique ID for this managed resource.
    ipv4SubnetId String
    The ID of the IPv4 subnet (Native OpenStack API).
    ipv6Cidr String
    The IPv6 subnet CIDR block.
    ipv6Gateway String
    The IPv6 subnet gateway.
    ipv6SubnetId String
    The ID of the IPv6 subnet (Native OpenStack API).
    subnetId String
    schema: Deprecated
    id string
    The provider-assigned unique ID for this managed resource.
    ipv4SubnetId string
    The ID of the IPv4 subnet (Native OpenStack API).
    ipv6Cidr string
    The IPv6 subnet CIDR block.
    ipv6Gateway string
    The IPv6 subnet gateway.
    ipv6SubnetId string
    The ID of the IPv6 subnet (Native OpenStack API).
    subnetId string
    schema: Deprecated
    id str
    The provider-assigned unique ID for this managed resource.
    ipv4_subnet_id str
    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_id str
    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.
    ipv4SubnetId String
    The ID of the IPv4 subnet (Native OpenStack API).
    ipv6Cidr String
    The IPv6 subnet CIDR block.
    ipv6Gateway String
    The IPv6 subnet gateway.
    ipv6SubnetId String
    The ID of the IPv6 subnet (Native OpenStack API).
    subnetId String
    schema: Deprecated

    Look up Existing VpcSubnetV1 Resource

    Get an existing VpcSubnetV1 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?: VpcSubnetV1State, opts?: CustomResourceOptions): VpcSubnetV1
    @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,
            dhcp_lease_time: Optional[str] = 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,
            ntp_server_address: 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,
            timeouts: Optional[VpcSubnetV1TimeoutsArgs] = None,
            vpc_id: Optional[str] = None,
            vpc_subnet_v1_id: Optional[str] = None) -> VpcSubnetV1
    func GetVpcSubnetV1(ctx *Context, name string, id IDInput, state *VpcSubnetV1State, opts ...ResourceOption) (*VpcSubnetV1, error)
    public static VpcSubnetV1 Get(string name, Input<string> id, VpcSubnetV1State? state, CustomResourceOptions? opts = null)
    public static VpcSubnetV1 get(String name, Output<String> id, VpcSubnetV1State state, CustomResourceOptions options)
    resources:  _:    type: flexibleengine:VpcSubnetV1    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.
    The following state arguments are supported:
    AvailabilityZone 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
    Provides supplementary information about the subnet. The value can contain no more than 255 characters and cannot contain angle brackets (< or >).
    DhcpEnable bool
    Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
    DhcpLeaseTime string
    DnsLists 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.
    GatewayIp 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.
    Ipv4SubnetId 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.
    Ipv6SubnetId 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 (-).
    NtpServerAddress string
    PrimaryDns string
    Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
    Region string
    Specifies the region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new subnet.
    SecondaryDns string
    Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
    SubnetId string
    schema: Deprecated
    Tags Dictionary<string, string>
    The key/value pairs to associate with the subnet.
    Timeouts VpcSubnetV1Timeouts
    VpcId string
    Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new subnet.
    VpcSubnetV1Id string
    The resource ID in UUID format.
    AvailabilityZone 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
    Provides supplementary information about the subnet. The value can contain no more than 255 characters and cannot contain angle brackets (< or >).
    DhcpEnable bool
    Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
    DhcpLeaseTime string
    DnsLists []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.
    GatewayIp 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.
    Ipv4SubnetId 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.
    Ipv6SubnetId 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 (-).
    NtpServerAddress string
    PrimaryDns string
    Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
    Region string
    Specifies the region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new subnet.
    SecondaryDns string
    Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
    SubnetId string
    schema: Deprecated
    Tags map[string]string
    The key/value pairs to associate with the subnet.
    Timeouts VpcSubnetV1TimeoutsArgs
    VpcId string
    Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new subnet.
    VpcSubnetV1Id string
    The resource ID in UUID format.
    availabilityZone 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
    Provides supplementary information about the subnet. The value can contain no more than 255 characters and cannot contain angle brackets (< or >).
    dhcpEnable Boolean
    Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
    dhcpLeaseTime String
    dnsLists 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.
    gatewayIp 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.
    ipv4SubnetId 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.
    ipv6SubnetId 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 (-).
    ntpServerAddress String
    primaryDns String
    Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
    region String
    Specifies the region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new subnet.
    secondaryDns String
    Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
    subnetId String
    schema: Deprecated
    tags Map<String,String>
    The key/value pairs to associate with the subnet.
    timeouts VpcSubnetV1Timeouts
    vpcId String
    Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new subnet.
    vpcSubnetV1Id String
    The resource ID in UUID format.
    availabilityZone 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
    Provides supplementary information about the subnet. The value can contain no more than 255 characters and cannot contain angle brackets (< or >).
    dhcpEnable boolean
    Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
    dhcpLeaseTime string
    dnsLists 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.
    gatewayIp 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.
    ipv4SubnetId 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.
    ipv6SubnetId 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 (-).
    ntpServerAddress string
    primaryDns string
    Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
    region string
    Specifies the region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new subnet.
    secondaryDns string
    Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
    subnetId string
    schema: Deprecated
    tags {[key: string]: string}
    The key/value pairs to associate with the subnet.
    timeouts VpcSubnetV1Timeouts
    vpcId string
    Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new subnet.
    vpcSubnetV1Id string
    The resource ID in UUID format.
    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
    Provides supplementary information about the subnet. The value can contain 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.
    dhcp_lease_time str
    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_id str
    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_id str
    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 (-).
    ntp_server_address str
    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 the 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
    tags Mapping[str, str]
    The key/value pairs to associate with the subnet.
    timeouts VpcSubnetV1TimeoutsArgs
    vpc_id str
    Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new subnet.
    vpc_subnet_v1_id str
    The resource ID in UUID format.
    availabilityZone 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
    Provides supplementary information about the subnet. The value can contain no more than 255 characters and cannot contain angle brackets (< or >).
    dhcpEnable Boolean
    Specifies whether the DHCP function is enabled for the subnet. Defaults to true.
    dhcpLeaseTime String
    dnsLists 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.
    gatewayIp 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.
    ipv4SubnetId 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.
    ipv6SubnetId 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 (-).
    ntpServerAddress String
    primaryDns String
    Specifies the IP address of DNS server 1 on the subnet. The value must be a valid IP address.
    region String
    Specifies the region in which to create the vpc subnet. If omitted, the provider-level region will be used. Changing this creates a new subnet.
    secondaryDns String
    Specifies the IP address of DNS server 2 on the subnet. The value must be a valid IP address.
    subnetId String
    schema: Deprecated
    tags Map<String>
    The key/value pairs to associate with the subnet.
    timeouts Property Map
    vpcId String
    Specifies the ID of the VPC to which the subnet belongs. Changing this creates a new subnet.
    vpcSubnetV1Id String
    The resource ID in UUID format.

    Supporting Types

    VpcSubnetV1Timeouts, VpcSubnetV1TimeoutsArgs

    Create string
    Delete string
    Create string
    Delete string
    create String
    delete String
    create string
    delete string
    create str
    delete str
    create String
    delete String

    Import

    Subnets can be imported using the VPC subnet ID, e.g.

    $ pulumi import flexibleengine:index/vpcSubnetV1:VpcSubnetV1 flexibleengine_vpc_subnet_v1 4779ab1c-7c1a-44b1-a02e-93dfc361b32d
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
    License
    Notes
    This Pulumi package is based on the flexibleengine Terraform Provider.
    flexibleengine logo
    flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud