Documentation
¶
Index ¶
- type Instance
- type InstanceArgs
- type InstanceArray
- type InstanceArrayInput
- type InstanceArrayOutput
- type InstanceInput
- type InstanceMap
- type InstanceMapInput
- type InstanceMapOutput
- type InstanceOutput
- func (o InstanceOutput) AvailabilityZone() pulumi.StringOutput
- func (o InstanceOutput) AvailableIpCount() pulumi.IntOutput
- func (o InstanceOutput) CidrBlock() pulumi.StringOutput
- func (o InstanceOutput) CreateTime() pulumi.StringOutput
- func (InstanceOutput) ElementType() reflect.Type
- func (o InstanceOutput) IsDefault() pulumi.BoolOutput
- func (o InstanceOutput) IsMulticast() pulumi.BoolPtrOutput
- func (o InstanceOutput) Name() pulumi.StringOutput
- func (o InstanceOutput) RouteTableId() pulumi.StringOutput
- func (o InstanceOutput) Tags() pulumi.MapOutput
- func (o InstanceOutput) ToInstanceOutput() InstanceOutput
- func (o InstanceOutput) ToInstanceOutputWithContext(ctx context.Context) InstanceOutput
- func (o InstanceOutput) VpcId() pulumi.StringOutput
- type InstanceState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instance ¶
type Instance struct { pulumi.CustomResourceState // The availability zone within which the subnet should be created. AvailabilityZone pulumi.StringOutput `pulumi:"availabilityZone"` // The number of available IPs. AvailableIpCount pulumi.IntOutput `pulumi:"availableIpCount"` // A network address block of the subnet. CidrBlock pulumi.StringOutput `pulumi:"cidrBlock"` // Creation time of subnet resource. CreateTime pulumi.StringOutput `pulumi:"createTime"` // Indicates whether it is the default VPC for this region. IsDefault pulumi.BoolOutput `pulumi:"isDefault"` // Indicates whether multicast is enabled. The default value is 'true'. IsMulticast pulumi.BoolPtrOutput `pulumi:"isMulticast"` // The name of subnet to be created. Name pulumi.StringOutput `pulumi:"name"` // ID of a routing table to which the subnet should be associated. RouteTableId pulumi.StringOutput `pulumi:"routeTableId"` // Tags of the subnet. Tags pulumi.MapOutput `pulumi:"tags"` // ID of the VPC to be associated. VpcId pulumi.StringOutput `pulumi:"vpcId"` }
Provide a resource to create a VPC subnet.
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" "github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Subnet" "github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Vpc"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { cfg := config.New(ctx, "") availabilityZone := "ap-guangzhou-3" if param := cfg.Get("availabilityZone"); param != "" { availabilityZone = param } foo, err := Vpc.NewInstance(ctx, "foo", &Vpc.InstanceArgs{ CidrBlock: pulumi.String("10.0.0.0/16"), }) if err != nil { return err } _, err = Subnet.NewInstance(ctx, "subnet", &Subnet.InstanceArgs{ AvailabilityZone: pulumi.String(availabilityZone), VpcId: foo.ID(), CidrBlock: pulumi.String("10.0.20.0/28"), IsMulticast: pulumi.Bool(false), }) if err != nil { return err } return nil }) }
```
## Import
Vpc subnet instance can be imported, e.g.
```sh
$ pulumi import tencentcloud:Subnet/instance:Instance test subnet_id
```
func GetInstance ¶
func GetInstance(ctx *pulumi.Context, name string, id pulumi.IDInput, state *InstanceState, opts ...pulumi.ResourceOption) (*Instance, error)
GetInstance gets an existing Instance resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewInstance ¶
func NewInstance(ctx *pulumi.Context, name string, args *InstanceArgs, opts ...pulumi.ResourceOption) (*Instance, error)
NewInstance registers a new resource with the given unique name, arguments, and options.
func (*Instance) ElementType ¶
func (*Instance) ToInstanceOutput ¶
func (i *Instance) ToInstanceOutput() InstanceOutput
func (*Instance) ToInstanceOutputWithContext ¶
func (i *Instance) ToInstanceOutputWithContext(ctx context.Context) InstanceOutput
type InstanceArgs ¶
type InstanceArgs struct { // The availability zone within which the subnet should be created. AvailabilityZone pulumi.StringInput // A network address block of the subnet. CidrBlock pulumi.StringInput // Indicates whether multicast is enabled. The default value is 'true'. IsMulticast pulumi.BoolPtrInput // The name of subnet to be created. Name pulumi.StringPtrInput // ID of a routing table to which the subnet should be associated. RouteTableId pulumi.StringPtrInput // Tags of the subnet. Tags pulumi.MapInput // ID of the VPC to be associated. VpcId pulumi.StringInput }
The set of arguments for constructing a Instance resource.
func (InstanceArgs) ElementType ¶
func (InstanceArgs) ElementType() reflect.Type
type InstanceArray ¶
type InstanceArray []InstanceInput
func (InstanceArray) ElementType ¶
func (InstanceArray) ElementType() reflect.Type
func (InstanceArray) ToInstanceArrayOutput ¶
func (i InstanceArray) ToInstanceArrayOutput() InstanceArrayOutput
func (InstanceArray) ToInstanceArrayOutputWithContext ¶
func (i InstanceArray) ToInstanceArrayOutputWithContext(ctx context.Context) InstanceArrayOutput
type InstanceArrayInput ¶
type InstanceArrayInput interface { pulumi.Input ToInstanceArrayOutput() InstanceArrayOutput ToInstanceArrayOutputWithContext(context.Context) InstanceArrayOutput }
InstanceArrayInput is an input type that accepts InstanceArray and InstanceArrayOutput values. You can construct a concrete instance of `InstanceArrayInput` via:
InstanceArray{ InstanceArgs{...} }
type InstanceArrayOutput ¶
type InstanceArrayOutput struct{ *pulumi.OutputState }
func (InstanceArrayOutput) ElementType ¶
func (InstanceArrayOutput) ElementType() reflect.Type
func (InstanceArrayOutput) Index ¶
func (o InstanceArrayOutput) Index(i pulumi.IntInput) InstanceOutput
func (InstanceArrayOutput) ToInstanceArrayOutput ¶
func (o InstanceArrayOutput) ToInstanceArrayOutput() InstanceArrayOutput
func (InstanceArrayOutput) ToInstanceArrayOutputWithContext ¶
func (o InstanceArrayOutput) ToInstanceArrayOutputWithContext(ctx context.Context) InstanceArrayOutput
type InstanceInput ¶
type InstanceInput interface { pulumi.Input ToInstanceOutput() InstanceOutput ToInstanceOutputWithContext(ctx context.Context) InstanceOutput }
type InstanceMap ¶
type InstanceMap map[string]InstanceInput
func (InstanceMap) ElementType ¶
func (InstanceMap) ElementType() reflect.Type
func (InstanceMap) ToInstanceMapOutput ¶
func (i InstanceMap) ToInstanceMapOutput() InstanceMapOutput
func (InstanceMap) ToInstanceMapOutputWithContext ¶
func (i InstanceMap) ToInstanceMapOutputWithContext(ctx context.Context) InstanceMapOutput
type InstanceMapInput ¶
type InstanceMapInput interface { pulumi.Input ToInstanceMapOutput() InstanceMapOutput ToInstanceMapOutputWithContext(context.Context) InstanceMapOutput }
InstanceMapInput is an input type that accepts InstanceMap and InstanceMapOutput values. You can construct a concrete instance of `InstanceMapInput` via:
InstanceMap{ "key": InstanceArgs{...} }
type InstanceMapOutput ¶
type InstanceMapOutput struct{ *pulumi.OutputState }
func (InstanceMapOutput) ElementType ¶
func (InstanceMapOutput) ElementType() reflect.Type
func (InstanceMapOutput) MapIndex ¶
func (o InstanceMapOutput) MapIndex(k pulumi.StringInput) InstanceOutput
func (InstanceMapOutput) ToInstanceMapOutput ¶
func (o InstanceMapOutput) ToInstanceMapOutput() InstanceMapOutput
func (InstanceMapOutput) ToInstanceMapOutputWithContext ¶
func (o InstanceMapOutput) ToInstanceMapOutputWithContext(ctx context.Context) InstanceMapOutput
type InstanceOutput ¶
type InstanceOutput struct{ *pulumi.OutputState }
func (InstanceOutput) AvailabilityZone ¶
func (o InstanceOutput) AvailabilityZone() pulumi.StringOutput
The availability zone within which the subnet should be created.
func (InstanceOutput) AvailableIpCount ¶
func (o InstanceOutput) AvailableIpCount() pulumi.IntOutput
The number of available IPs.
func (InstanceOutput) CidrBlock ¶
func (o InstanceOutput) CidrBlock() pulumi.StringOutput
A network address block of the subnet.
func (InstanceOutput) CreateTime ¶
func (o InstanceOutput) CreateTime() pulumi.StringOutput
Creation time of subnet resource.
func (InstanceOutput) ElementType ¶
func (InstanceOutput) ElementType() reflect.Type
func (InstanceOutput) IsDefault ¶
func (o InstanceOutput) IsDefault() pulumi.BoolOutput
Indicates whether it is the default VPC for this region.
func (InstanceOutput) IsMulticast ¶
func (o InstanceOutput) IsMulticast() pulumi.BoolPtrOutput
Indicates whether multicast is enabled. The default value is 'true'.
func (InstanceOutput) Name ¶
func (o InstanceOutput) Name() pulumi.StringOutput
The name of subnet to be created.
func (InstanceOutput) RouteTableId ¶
func (o InstanceOutput) RouteTableId() pulumi.StringOutput
ID of a routing table to which the subnet should be associated.
func (InstanceOutput) ToInstanceOutput ¶
func (o InstanceOutput) ToInstanceOutput() InstanceOutput
func (InstanceOutput) ToInstanceOutputWithContext ¶
func (o InstanceOutput) ToInstanceOutputWithContext(ctx context.Context) InstanceOutput
func (InstanceOutput) VpcId ¶
func (o InstanceOutput) VpcId() pulumi.StringOutput
ID of the VPC to be associated.
type InstanceState ¶
type InstanceState struct { // The availability zone within which the subnet should be created. AvailabilityZone pulumi.StringPtrInput // The number of available IPs. AvailableIpCount pulumi.IntPtrInput // A network address block of the subnet. CidrBlock pulumi.StringPtrInput // Creation time of subnet resource. CreateTime pulumi.StringPtrInput // Indicates whether it is the default VPC for this region. IsDefault pulumi.BoolPtrInput // Indicates whether multicast is enabled. The default value is 'true'. IsMulticast pulumi.BoolPtrInput // The name of subnet to be created. Name pulumi.StringPtrInput // ID of a routing table to which the subnet should be associated. RouteTableId pulumi.StringPtrInput // Tags of the subnet. Tags pulumi.MapInput // ID of the VPC to be associated. VpcId pulumi.StringPtrInput }
func (InstanceState) ElementType ¶
func (InstanceState) ElementType() reflect.Type