tencentcloud.VpcIpv6SubnetCidrBlock
Explore with Pulumi AI
Provides a resource to create a vpc ipv6_subnet_cidr_block
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const zones = tencentcloud.getAvailabilityZones({});
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
const subnet = new tencentcloud.Subnet("subnet", {
availabilityZone: zones.then(zones => zones.zones?.[0]?.name),
vpcId: vpc.vpcId,
cidrBlock: "10.0.0.0/16",
isMulticast: false,
});
const exampleVpcIpv6CidrBlock = new tencentcloud.VpcIpv6CidrBlock("exampleVpcIpv6CidrBlock", {vpcId: vpc.vpcId});
const exampleVpcIpv6SubnetCidrBlock = new tencentcloud.VpcIpv6SubnetCidrBlock("exampleVpcIpv6SubnetCidrBlock", {
vpcId: vpc.vpcId,
ipv6SubnetCidrBlocks: {
subnetId: subnet.subnetId,
ipv6CidrBlock: "xxxxxxxxx",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
zones = tencentcloud.get_availability_zones()
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
subnet = tencentcloud.Subnet("subnet",
availability_zone=zones.zones[0].name,
vpc_id=vpc.vpc_id,
cidr_block="10.0.0.0/16",
is_multicast=False)
example_vpc_ipv6_cidr_block = tencentcloud.VpcIpv6CidrBlock("exampleVpcIpv6CidrBlock", vpc_id=vpc.vpc_id)
example_vpc_ipv6_subnet_cidr_block = tencentcloud.VpcIpv6SubnetCidrBlock("exampleVpcIpv6SubnetCidrBlock",
vpc_id=vpc.vpc_id,
ipv6_subnet_cidr_blocks={
"subnet_id": subnet.subnet_id,
"ipv6_cidr_block": "xxxxxxxxx",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
zones, err := tencentcloud.GetAvailabilityZones(ctx, &tencentcloud.GetAvailabilityZonesArgs{}, nil)
if err != nil {
return err
}
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
AvailabilityZone: pulumi.String(zones.Zones[0].Name),
VpcId: vpc.VpcId,
CidrBlock: pulumi.String("10.0.0.0/16"),
IsMulticast: pulumi.Bool(false),
})
if err != nil {
return err
}
_, err = tencentcloud.NewVpcIpv6CidrBlock(ctx, "exampleVpcIpv6CidrBlock", &tencentcloud.VpcIpv6CidrBlockArgs{
VpcId: vpc.VpcId,
})
if err != nil {
return err
}
_, err = tencentcloud.NewVpcIpv6SubnetCidrBlock(ctx, "exampleVpcIpv6SubnetCidrBlock", &tencentcloud.VpcIpv6SubnetCidrBlockArgs{
VpcId: vpc.VpcId,
Ipv6SubnetCidrBlocks: &tencentcloud.VpcIpv6SubnetCidrBlockIpv6SubnetCidrBlocksArgs{
SubnetId: subnet.SubnetId,
Ipv6CidrBlock: pulumi.String("xxxxxxxxx"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var zones = Tencentcloud.GetAvailabilityZones.Invoke();
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
var subnet = new Tencentcloud.Subnet("subnet", new()
{
AvailabilityZone = zones.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Zones[0]?.Name),
VpcId = vpc.VpcId,
CidrBlock = "10.0.0.0/16",
IsMulticast = false,
});
var exampleVpcIpv6CidrBlock = new Tencentcloud.VpcIpv6CidrBlock("exampleVpcIpv6CidrBlock", new()
{
VpcId = vpc.VpcId,
});
var exampleVpcIpv6SubnetCidrBlock = new Tencentcloud.VpcIpv6SubnetCidrBlock("exampleVpcIpv6SubnetCidrBlock", new()
{
VpcId = vpc.VpcId,
Ipv6SubnetCidrBlocks = new Tencentcloud.Inputs.VpcIpv6SubnetCidrBlockIpv6SubnetCidrBlocksArgs
{
SubnetId = subnet.SubnetId,
Ipv6CidrBlock = "xxxxxxxxx",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetAvailabilityZonesArgs;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.VpcIpv6CidrBlock;
import com.pulumi.tencentcloud.VpcIpv6CidrBlockArgs;
import com.pulumi.tencentcloud.VpcIpv6SubnetCidrBlock;
import com.pulumi.tencentcloud.VpcIpv6SubnetCidrBlockArgs;
import com.pulumi.tencentcloud.inputs.VpcIpv6SubnetCidrBlockIpv6SubnetCidrBlocksArgs;
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 zones = TencentcloudFunctions.getAvailabilityZones();
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
var subnet = new Subnet("subnet", SubnetArgs.builder()
.availabilityZone(zones.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.zones()[0].name()))
.vpcId(vpc.vpcId())
.cidrBlock("10.0.0.0/16")
.isMulticast(false)
.build());
var exampleVpcIpv6CidrBlock = new VpcIpv6CidrBlock("exampleVpcIpv6CidrBlock", VpcIpv6CidrBlockArgs.builder()
.vpcId(vpc.vpcId())
.build());
var exampleVpcIpv6SubnetCidrBlock = new VpcIpv6SubnetCidrBlock("exampleVpcIpv6SubnetCidrBlock", VpcIpv6SubnetCidrBlockArgs.builder()
.vpcId(vpc.vpcId())
.ipv6SubnetCidrBlocks(VpcIpv6SubnetCidrBlockIpv6SubnetCidrBlocksArgs.builder()
.subnetId(subnet.subnetId())
.ipv6CidrBlock("xxxxxxxxx")
.build())
.build());
}
}
resources:
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
subnet:
type: tencentcloud:Subnet
properties:
availabilityZone: ${zones.zones[0].name}
vpcId: ${vpc.vpcId}
cidrBlock: 10.0.0.0/16
isMulticast: false
exampleVpcIpv6CidrBlock:
type: tencentcloud:VpcIpv6CidrBlock
properties:
vpcId: ${vpc.vpcId}
exampleVpcIpv6SubnetCidrBlock:
type: tencentcloud:VpcIpv6SubnetCidrBlock
properties:
vpcId: ${vpc.vpcId}
ipv6SubnetCidrBlocks:
subnetId: ${subnet.subnetId}
ipv6CidrBlock: xxxxxxxxx
variables:
zones:
fn::invoke:
function: tencentcloud:getAvailabilityZones
arguments: {}
Create VpcIpv6SubnetCidrBlock Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VpcIpv6SubnetCidrBlock(name: string, args: VpcIpv6SubnetCidrBlockArgs, opts?: CustomResourceOptions);
@overload
def VpcIpv6SubnetCidrBlock(resource_name: str,
args: VpcIpv6SubnetCidrBlockArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VpcIpv6SubnetCidrBlock(resource_name: str,
opts: Optional[ResourceOptions] = None,
ipv6_subnet_cidr_blocks: Optional[VpcIpv6SubnetCidrBlockIpv6SubnetCidrBlocksArgs] = None,
vpc_id: Optional[str] = None,
vpc_ipv6_subnet_cidr_block_id: Optional[str] = None)
func NewVpcIpv6SubnetCidrBlock(ctx *Context, name string, args VpcIpv6SubnetCidrBlockArgs, opts ...ResourceOption) (*VpcIpv6SubnetCidrBlock, error)
public VpcIpv6SubnetCidrBlock(string name, VpcIpv6SubnetCidrBlockArgs args, CustomResourceOptions? opts = null)
public VpcIpv6SubnetCidrBlock(String name, VpcIpv6SubnetCidrBlockArgs args)
public VpcIpv6SubnetCidrBlock(String name, VpcIpv6SubnetCidrBlockArgs args, CustomResourceOptions options)
type: tencentcloud:VpcIpv6SubnetCidrBlock
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 VpcIpv6SubnetCidrBlockArgs
- 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 VpcIpv6SubnetCidrBlockArgs
- 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 VpcIpv6SubnetCidrBlockArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpcIpv6SubnetCidrBlockArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VpcIpv6SubnetCidrBlockArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
VpcIpv6SubnetCidrBlock 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 VpcIpv6SubnetCidrBlock resource accepts the following input properties:
- Ipv6Subnet
Cidr VpcBlocks Ipv6Subnet Cidr Block Ipv6Subnet Cidr Blocks - Allocate a list of
IPv6
subnets. - Vpc
Id string - The private network
ID
where the subnet is located. Such as:vpc-f49l6u0z
. - Vpc
Ipv6Subnet stringCidr Block Id - ID of the resource.
- Ipv6Subnet
Cidr VpcBlocks Ipv6Subnet Cidr Block Ipv6Subnet Cidr Blocks Args - Allocate a list of
IPv6
subnets. - Vpc
Id string - The private network
ID
where the subnet is located. Such as:vpc-f49l6u0z
. - Vpc
Ipv6Subnet stringCidr Block Id - ID of the resource.
- ipv6Subnet
Cidr VpcBlocks Ipv6Subnet Cidr Block Ipv6Subnet Cidr Blocks - Allocate a list of
IPv6
subnets. - vpc
Id String - The private network
ID
where the subnet is located. Such as:vpc-f49l6u0z
. - vpc
Ipv6Subnet StringCidr Block Id - ID of the resource.
- ipv6Subnet
Cidr VpcBlocks Ipv6Subnet Cidr Block Ipv6Subnet Cidr Blocks - Allocate a list of
IPv6
subnets. - vpc
Id string - The private network
ID
where the subnet is located. Such as:vpc-f49l6u0z
. - vpc
Ipv6Subnet stringCidr Block Id - ID of the resource.
- ipv6_
subnet_ Vpccidr_ blocks Ipv6Subnet Cidr Block Ipv6Subnet Cidr Blocks Args - Allocate a list of
IPv6
subnets. - vpc_
id str - The private network
ID
where the subnet is located. Such as:vpc-f49l6u0z
. - vpc_
ipv6_ strsubnet_ cidr_ block_ id - ID of the resource.
- ipv6Subnet
Cidr Property MapBlocks - Allocate a list of
IPv6
subnets. - vpc
Id String - The private network
ID
where the subnet is located. Such as:vpc-f49l6u0z
. - vpc
Ipv6Subnet StringCidr Block Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the VpcIpv6SubnetCidrBlock resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing VpcIpv6SubnetCidrBlock Resource
Get an existing VpcIpv6SubnetCidrBlock 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?: VpcIpv6SubnetCidrBlockState, opts?: CustomResourceOptions): VpcIpv6SubnetCidrBlock
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
ipv6_subnet_cidr_blocks: Optional[VpcIpv6SubnetCidrBlockIpv6SubnetCidrBlocksArgs] = None,
vpc_id: Optional[str] = None,
vpc_ipv6_subnet_cidr_block_id: Optional[str] = None) -> VpcIpv6SubnetCidrBlock
func GetVpcIpv6SubnetCidrBlock(ctx *Context, name string, id IDInput, state *VpcIpv6SubnetCidrBlockState, opts ...ResourceOption) (*VpcIpv6SubnetCidrBlock, error)
public static VpcIpv6SubnetCidrBlock Get(string name, Input<string> id, VpcIpv6SubnetCidrBlockState? state, CustomResourceOptions? opts = null)
public static VpcIpv6SubnetCidrBlock get(String name, Output<String> id, VpcIpv6SubnetCidrBlockState state, CustomResourceOptions options)
resources: _: type: tencentcloud:VpcIpv6SubnetCidrBlock 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.
- Ipv6Subnet
Cidr VpcBlocks Ipv6Subnet Cidr Block Ipv6Subnet Cidr Blocks - Allocate a list of
IPv6
subnets. - Vpc
Id string - The private network
ID
where the subnet is located. Such as:vpc-f49l6u0z
. - Vpc
Ipv6Subnet stringCidr Block Id - ID of the resource.
- Ipv6Subnet
Cidr VpcBlocks Ipv6Subnet Cidr Block Ipv6Subnet Cidr Blocks Args - Allocate a list of
IPv6
subnets. - Vpc
Id string - The private network
ID
where the subnet is located. Such as:vpc-f49l6u0z
. - Vpc
Ipv6Subnet stringCidr Block Id - ID of the resource.
- ipv6Subnet
Cidr VpcBlocks Ipv6Subnet Cidr Block Ipv6Subnet Cidr Blocks - Allocate a list of
IPv6
subnets. - vpc
Id String - The private network
ID
where the subnet is located. Such as:vpc-f49l6u0z
. - vpc
Ipv6Subnet StringCidr Block Id - ID of the resource.
- ipv6Subnet
Cidr VpcBlocks Ipv6Subnet Cidr Block Ipv6Subnet Cidr Blocks - Allocate a list of
IPv6
subnets. - vpc
Id string - The private network
ID
where the subnet is located. Such as:vpc-f49l6u0z
. - vpc
Ipv6Subnet stringCidr Block Id - ID of the resource.
- ipv6_
subnet_ Vpccidr_ blocks Ipv6Subnet Cidr Block Ipv6Subnet Cidr Blocks Args - Allocate a list of
IPv6
subnets. - vpc_
id str - The private network
ID
where the subnet is located. Such as:vpc-f49l6u0z
. - vpc_
ipv6_ strsubnet_ cidr_ block_ id - ID of the resource.
- ipv6Subnet
Cidr Property MapBlocks - Allocate a list of
IPv6
subnets. - vpc
Id String - The private network
ID
where the subnet is located. Such as:vpc-f49l6u0z
. - vpc
Ipv6Subnet StringCidr Block Id - ID of the resource.
Supporting Types
VpcIpv6SubnetCidrBlockIpv6SubnetCidrBlocks, VpcIpv6SubnetCidrBlockIpv6SubnetCidrBlocksArgs
- Ipv6Cidr
Block string IPv6
subnet segment. Such as:3402:4e00:20:1001::/64
.- Subnet
Id string - Subnet instance
ID
. Such as:subnet-pxir56ns
.
- Ipv6Cidr
Block string IPv6
subnet segment. Such as:3402:4e00:20:1001::/64
.- Subnet
Id string - Subnet instance
ID
. Such as:subnet-pxir56ns
.
- ipv6Cidr
Block String IPv6
subnet segment. Such as:3402:4e00:20:1001::/64
.- subnet
Id String - Subnet instance
ID
. Such as:subnet-pxir56ns
.
- ipv6Cidr
Block string IPv6
subnet segment. Such as:3402:4e00:20:1001::/64
.- subnet
Id string - Subnet instance
ID
. Such as:subnet-pxir56ns
.
- ipv6_
cidr_ strblock IPv6
subnet segment. Such as:3402:4e00:20:1001::/64
.- subnet_
id str - Subnet instance
ID
. Such as:subnet-pxir56ns
.
- ipv6Cidr
Block String IPv6
subnet segment. Such as:3402:4e00:20:1001::/64
.- subnet
Id String - Subnet instance
ID
. Such as:subnet-pxir56ns
.
Import
vpc ipv6_subnet_cidr_block can be imported using the id, e.g.
$ pulumi import tencentcloud:index/vpcIpv6SubnetCidrBlock:VpcIpv6SubnetCidrBlock ipv6_subnet_cidr_block ipv6_subnet_cidr_block_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.