tencentcloud.CdwpgInstance
Explore with Pulumi AI
Provides a resource to create a cdwpg instance
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const instance = new tencentcloud.CdwpgInstance("instance", {
adminPassword: "xxxxxx",
chargeProperties: {
chargeType: "POSTPAID_BY_HOUR",
renewFlag: 0,
timeSpan: 1,
timeUnit: "h",
},
instanceName: "test_cdwpg",
resources: [
{
count: 2,
diskSpec: {
diskCount: 1,
diskSize: 200,
diskType: "CLOUD_HSSD",
},
specName: "S_4_16_H_CN",
type: "cn",
},
{
count: 2,
diskSpec: {
diskCount: 10,
diskSize: 20,
diskType: "CLOUD_HSSD",
},
specName: "S_4_16_H_CN",
type: "dn",
},
],
tags: {
tagKey: "tagValue",
},
userSubnetId: "subnet-xxxxxx",
userVpcId: "vpc-xxxxxx",
zone: "ap-guangzhou-6",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
instance = tencentcloud.CdwpgInstance("instance",
admin_password="xxxxxx",
charge_properties={
"charge_type": "POSTPAID_BY_HOUR",
"renew_flag": 0,
"time_span": 1,
"time_unit": "h",
},
instance_name="test_cdwpg",
resources=[
{
"count": 2,
"disk_spec": {
"disk_count": 1,
"disk_size": 200,
"disk_type": "CLOUD_HSSD",
},
"spec_name": "S_4_16_H_CN",
"type": "cn",
},
{
"count": 2,
"disk_spec": {
"disk_count": 10,
"disk_size": 20,
"disk_type": "CLOUD_HSSD",
},
"spec_name": "S_4_16_H_CN",
"type": "dn",
},
],
tags={
"tagKey": "tagValue",
},
user_subnet_id="subnet-xxxxxx",
user_vpc_id="vpc-xxxxxx",
zone="ap-guangzhou-6")
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 {
_, err := tencentcloud.NewCdwpgInstance(ctx, "instance", &tencentcloud.CdwpgInstanceArgs{
AdminPassword: pulumi.String("xxxxxx"),
ChargeProperties: &tencentcloud.CdwpgInstanceChargePropertiesArgs{
ChargeType: pulumi.String("POSTPAID_BY_HOUR"),
RenewFlag: pulumi.Float64(0),
TimeSpan: pulumi.Float64(1),
TimeUnit: pulumi.String("h"),
},
InstanceName: pulumi.String("test_cdwpg"),
Resources: tencentcloud.CdwpgInstanceResourceArray{
&tencentcloud.CdwpgInstanceResourceArgs{
Count: pulumi.Float64(2),
DiskSpec: &tencentcloud.CdwpgInstanceResourceDiskSpecArgs{
DiskCount: pulumi.Float64(1),
DiskSize: pulumi.Float64(200),
DiskType: pulumi.String("CLOUD_HSSD"),
},
SpecName: pulumi.String("S_4_16_H_CN"),
Type: pulumi.String("cn"),
},
&tencentcloud.CdwpgInstanceResourceArgs{
Count: pulumi.Float64(2),
DiskSpec: &tencentcloud.CdwpgInstanceResourceDiskSpecArgs{
DiskCount: pulumi.Float64(10),
DiskSize: pulumi.Float64(20),
DiskType: pulumi.String("CLOUD_HSSD"),
},
SpecName: pulumi.String("S_4_16_H_CN"),
Type: pulumi.String("dn"),
},
},
Tags: pulumi.StringMap{
"tagKey": pulumi.String("tagValue"),
},
UserSubnetId: pulumi.String("subnet-xxxxxx"),
UserVpcId: pulumi.String("vpc-xxxxxx"),
Zone: pulumi.String("ap-guangzhou-6"),
})
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 instance = new Tencentcloud.CdwpgInstance("instance", new()
{
AdminPassword = "xxxxxx",
ChargeProperties = new Tencentcloud.Inputs.CdwpgInstanceChargePropertiesArgs
{
ChargeType = "POSTPAID_BY_HOUR",
RenewFlag = 0,
TimeSpan = 1,
TimeUnit = "h",
},
InstanceName = "test_cdwpg",
Resources = new[]
{
new Tencentcloud.Inputs.CdwpgInstanceResourceArgs
{
Count = 2,
DiskSpec = new Tencentcloud.Inputs.CdwpgInstanceResourceDiskSpecArgs
{
DiskCount = 1,
DiskSize = 200,
DiskType = "CLOUD_HSSD",
},
SpecName = "S_4_16_H_CN",
Type = "cn",
},
new Tencentcloud.Inputs.CdwpgInstanceResourceArgs
{
Count = 2,
DiskSpec = new Tencentcloud.Inputs.CdwpgInstanceResourceDiskSpecArgs
{
DiskCount = 10,
DiskSize = 20,
DiskType = "CLOUD_HSSD",
},
SpecName = "S_4_16_H_CN",
Type = "dn",
},
},
Tags =
{
{ "tagKey", "tagValue" },
},
UserSubnetId = "subnet-xxxxxx",
UserVpcId = "vpc-xxxxxx",
Zone = "ap-guangzhou-6",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.CdwpgInstance;
import com.pulumi.tencentcloud.CdwpgInstanceArgs;
import com.pulumi.tencentcloud.inputs.CdwpgInstanceChargePropertiesArgs;
import com.pulumi.tencentcloud.inputs.CdwpgInstanceResourceArgs;
import com.pulumi.tencentcloud.inputs.CdwpgInstanceResourceDiskSpecArgs;
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 instance = new CdwpgInstance("instance", CdwpgInstanceArgs.builder()
.adminPassword("xxxxxx")
.chargeProperties(CdwpgInstanceChargePropertiesArgs.builder()
.chargeType("POSTPAID_BY_HOUR")
.renewFlag(0)
.timeSpan(1)
.timeUnit("h")
.build())
.instanceName("test_cdwpg")
.resources(
CdwpgInstanceResourceArgs.builder()
.count(2)
.diskSpec(CdwpgInstanceResourceDiskSpecArgs.builder()
.diskCount(1)
.diskSize(200)
.diskType("CLOUD_HSSD")
.build())
.specName("S_4_16_H_CN")
.type("cn")
.build(),
CdwpgInstanceResourceArgs.builder()
.count(2)
.diskSpec(CdwpgInstanceResourceDiskSpecArgs.builder()
.diskCount(10)
.diskSize(20)
.diskType("CLOUD_HSSD")
.build())
.specName("S_4_16_H_CN")
.type("dn")
.build())
.tags(Map.of("tagKey", "tagValue"))
.userSubnetId("subnet-xxxxxx")
.userVpcId("vpc-xxxxxx")
.zone("ap-guangzhou-6")
.build());
}
}
resources:
instance:
type: tencentcloud:CdwpgInstance
properties:
adminPassword: xxxxxx
chargeProperties:
chargeType: POSTPAID_BY_HOUR
renewFlag: 0
timeSpan: 1
timeUnit: h
instanceName: test_cdwpg
resources:
- count: 2
diskSpec:
diskCount: 1
diskSize: 200
diskType: CLOUD_HSSD
specName: S_4_16_H_CN
type: cn
- count: 2
diskSpec:
diskCount: 10
diskSize: 20
diskType: CLOUD_HSSD
specName: S_4_16_H_CN
type: dn
tags:
tagKey: tagValue
userSubnetId: subnet-xxxxxx
userVpcId: vpc-xxxxxx
zone: ap-guangzhou-6
Create CdwpgInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CdwpgInstance(name: string, args: CdwpgInstanceArgs, opts?: CustomResourceOptions);
@overload
def CdwpgInstance(resource_name: str,
args: CdwpgInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CdwpgInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
admin_password: Optional[str] = None,
charge_properties: Optional[CdwpgInstanceChargePropertiesArgs] = None,
instance_name: Optional[str] = None,
resources: Optional[Sequence[CdwpgInstanceResourceArgs]] = None,
user_subnet_id: Optional[str] = None,
user_vpc_id: Optional[str] = None,
zone: Optional[str] = None,
cdwpg_instance_id: Optional[str] = None,
product_version: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewCdwpgInstance(ctx *Context, name string, args CdwpgInstanceArgs, opts ...ResourceOption) (*CdwpgInstance, error)
public CdwpgInstance(string name, CdwpgInstanceArgs args, CustomResourceOptions? opts = null)
public CdwpgInstance(String name, CdwpgInstanceArgs args)
public CdwpgInstance(String name, CdwpgInstanceArgs args, CustomResourceOptions options)
type: tencentcloud:CdwpgInstance
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 CdwpgInstanceArgs
- 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 CdwpgInstanceArgs
- 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 CdwpgInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CdwpgInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CdwpgInstanceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CdwpgInstance 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 CdwpgInstance resource accepts the following input properties:
- Admin
Password string - cluster password.
- Charge
Properties CdwpgInstance Charge Properties - instance billing mode.
- Instance
Name string - instance name.
- Resources
List<Cdwpg
Instance Resource> - resource information.
- User
Subnet stringId - subnet.
- User
Vpc stringId - private network.
- Zone string
- Availability Zone.
- Cdwpg
Instance stringId - ID of the resource.
- Product
Version string - Version.
- Dictionary<string, string>
- Tag description list.
- Admin
Password string - cluster password.
- Charge
Properties CdwpgInstance Charge Properties Args - instance billing mode.
- Instance
Name string - instance name.
- Resources
[]Cdwpg
Instance Resource Args - resource information.
- User
Subnet stringId - subnet.
- User
Vpc stringId - private network.
- Zone string
- Availability Zone.
- Cdwpg
Instance stringId - ID of the resource.
- Product
Version string - Version.
- map[string]string
- Tag description list.
- admin
Password String - cluster password.
- charge
Properties CdwpgInstance Charge Properties - instance billing mode.
- instance
Name String - instance name.
- resources
List<Cdwpg
Instance Resource> - resource information.
- user
Subnet StringId - subnet.
- user
Vpc StringId - private network.
- zone String
- Availability Zone.
- cdwpg
Instance StringId - ID of the resource.
- product
Version String - Version.
- Map<String,String>
- Tag description list.
- admin
Password string - cluster password.
- charge
Properties CdwpgInstance Charge Properties - instance billing mode.
- instance
Name string - instance name.
- resources
Cdwpg
Instance Resource[] - resource information.
- user
Subnet stringId - subnet.
- user
Vpc stringId - private network.
- zone string
- Availability Zone.
- cdwpg
Instance stringId - ID of the resource.
- product
Version string - Version.
- {[key: string]: string}
- Tag description list.
- admin_
password str - cluster password.
- charge_
properties CdwpgInstance Charge Properties Args - instance billing mode.
- instance_
name str - instance name.
- resources
Sequence[Cdwpg
Instance Resource Args] - resource information.
- user_
subnet_ strid - subnet.
- user_
vpc_ strid - private network.
- zone str
- Availability Zone.
- cdwpg_
instance_ strid - ID of the resource.
- product_
version str - Version.
- Mapping[str, str]
- Tag description list.
- admin
Password String - cluster password.
- charge
Properties Property Map - instance billing mode.
- instance
Name String - instance name.
- resources List<Property Map>
- resource information.
- user
Subnet StringId - subnet.
- user
Vpc StringId - private network.
- zone String
- Availability Zone.
- cdwpg
Instance StringId - ID of the resource.
- product
Version String - Version.
- Map<String>
- Tag description list.
Outputs
All input properties are implicitly available as output properties. Additionally, the CdwpgInstance 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 CdwpgInstance Resource
Get an existing CdwpgInstance 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?: CdwpgInstanceState, opts?: CustomResourceOptions): CdwpgInstance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
admin_password: Optional[str] = None,
cdwpg_instance_id: Optional[str] = None,
charge_properties: Optional[CdwpgInstanceChargePropertiesArgs] = None,
instance_name: Optional[str] = None,
product_version: Optional[str] = None,
resources: Optional[Sequence[CdwpgInstanceResourceArgs]] = None,
tags: Optional[Mapping[str, str]] = None,
user_subnet_id: Optional[str] = None,
user_vpc_id: Optional[str] = None,
zone: Optional[str] = None) -> CdwpgInstance
func GetCdwpgInstance(ctx *Context, name string, id IDInput, state *CdwpgInstanceState, opts ...ResourceOption) (*CdwpgInstance, error)
public static CdwpgInstance Get(string name, Input<string> id, CdwpgInstanceState? state, CustomResourceOptions? opts = null)
public static CdwpgInstance get(String name, Output<String> id, CdwpgInstanceState state, CustomResourceOptions options)
resources: _: type: tencentcloud:CdwpgInstance 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.
- Admin
Password string - cluster password.
- Cdwpg
Instance stringId - ID of the resource.
- Charge
Properties CdwpgInstance Charge Properties - instance billing mode.
- Instance
Name string - instance name.
- Product
Version string - Version.
- Resources
List<Cdwpg
Instance Resource> - resource information.
- Dictionary<string, string>
- Tag description list.
- User
Subnet stringId - subnet.
- User
Vpc stringId - private network.
- Zone string
- Availability Zone.
- Admin
Password string - cluster password.
- Cdwpg
Instance stringId - ID of the resource.
- Charge
Properties CdwpgInstance Charge Properties Args - instance billing mode.
- Instance
Name string - instance name.
- Product
Version string - Version.
- Resources
[]Cdwpg
Instance Resource Args - resource information.
- map[string]string
- Tag description list.
- User
Subnet stringId - subnet.
- User
Vpc stringId - private network.
- Zone string
- Availability Zone.
- admin
Password String - cluster password.
- cdwpg
Instance StringId - ID of the resource.
- charge
Properties CdwpgInstance Charge Properties - instance billing mode.
- instance
Name String - instance name.
- product
Version String - Version.
- resources
List<Cdwpg
Instance Resource> - resource information.
- Map<String,String>
- Tag description list.
- user
Subnet StringId - subnet.
- user
Vpc StringId - private network.
- zone String
- Availability Zone.
- admin
Password string - cluster password.
- cdwpg
Instance stringId - ID of the resource.
- charge
Properties CdwpgInstance Charge Properties - instance billing mode.
- instance
Name string - instance name.
- product
Version string - Version.
- resources
Cdwpg
Instance Resource[] - resource information.
- {[key: string]: string}
- Tag description list.
- user
Subnet stringId - subnet.
- user
Vpc stringId - private network.
- zone string
- Availability Zone.
- admin_
password str - cluster password.
- cdwpg_
instance_ strid - ID of the resource.
- charge_
properties CdwpgInstance Charge Properties Args - instance billing mode.
- instance_
name str - instance name.
- product_
version str - Version.
- resources
Sequence[Cdwpg
Instance Resource Args] - resource information.
- Mapping[str, str]
- Tag description list.
- user_
subnet_ strid - subnet.
- user_
vpc_ strid - private network.
- zone str
- Availability Zone.
- admin
Password String - cluster password.
- cdwpg
Instance StringId - ID of the resource.
- charge
Properties Property Map - instance billing mode.
- instance
Name String - instance name.
- product
Version String - Version.
- resources List<Property Map>
- resource information.
- Map<String>
- Tag description list.
- user
Subnet StringId - subnet.
- user
Vpc StringId - private network.
- zone String
- Availability Zone.
Supporting Types
CdwpgInstanceChargeProperties, CdwpgInstanceChargePropertiesArgs
- Renew
Flag double - 0-no automatic renewal,1-automatic renewalNote: This field may return null, indicating that a valid value cannot be obtained.
- Time
Span double - Time RangeNote: This field may return null, indicating that a valid value cannot be obtained.
- Time
Unit string - Time Unit,Generally h and mNote: This field may return null, indicating that a valid value cannot be obtained.
- Charge
Type string - Charge type, vaild values: PREPAID, POSTPAID_BY_HOUR.
- Renew
Flag float64 - 0-no automatic renewal,1-automatic renewalNote: This field may return null, indicating that a valid value cannot be obtained.
- Time
Span float64 - Time RangeNote: This field may return null, indicating that a valid value cannot be obtained.
- Time
Unit string - Time Unit,Generally h and mNote: This field may return null, indicating that a valid value cannot be obtained.
- Charge
Type string - Charge type, vaild values: PREPAID, POSTPAID_BY_HOUR.
- renew
Flag Double - 0-no automatic renewal,1-automatic renewalNote: This field may return null, indicating that a valid value cannot be obtained.
- time
Span Double - Time RangeNote: This field may return null, indicating that a valid value cannot be obtained.
- time
Unit String - Time Unit,Generally h and mNote: This field may return null, indicating that a valid value cannot be obtained.
- charge
Type String - Charge type, vaild values: PREPAID, POSTPAID_BY_HOUR.
- renew
Flag number - 0-no automatic renewal,1-automatic renewalNote: This field may return null, indicating that a valid value cannot be obtained.
- time
Span number - Time RangeNote: This field may return null, indicating that a valid value cannot be obtained.
- time
Unit string - Time Unit,Generally h and mNote: This field may return null, indicating that a valid value cannot be obtained.
- charge
Type string - Charge type, vaild values: PREPAID, POSTPAID_BY_HOUR.
- renew_
flag float - 0-no automatic renewal,1-automatic renewalNote: This field may return null, indicating that a valid value cannot be obtained.
- time_
span float - Time RangeNote: This field may return null, indicating that a valid value cannot be obtained.
- time_
unit str - Time Unit,Generally h and mNote: This field may return null, indicating that a valid value cannot be obtained.
- charge_
type str - Charge type, vaild values: PREPAID, POSTPAID_BY_HOUR.
- renew
Flag Number - 0-no automatic renewal,1-automatic renewalNote: This field may return null, indicating that a valid value cannot be obtained.
- time
Span Number - Time RangeNote: This field may return null, indicating that a valid value cannot be obtained.
- time
Unit String - Time Unit,Generally h and mNote: This field may return null, indicating that a valid value cannot be obtained.
- charge
Type String - Charge type, vaild values: PREPAID, POSTPAID_BY_HOUR.
CdwpgInstanceResource, CdwpgInstanceResourceArgs
- Count double
- resource count.
- Disk
Spec CdwpgInstance Resource Disk Spec - disk Information.
- Spec
Name string - resource name.
- Type string
- resource type.
- Count float64
- resource count.
- Disk
Spec CdwpgInstance Resource Disk Spec - disk Information.
- Spec
Name string - resource name.
- Type string
- resource type.
- count Double
- resource count.
- disk
Spec CdwpgInstance Resource Disk Spec - disk Information.
- spec
Name String - resource name.
- type String
- resource type.
- count number
- resource count.
- disk
Spec CdwpgInstance Resource Disk Spec - disk Information.
- spec
Name string - resource name.
- type string
- resource type.
- count float
- resource count.
- disk_
spec CdwpgInstance Resource Disk Spec - disk Information.
- spec_
name str - resource name.
- type str
- resource type.
- count Number
- resource count.
- disk
Spec Property Map - disk Information.
- spec
Name String - resource name.
- type String
- resource type.
CdwpgInstanceResourceDiskSpec, CdwpgInstanceResourceDiskSpecArgs
- disk_
count float - disk count.
- disk_
size float - disk size.
- disk_
type str - disk type.
Import
cdwpg instance can be imported using the id, e.g.
$ pulumi import tencentcloud:index/cdwpgInstance:CdwpgInstance instance instance_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.