tencentcloud.TdcpgInstance
Explore with Pulumi AI
Provides a resource to create a tdcpg instance.
NOTE: This resource is still in internal testing. To experience its functions, you need to apply for a whitelist from Tencent Cloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const instance1 = new tencentcloud.TdcpgInstance("instance1", {
clusterId: "cluster_id",
cpu: 1,
instanceName: "instance_name",
memory: 1,
});
const instance2 = new tencentcloud.TdcpgInstance("instance2", {
clusterId: "cluster_id",
cpu: 1,
instanceName: "instance_name",
memory: 2,
operationTiming: "IMMEDIATE",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
instance1 = tencentcloud.TdcpgInstance("instance1",
cluster_id="cluster_id",
cpu=1,
instance_name="instance_name",
memory=1)
instance2 = tencentcloud.TdcpgInstance("instance2",
cluster_id="cluster_id",
cpu=1,
instance_name="instance_name",
memory=2,
operation_timing="IMMEDIATE")
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.NewTdcpgInstance(ctx, "instance1", &tencentcloud.TdcpgInstanceArgs{
ClusterId: pulumi.String("cluster_id"),
Cpu: pulumi.Float64(1),
InstanceName: pulumi.String("instance_name"),
Memory: pulumi.Float64(1),
})
if err != nil {
return err
}
_, err = tencentcloud.NewTdcpgInstance(ctx, "instance2", &tencentcloud.TdcpgInstanceArgs{
ClusterId: pulumi.String("cluster_id"),
Cpu: pulumi.Float64(1),
InstanceName: pulumi.String("instance_name"),
Memory: pulumi.Float64(2),
OperationTiming: pulumi.String("IMMEDIATE"),
})
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 instance1 = new Tencentcloud.TdcpgInstance("instance1", new()
{
ClusterId = "cluster_id",
Cpu = 1,
InstanceName = "instance_name",
Memory = 1,
});
var instance2 = new Tencentcloud.TdcpgInstance("instance2", new()
{
ClusterId = "cluster_id",
Cpu = 1,
InstanceName = "instance_name",
Memory = 2,
OperationTiming = "IMMEDIATE",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TdcpgInstance;
import com.pulumi.tencentcloud.TdcpgInstanceArgs;
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 instance1 = new TdcpgInstance("instance1", TdcpgInstanceArgs.builder()
.clusterId("cluster_id")
.cpu(1)
.instanceName("instance_name")
.memory(1)
.build());
var instance2 = new TdcpgInstance("instance2", TdcpgInstanceArgs.builder()
.clusterId("cluster_id")
.cpu(1)
.instanceName("instance_name")
.memory(2)
.operationTiming("IMMEDIATE")
.build());
}
}
resources:
instance1:
type: tencentcloud:TdcpgInstance
properties:
clusterId: cluster_id
cpu: 1
instanceName: instance_name
memory: 1
instance2:
type: tencentcloud:TdcpgInstance
properties:
clusterId: cluster_id
cpu: 1
instanceName: instance_name
memory: 2
operationTiming: IMMEDIATE
Create TdcpgInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TdcpgInstance(name: string, args: TdcpgInstanceArgs, opts?: CustomResourceOptions);
@overload
def TdcpgInstance(resource_name: str,
args: TdcpgInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TdcpgInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
cpu: Optional[float] = None,
memory: Optional[float] = None,
instance_name: Optional[str] = None,
operation_timing: Optional[str] = None,
tdcpg_instance_id: Optional[str] = None)
func NewTdcpgInstance(ctx *Context, name string, args TdcpgInstanceArgs, opts ...ResourceOption) (*TdcpgInstance, error)
public TdcpgInstance(string name, TdcpgInstanceArgs args, CustomResourceOptions? opts = null)
public TdcpgInstance(String name, TdcpgInstanceArgs args)
public TdcpgInstance(String name, TdcpgInstanceArgs args, CustomResourceOptions options)
type: tencentcloud:TdcpgInstance
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 TdcpgInstanceArgs
- 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 TdcpgInstanceArgs
- 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 TdcpgInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TdcpgInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TdcpgInstanceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TdcpgInstance 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 TdcpgInstance resource accepts the following input properties:
- Cluster
Id string - cluster id.
- Cpu double
- cpu cores.
- Memory double
- memory size.
- Instance
Name string - instance name.
- Operation
Timing string - operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
- Tdcpg
Instance stringId - ID of the resource.
- Cluster
Id string - cluster id.
- Cpu float64
- cpu cores.
- Memory float64
- memory size.
- Instance
Name string - instance name.
- Operation
Timing string - operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
- Tdcpg
Instance stringId - ID of the resource.
- cluster
Id String - cluster id.
- cpu Double
- cpu cores.
- memory Double
- memory size.
- instance
Name String - instance name.
- operation
Timing String - operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
- tdcpg
Instance StringId - ID of the resource.
- cluster
Id string - cluster id.
- cpu number
- cpu cores.
- memory number
- memory size.
- instance
Name string - instance name.
- operation
Timing string - operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
- tdcpg
Instance stringId - ID of the resource.
- cluster_
id str - cluster id.
- cpu float
- cpu cores.
- memory float
- memory size.
- instance_
name str - instance name.
- operation_
timing str - operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
- tdcpg_
instance_ strid - ID of the resource.
- cluster
Id String - cluster id.
- cpu Number
- cpu cores.
- memory Number
- memory size.
- instance
Name String - instance name.
- operation
Timing String - operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
- tdcpg
Instance StringId - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TdcpgInstance 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 TdcpgInstance Resource
Get an existing TdcpgInstance 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?: TdcpgInstanceState, opts?: CustomResourceOptions): TdcpgInstance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
cpu: Optional[float] = None,
instance_name: Optional[str] = None,
memory: Optional[float] = None,
operation_timing: Optional[str] = None,
tdcpg_instance_id: Optional[str] = None) -> TdcpgInstance
func GetTdcpgInstance(ctx *Context, name string, id IDInput, state *TdcpgInstanceState, opts ...ResourceOption) (*TdcpgInstance, error)
public static TdcpgInstance Get(string name, Input<string> id, TdcpgInstanceState? state, CustomResourceOptions? opts = null)
public static TdcpgInstance get(String name, Output<String> id, TdcpgInstanceState state, CustomResourceOptions options)
resources: _: type: tencentcloud:TdcpgInstance 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.
- Cluster
Id string - cluster id.
- Cpu double
- cpu cores.
- Instance
Name string - instance name.
- Memory double
- memory size.
- Operation
Timing string - operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
- Tdcpg
Instance stringId - ID of the resource.
- Cluster
Id string - cluster id.
- Cpu float64
- cpu cores.
- Instance
Name string - instance name.
- Memory float64
- memory size.
- Operation
Timing string - operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
- Tdcpg
Instance stringId - ID of the resource.
- cluster
Id String - cluster id.
- cpu Double
- cpu cores.
- instance
Name String - instance name.
- memory Double
- memory size.
- operation
Timing String - operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
- tdcpg
Instance StringId - ID of the resource.
- cluster
Id string - cluster id.
- cpu number
- cpu cores.
- instance
Name string - instance name.
- memory number
- memory size.
- operation
Timing string - operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
- tdcpg
Instance stringId - ID of the resource.
- cluster_
id str - cluster id.
- cpu float
- cpu cores.
- instance_
name str - instance name.
- memory float
- memory size.
- operation_
timing str - operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
- tdcpg_
instance_ strid - ID of the resource.
- cluster
Id String - cluster id.
- cpu Number
- cpu cores.
- instance
Name String - instance name.
- memory Number
- memory size.
- operation
Timing String - operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
- tdcpg
Instance StringId - ID of the resource.
Import
tdcpg instance can be imported using the id, e.g.
$ pulumi import tencentcloud:index/tdcpgInstance:TdcpgInstance instance cluster_id#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.