tencentcloud.KmsCloudResourceAttachment
Explore with Pulumi AI
Provides a resource to create a kms cloud_resource_attachment
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.KmsCloudResourceAttachment("example", {
keyId: "72688f39-1fe8-11ee-9f1a-525400cf25a4",
productId: "mysql",
resourceId: "cdb-fitq5t9h",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.KmsCloudResourceAttachment("example",
key_id="72688f39-1fe8-11ee-9f1a-525400cf25a4",
product_id="mysql",
resource_id="cdb-fitq5t9h")
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.NewKmsCloudResourceAttachment(ctx, "example", &tencentcloud.KmsCloudResourceAttachmentArgs{
KeyId: pulumi.String("72688f39-1fe8-11ee-9f1a-525400cf25a4"),
ProductId: pulumi.String("mysql"),
ResourceId: pulumi.String("cdb-fitq5t9h"),
})
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 example = new Tencentcloud.KmsCloudResourceAttachment("example", new()
{
KeyId = "72688f39-1fe8-11ee-9f1a-525400cf25a4",
ProductId = "mysql",
ResourceId = "cdb-fitq5t9h",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.KmsCloudResourceAttachment;
import com.pulumi.tencentcloud.KmsCloudResourceAttachmentArgs;
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 example = new KmsCloudResourceAttachment("example", KmsCloudResourceAttachmentArgs.builder()
.keyId("72688f39-1fe8-11ee-9f1a-525400cf25a4")
.productId("mysql")
.resourceId("cdb-fitq5t9h")
.build());
}
}
resources:
example:
type: tencentcloud:KmsCloudResourceAttachment
properties:
keyId: 72688f39-1fe8-11ee-9f1a-525400cf25a4
productId: mysql
resourceId: cdb-fitq5t9h
Create KmsCloudResourceAttachment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new KmsCloudResourceAttachment(name: string, args: KmsCloudResourceAttachmentArgs, opts?: CustomResourceOptions);
@overload
def KmsCloudResourceAttachment(resource_name: str,
args: KmsCloudResourceAttachmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def KmsCloudResourceAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
key_id: Optional[str] = None,
product_id: Optional[str] = None,
resource_id: Optional[str] = None,
kms_cloud_resource_attachment_id: Optional[str] = None)
func NewKmsCloudResourceAttachment(ctx *Context, name string, args KmsCloudResourceAttachmentArgs, opts ...ResourceOption) (*KmsCloudResourceAttachment, error)
public KmsCloudResourceAttachment(string name, KmsCloudResourceAttachmentArgs args, CustomResourceOptions? opts = null)
public KmsCloudResourceAttachment(String name, KmsCloudResourceAttachmentArgs args)
public KmsCloudResourceAttachment(String name, KmsCloudResourceAttachmentArgs args, CustomResourceOptions options)
type: tencentcloud:KmsCloudResourceAttachment
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 KmsCloudResourceAttachmentArgs
- 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 KmsCloudResourceAttachmentArgs
- 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 KmsCloudResourceAttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KmsCloudResourceAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KmsCloudResourceAttachmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
KmsCloudResourceAttachment 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 KmsCloudResourceAttachment resource accepts the following input properties:
- Key
Id string - CMK unique identifier.
- Product
Id string - A unique identifier for the cloud product.
- Resource
Id string - The resource/instance ID of the cloud product.
- Kms
Cloud stringResource Attachment Id - ID of the resource.
- Key
Id string - CMK unique identifier.
- Product
Id string - A unique identifier for the cloud product.
- Resource
Id string - The resource/instance ID of the cloud product.
- Kms
Cloud stringResource Attachment Id - ID of the resource.
- key
Id String - CMK unique identifier.
- product
Id String - A unique identifier for the cloud product.
- resource
Id String - The resource/instance ID of the cloud product.
- kms
Cloud StringResource Attachment Id - ID of the resource.
- key
Id string - CMK unique identifier.
- product
Id string - A unique identifier for the cloud product.
- resource
Id string - The resource/instance ID of the cloud product.
- kms
Cloud stringResource Attachment Id - ID of the resource.
- key_
id str - CMK unique identifier.
- product_
id str - A unique identifier for the cloud product.
- resource_
id str - The resource/instance ID of the cloud product.
- kms_
cloud_ strresource_ attachment_ id - ID of the resource.
- key
Id String - CMK unique identifier.
- product
Id String - A unique identifier for the cloud product.
- resource
Id String - The resource/instance ID of the cloud product.
- kms
Cloud StringResource Attachment Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the KmsCloudResourceAttachment resource produces the following output properties:
Look up Existing KmsCloudResourceAttachment Resource
Get an existing KmsCloudResourceAttachment 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?: KmsCloudResourceAttachmentState, opts?: CustomResourceOptions): KmsCloudResourceAttachment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alias: Optional[str] = None,
description: Optional[str] = None,
key_id: Optional[str] = None,
key_state: Optional[str] = None,
key_usage: Optional[str] = None,
kms_cloud_resource_attachment_id: Optional[str] = None,
owner: Optional[str] = None,
product_id: Optional[str] = None,
resource_id: Optional[str] = None) -> KmsCloudResourceAttachment
func GetKmsCloudResourceAttachment(ctx *Context, name string, id IDInput, state *KmsCloudResourceAttachmentState, opts ...ResourceOption) (*KmsCloudResourceAttachment, error)
public static KmsCloudResourceAttachment Get(string name, Input<string> id, KmsCloudResourceAttachmentState? state, CustomResourceOptions? opts = null)
public static KmsCloudResourceAttachment get(String name, Output<String> id, KmsCloudResourceAttachmentState state, CustomResourceOptions options)
resources: _: type: tencentcloud:KmsCloudResourceAttachment 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.
- Alias string
- Alias.
- Description string
- Description.
- Key
Id string - CMK unique identifier.
- Key
State string - Key state.
- Key
Usage string - Key usage.
- Kms
Cloud stringResource Attachment Id - ID of the resource.
- Owner string
- owner.
- Product
Id string - A unique identifier for the cloud product.
- Resource
Id string - The resource/instance ID of the cloud product.
- Alias string
- Alias.
- Description string
- Description.
- Key
Id string - CMK unique identifier.
- Key
State string - Key state.
- Key
Usage string - Key usage.
- Kms
Cloud stringResource Attachment Id - ID of the resource.
- Owner string
- owner.
- Product
Id string - A unique identifier for the cloud product.
- Resource
Id string - The resource/instance ID of the cloud product.
- alias String
- Alias.
- description String
- Description.
- key
Id String - CMK unique identifier.
- key
State String - Key state.
- key
Usage String - Key usage.
- kms
Cloud StringResource Attachment Id - ID of the resource.
- owner String
- owner.
- product
Id String - A unique identifier for the cloud product.
- resource
Id String - The resource/instance ID of the cloud product.
- alias string
- Alias.
- description string
- Description.
- key
Id string - CMK unique identifier.
- key
State string - Key state.
- key
Usage string - Key usage.
- kms
Cloud stringResource Attachment Id - ID of the resource.
- owner string
- owner.
- product
Id string - A unique identifier for the cloud product.
- resource
Id string - The resource/instance ID of the cloud product.
- alias str
- Alias.
- description str
- Description.
- key_
id str - CMK unique identifier.
- key_
state str - Key state.
- key_
usage str - Key usage.
- kms_
cloud_ strresource_ attachment_ id - ID of the resource.
- owner str
- owner.
- product_
id str - A unique identifier for the cloud product.
- resource_
id str - The resource/instance ID of the cloud product.
- alias String
- Alias.
- description String
- Description.
- key
Id String - CMK unique identifier.
- key
State String - Key state.
- key
Usage String - Key usage.
- kms
Cloud StringResource Attachment Id - ID of the resource.
- owner String
- owner.
- product
Id String - A unique identifier for the cloud product.
- resource
Id String - The resource/instance ID of the cloud product.
Import
kms cloud_resource_attachment can be imported using the id, e.g.
$ pulumi import tencentcloud:index/kmsCloudResourceAttachment:KmsCloudResourceAttachment example 72688f39-1fe8-11ee-9f1a-525400cf25a4#mysql#cdb-fitq5t9h
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.