tencentcloud.SsmProductSecret
Explore with Pulumi AI
Provides a resource to create a ssm product_secret
Example Usage
Ssm secret for mysql
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const zones = tencentcloud.getAvailabilityZonesByProduct({
product: "cdb",
});
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 securityGroup = new tencentcloud.SecurityGroup("securityGroup", {description: "desc."});
const exampleMysqlInstance = new tencentcloud.MysqlInstance("exampleMysqlInstance", {
internetService: 1,
engineVersion: "5.7",
chargeType: "POSTPAID",
rootPassword: "PassWord123",
slaveDeployMode: 0,
availabilityZone: zones.then(zones => zones.zones?.[0]?.name),
slaveSyncMode: 1,
instanceName: "tf-example",
memSize: 4000,
volumeSize: 200,
vpcId: vpc.vpcId,
subnetId: subnet.subnetId,
intranetPort: 3306,
securityGroups: [securityGroup.securityGroupId],
tags: {
createBy: "terraform",
},
parameters: {
character_set_server: "utf8",
max_connections: "1000",
},
});
const exampleKmsKey = new tencentcloud.KmsKey("exampleKmsKey", {
alias: "tf-example-kms-key",
description: "example of kms key",
keyRotationEnabled: false,
isEnabled: true,
tags: {
createdBy: "terraform",
},
});
const exampleSsmProductSecret = new tencentcloud.SsmProductSecret("exampleSsmProductSecret", {
secretName: "tf-example",
userNamePrefix: "prefix",
productName: "Mysql",
instanceId: exampleMysqlInstance.mysqlInstanceId,
domains: ["10.0.0.0"],
privilegesLists: [{
privilegeName: "GlobalPrivileges",
privileges: ["ALTER ROUTINE"],
}],
description: "for ssm product test",
kmsKeyId: exampleKmsKey.kmsKeyId,
status: "Enabled",
enableRotation: true,
rotationBeginTime: "2023-08-05 20:54:33",
rotationFrequency: 30,
tags: {
createdBy: "terraform",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
zones = tencentcloud.get_availability_zones_by_product(product="cdb")
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)
security_group = tencentcloud.SecurityGroup("securityGroup", description="desc.")
example_mysql_instance = tencentcloud.MysqlInstance("exampleMysqlInstance",
internet_service=1,
engine_version="5.7",
charge_type="POSTPAID",
root_password="PassWord123",
slave_deploy_mode=0,
availability_zone=zones.zones[0].name,
slave_sync_mode=1,
instance_name="tf-example",
mem_size=4000,
volume_size=200,
vpc_id=vpc.vpc_id,
subnet_id=subnet.subnet_id,
intranet_port=3306,
security_groups=[security_group.security_group_id],
tags={
"createBy": "terraform",
},
parameters={
"character_set_server": "utf8",
"max_connections": "1000",
})
example_kms_key = tencentcloud.KmsKey("exampleKmsKey",
alias="tf-example-kms-key",
description="example of kms key",
key_rotation_enabled=False,
is_enabled=True,
tags={
"createdBy": "terraform",
})
example_ssm_product_secret = tencentcloud.SsmProductSecret("exampleSsmProductSecret",
secret_name="tf-example",
user_name_prefix="prefix",
product_name="Mysql",
instance_id=example_mysql_instance.mysql_instance_id,
domains=["10.0.0.0"],
privileges_lists=[{
"privilege_name": "GlobalPrivileges",
"privileges": ["ALTER ROUTINE"],
}],
description="for ssm product test",
kms_key_id=example_kms_key.kms_key_id,
status="Enabled",
enable_rotation=True,
rotation_begin_time="2023-08-05 20:54:33",
rotation_frequency=30,
tags={
"createdBy": "terraform",
})
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.GetAvailabilityZonesByProduct(ctx, &tencentcloud.GetAvailabilityZonesByProductArgs{
Product: "cdb",
}, 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
}
securityGroup, err := tencentcloud.NewSecurityGroup(ctx, "securityGroup", &tencentcloud.SecurityGroupArgs{
Description: pulumi.String("desc."),
})
if err != nil {
return err
}
exampleMysqlInstance, err := tencentcloud.NewMysqlInstance(ctx, "exampleMysqlInstance", &tencentcloud.MysqlInstanceArgs{
InternetService: pulumi.Float64(1),
EngineVersion: pulumi.String("5.7"),
ChargeType: pulumi.String("POSTPAID"),
RootPassword: pulumi.String("PassWord123"),
SlaveDeployMode: pulumi.Float64(0),
AvailabilityZone: pulumi.String(zones.Zones[0].Name),
SlaveSyncMode: pulumi.Float64(1),
InstanceName: pulumi.String("tf-example"),
MemSize: pulumi.Float64(4000),
VolumeSize: pulumi.Float64(200),
VpcId: vpc.VpcId,
SubnetId: subnet.SubnetId,
IntranetPort: pulumi.Float64(3306),
SecurityGroups: pulumi.StringArray{
securityGroup.SecurityGroupId,
},
Tags: pulumi.StringMap{
"createBy": pulumi.String("terraform"),
},
Parameters: pulumi.StringMap{
"character_set_server": pulumi.String("utf8"),
"max_connections": pulumi.String("1000"),
},
})
if err != nil {
return err
}
exampleKmsKey, err := tencentcloud.NewKmsKey(ctx, "exampleKmsKey", &tencentcloud.KmsKeyArgs{
Alias: pulumi.String("tf-example-kms-key"),
Description: pulumi.String("example of kms key"),
KeyRotationEnabled: pulumi.Bool(false),
IsEnabled: pulumi.Bool(true),
Tags: pulumi.StringMap{
"createdBy": pulumi.String("terraform"),
},
})
if err != nil {
return err
}
_, err = tencentcloud.NewSsmProductSecret(ctx, "exampleSsmProductSecret", &tencentcloud.SsmProductSecretArgs{
SecretName: pulumi.String("tf-example"),
UserNamePrefix: pulumi.String("prefix"),
ProductName: pulumi.String("Mysql"),
InstanceId: exampleMysqlInstance.MysqlInstanceId,
Domains: pulumi.StringArray{
pulumi.String("10.0.0.0"),
},
PrivilegesLists: tencentcloud.SsmProductSecretPrivilegesListArray{
&tencentcloud.SsmProductSecretPrivilegesListArgs{
PrivilegeName: pulumi.String("GlobalPrivileges"),
Privileges: pulumi.StringArray{
pulumi.String("ALTER ROUTINE"),
},
},
},
Description: pulumi.String("for ssm product test"),
KmsKeyId: exampleKmsKey.KmsKeyId,
Status: pulumi.String("Enabled"),
EnableRotation: pulumi.Bool(true),
RotationBeginTime: pulumi.String("2023-08-05 20:54:33"),
RotationFrequency: pulumi.Float64(30),
Tags: pulumi.StringMap{
"createdBy": pulumi.String("terraform"),
},
})
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.GetAvailabilityZonesByProduct.Invoke(new()
{
Product = "cdb",
});
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
var subnet = new Tencentcloud.Subnet("subnet", new()
{
AvailabilityZone = zones.Apply(getAvailabilityZonesByProductResult => getAvailabilityZonesByProductResult.Zones[0]?.Name),
VpcId = vpc.VpcId,
CidrBlock = "10.0.0.0/16",
IsMulticast = false,
});
var securityGroup = new Tencentcloud.SecurityGroup("securityGroup", new()
{
Description = "desc.",
});
var exampleMysqlInstance = new Tencentcloud.MysqlInstance("exampleMysqlInstance", new()
{
InternetService = 1,
EngineVersion = "5.7",
ChargeType = "POSTPAID",
RootPassword = "PassWord123",
SlaveDeployMode = 0,
AvailabilityZone = zones.Apply(getAvailabilityZonesByProductResult => getAvailabilityZonesByProductResult.Zones[0]?.Name),
SlaveSyncMode = 1,
InstanceName = "tf-example",
MemSize = 4000,
VolumeSize = 200,
VpcId = vpc.VpcId,
SubnetId = subnet.SubnetId,
IntranetPort = 3306,
SecurityGroups = new[]
{
securityGroup.SecurityGroupId,
},
Tags =
{
{ "createBy", "terraform" },
},
Parameters =
{
{ "character_set_server", "utf8" },
{ "max_connections", "1000" },
},
});
var exampleKmsKey = new Tencentcloud.KmsKey("exampleKmsKey", new()
{
Alias = "tf-example-kms-key",
Description = "example of kms key",
KeyRotationEnabled = false,
IsEnabled = true,
Tags =
{
{ "createdBy", "terraform" },
},
});
var exampleSsmProductSecret = new Tencentcloud.SsmProductSecret("exampleSsmProductSecret", new()
{
SecretName = "tf-example",
UserNamePrefix = "prefix",
ProductName = "Mysql",
InstanceId = exampleMysqlInstance.MysqlInstanceId,
Domains = new[]
{
"10.0.0.0",
},
PrivilegesLists = new[]
{
new Tencentcloud.Inputs.SsmProductSecretPrivilegesListArgs
{
PrivilegeName = "GlobalPrivileges",
Privileges = new[]
{
"ALTER ROUTINE",
},
},
},
Description = "for ssm product test",
KmsKeyId = exampleKmsKey.KmsKeyId,
Status = "Enabled",
EnableRotation = true,
RotationBeginTime = "2023-08-05 20:54:33",
RotationFrequency = 30,
Tags =
{
{ "createdBy", "terraform" },
},
});
});
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.GetAvailabilityZonesByProductArgs;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.SecurityGroup;
import com.pulumi.tencentcloud.SecurityGroupArgs;
import com.pulumi.tencentcloud.MysqlInstance;
import com.pulumi.tencentcloud.MysqlInstanceArgs;
import com.pulumi.tencentcloud.KmsKey;
import com.pulumi.tencentcloud.KmsKeyArgs;
import com.pulumi.tencentcloud.SsmProductSecret;
import com.pulumi.tencentcloud.SsmProductSecretArgs;
import com.pulumi.tencentcloud.inputs.SsmProductSecretPrivilegesListArgs;
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.getAvailabilityZonesByProduct(GetAvailabilityZonesByProductArgs.builder()
.product("cdb")
.build());
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
var subnet = new Subnet("subnet", SubnetArgs.builder()
.availabilityZone(zones.applyValue(getAvailabilityZonesByProductResult -> getAvailabilityZonesByProductResult.zones()[0].name()))
.vpcId(vpc.vpcId())
.cidrBlock("10.0.0.0/16")
.isMulticast(false)
.build());
var securityGroup = new SecurityGroup("securityGroup", SecurityGroupArgs.builder()
.description("desc.")
.build());
var exampleMysqlInstance = new MysqlInstance("exampleMysqlInstance", MysqlInstanceArgs.builder()
.internetService(1)
.engineVersion("5.7")
.chargeType("POSTPAID")
.rootPassword("PassWord123")
.slaveDeployMode(0)
.availabilityZone(zones.applyValue(getAvailabilityZonesByProductResult -> getAvailabilityZonesByProductResult.zones()[0].name()))
.slaveSyncMode(1)
.instanceName("tf-example")
.memSize(4000)
.volumeSize(200)
.vpcId(vpc.vpcId())
.subnetId(subnet.subnetId())
.intranetPort(3306)
.securityGroups(securityGroup.securityGroupId())
.tags(Map.of("createBy", "terraform"))
.parameters(Map.ofEntries(
Map.entry("character_set_server", "utf8"),
Map.entry("max_connections", "1000")
))
.build());
var exampleKmsKey = new KmsKey("exampleKmsKey", KmsKeyArgs.builder()
.alias("tf-example-kms-key")
.description("example of kms key")
.keyRotationEnabled(false)
.isEnabled(true)
.tags(Map.of("createdBy", "terraform"))
.build());
var exampleSsmProductSecret = new SsmProductSecret("exampleSsmProductSecret", SsmProductSecretArgs.builder()
.secretName("tf-example")
.userNamePrefix("prefix")
.productName("Mysql")
.instanceId(exampleMysqlInstance.mysqlInstanceId())
.domains("10.0.0.0")
.privilegesLists(SsmProductSecretPrivilegesListArgs.builder()
.privilegeName("GlobalPrivileges")
.privileges("ALTER ROUTINE")
.build())
.description("for ssm product test")
.kmsKeyId(exampleKmsKey.kmsKeyId())
.status("Enabled")
.enableRotation(true)
.rotationBeginTime("2023-08-05 20:54:33")
.rotationFrequency(30)
.tags(Map.of("createdBy", "terraform"))
.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
securityGroup:
type: tencentcloud:SecurityGroup
properties:
description: desc.
exampleMysqlInstance:
type: tencentcloud:MysqlInstance
properties:
internetService: 1
engineVersion: '5.7'
chargeType: POSTPAID
rootPassword: PassWord123
slaveDeployMode: 0
availabilityZone: ${zones.zones[0].name}
slaveSyncMode: 1
instanceName: tf-example
memSize: 4000
volumeSize: 200
vpcId: ${vpc.vpcId}
subnetId: ${subnet.subnetId}
intranetPort: 3306
securityGroups:
- ${securityGroup.securityGroupId}
tags:
createBy: terraform
parameters:
character_set_server: utf8
max_connections: '1000'
exampleKmsKey:
type: tencentcloud:KmsKey
properties:
alias: tf-example-kms-key
description: example of kms key
keyRotationEnabled: false
isEnabled: true
tags:
createdBy: terraform
exampleSsmProductSecret:
type: tencentcloud:SsmProductSecret
properties:
secretName: tf-example
userNamePrefix: prefix
productName: Mysql
instanceId: ${exampleMysqlInstance.mysqlInstanceId}
domains:
- 10.0.0.0
privilegesLists:
- privilegeName: GlobalPrivileges
privileges:
- ALTER ROUTINE
description: for ssm product test
kmsKeyId: ${exampleKmsKey.kmsKeyId}
status: Enabled
enableRotation: true
rotationBeginTime: 2023-08-05 20:54:33
rotationFrequency: 30
tags:
createdBy: terraform
variables:
zones:
fn::invoke:
function: tencentcloud:getAvailabilityZonesByProduct
arguments:
product: cdb
Ssm secret for tdsql-c-mysql
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.SsmProductSecret("example", {
secretName: "tf-tdsql-c-example",
userNamePrefix: "prefix",
productName: "Tdsql_C_Mysql",
instanceId: "cynosdbmysql-xxxxxx",
domains: ["%"],
privilegesLists: [
{
privilegeName: "GlobalPrivileges",
privileges: [
"ALTER",
"CREATE",
"DELETE",
],
},
{
privilegeName: "DatabasePrivileges",
database: "test",
privileges: [
"ALTER",
"CREATE",
"DELETE",
"SELECT",
],
},
],
description: "test tdsql-c",
kmsKeyId: undefined,
status: "Enabled",
enableRotation: false,
rotationBeginTime: "2023-08-05 20:54:33",
rotationFrequency: 30,
tags: {
createdBy: "terraform",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.SsmProductSecret("example",
secret_name="tf-tdsql-c-example",
user_name_prefix="prefix",
product_name="Tdsql_C_Mysql",
instance_id="cynosdbmysql-xxxxxx",
domains=["%"],
privileges_lists=[
{
"privilege_name": "GlobalPrivileges",
"privileges": [
"ALTER",
"CREATE",
"DELETE",
],
},
{
"privilege_name": "DatabasePrivileges",
"database": "test",
"privileges": [
"ALTER",
"CREATE",
"DELETE",
"SELECT",
],
},
],
description="test tdsql-c",
kms_key_id=None,
status="Enabled",
enable_rotation=False,
rotation_begin_time="2023-08-05 20:54:33",
rotation_frequency=30,
tags={
"createdBy": "terraform",
})
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.NewSsmProductSecret(ctx, "example", &tencentcloud.SsmProductSecretArgs{
SecretName: pulumi.String("tf-tdsql-c-example"),
UserNamePrefix: pulumi.String("prefix"),
ProductName: pulumi.String("Tdsql_C_Mysql"),
InstanceId: pulumi.String("cynosdbmysql-xxxxxx"),
Domains: pulumi.StringArray{
pulumi.String("%"),
},
PrivilegesLists: tencentcloud.SsmProductSecretPrivilegesListArray{
&tencentcloud.SsmProductSecretPrivilegesListArgs{
PrivilegeName: pulumi.String("GlobalPrivileges"),
Privileges: pulumi.StringArray{
pulumi.String("ALTER"),
pulumi.String("CREATE"),
pulumi.String("DELETE"),
},
},
&tencentcloud.SsmProductSecretPrivilegesListArgs{
PrivilegeName: pulumi.String("DatabasePrivileges"),
Database: pulumi.String("test"),
Privileges: pulumi.StringArray{
pulumi.String("ALTER"),
pulumi.String("CREATE"),
pulumi.String("DELETE"),
pulumi.String("SELECT"),
},
},
},
Description: pulumi.String("test tdsql-c"),
KmsKeyId: nil,
Status: pulumi.String("Enabled"),
EnableRotation: pulumi.Bool(false),
RotationBeginTime: pulumi.String("2023-08-05 20:54:33"),
RotationFrequency: pulumi.Float64(30),
Tags: pulumi.StringMap{
"createdBy": pulumi.String("terraform"),
},
})
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.SsmProductSecret("example", new()
{
SecretName = "tf-tdsql-c-example",
UserNamePrefix = "prefix",
ProductName = "Tdsql_C_Mysql",
InstanceId = "cynosdbmysql-xxxxxx",
Domains = new[]
{
"%",
},
PrivilegesLists = new[]
{
new Tencentcloud.Inputs.SsmProductSecretPrivilegesListArgs
{
PrivilegeName = "GlobalPrivileges",
Privileges = new[]
{
"ALTER",
"CREATE",
"DELETE",
},
},
new Tencentcloud.Inputs.SsmProductSecretPrivilegesListArgs
{
PrivilegeName = "DatabasePrivileges",
Database = "test",
Privileges = new[]
{
"ALTER",
"CREATE",
"DELETE",
"SELECT",
},
},
},
Description = "test tdsql-c",
KmsKeyId = null,
Status = "Enabled",
EnableRotation = false,
RotationBeginTime = "2023-08-05 20:54:33",
RotationFrequency = 30,
Tags =
{
{ "createdBy", "terraform" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.SsmProductSecret;
import com.pulumi.tencentcloud.SsmProductSecretArgs;
import com.pulumi.tencentcloud.inputs.SsmProductSecretPrivilegesListArgs;
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 SsmProductSecret("example", SsmProductSecretArgs.builder()
.secretName("tf-tdsql-c-example")
.userNamePrefix("prefix")
.productName("Tdsql_C_Mysql")
.instanceId("cynosdbmysql-xxxxxx")
.domains("%")
.privilegesLists(
SsmProductSecretPrivilegesListArgs.builder()
.privilegeName("GlobalPrivileges")
.privileges(
"ALTER",
"CREATE",
"DELETE")
.build(),
SsmProductSecretPrivilegesListArgs.builder()
.privilegeName("DatabasePrivileges")
.database("test")
.privileges(
"ALTER",
"CREATE",
"DELETE",
"SELECT")
.build())
.description("test tdsql-c")
.kmsKeyId(null)
.status("Enabled")
.enableRotation(false)
.rotationBeginTime("2023-08-05 20:54:33")
.rotationFrequency(30)
.tags(Map.of("createdBy", "terraform"))
.build());
}
}
resources:
example:
type: tencentcloud:SsmProductSecret
properties:
secretName: tf-tdsql-c-example
userNamePrefix: prefix
productName: Tdsql_C_Mysql
instanceId: cynosdbmysql-xxxxxx
domains:
- '%'
privilegesLists:
- privilegeName: GlobalPrivileges
privileges:
- ALTER
- CREATE
- DELETE
- privilegeName: DatabasePrivileges
database: test
privileges:
- ALTER
- CREATE
- DELETE
- SELECT
description: test tdsql-c
kmsKeyId: null
status: Enabled
enableRotation: false
rotationBeginTime: 2023-08-05 20:54:33
rotationFrequency: 30
tags:
createdBy: terraform
Create SsmProductSecret Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SsmProductSecret(name: string, args: SsmProductSecretArgs, opts?: CustomResourceOptions);
@overload
def SsmProductSecret(resource_name: str,
args: SsmProductSecretArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SsmProductSecret(resource_name: str,
opts: Optional[ResourceOptions] = None,
product_name: Optional[str] = None,
domains: Optional[Sequence[str]] = None,
user_name_prefix: Optional[str] = None,
instance_id: Optional[str] = None,
secret_name: Optional[str] = None,
privileges_lists: Optional[Sequence[SsmProductSecretPrivilegesListArgs]] = None,
tags: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
rotation_frequency: Optional[float] = None,
kms_key_id: Optional[str] = None,
ssm_product_secret_id: Optional[str] = None,
status: Optional[str] = None,
rotation_begin_time: Optional[str] = None,
enable_rotation: Optional[bool] = None)
func NewSsmProductSecret(ctx *Context, name string, args SsmProductSecretArgs, opts ...ResourceOption) (*SsmProductSecret, error)
public SsmProductSecret(string name, SsmProductSecretArgs args, CustomResourceOptions? opts = null)
public SsmProductSecret(String name, SsmProductSecretArgs args)
public SsmProductSecret(String name, SsmProductSecretArgs args, CustomResourceOptions options)
type: tencentcloud:SsmProductSecret
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 SsmProductSecretArgs
- 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 SsmProductSecretArgs
- 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 SsmProductSecretArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SsmProductSecretArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SsmProductSecretArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
SsmProductSecret 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 SsmProductSecret resource accepts the following input properties:
- Domains List<string>
- Domain name of the account in the form of IP. You can enter
%
. - Instance
Id string - Tencent Cloud service instance ID.
- Privileges
Lists List<SsmProduct Secret Privileges List> - List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
- Product
Name string - Name of the Tencent Cloud service bound to the credential, such as
Mysql
,Tdsql-mysql
,Tdsql_C_Mysql
. you can use dataSourcetencentcloud.getSsmProducts
to query supported products. - Secret
Name string - Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
- User
Name stringPrefix - Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
- Description string
- Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
- Enable
Rotation bool - Specifies whether to enable rotation, when secret status is
Disabled
, rotation will be disabled.True
- enable,False
- do not enable. If this parameter is not specified,False
will be used by default. - Kms
Key stringId - Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
- Rotation
Begin stringTime - User-Defined rotation start time in the format of 2006-01-02 15:04:05.When
EnableRotation
isTrue
, this parameter is required. - Rotation
Frequency double - Rotation frequency in days. Default value: 1 day.
- Ssm
Product stringSecret Id - ID of the resource.
- Status string
- Enable or Disable Secret. Valid values is
Enabled
orDisabled
. Default isEnabled
. - Dictionary<string, string>
- Tags of secret.
- Domains []string
- Domain name of the account in the form of IP. You can enter
%
. - Instance
Id string - Tencent Cloud service instance ID.
- Privileges
Lists []SsmProduct Secret Privileges List Args - List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
- Product
Name string - Name of the Tencent Cloud service bound to the credential, such as
Mysql
,Tdsql-mysql
,Tdsql_C_Mysql
. you can use dataSourcetencentcloud.getSsmProducts
to query supported products. - Secret
Name string - Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
- User
Name stringPrefix - Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
- Description string
- Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
- Enable
Rotation bool - Specifies whether to enable rotation, when secret status is
Disabled
, rotation will be disabled.True
- enable,False
- do not enable. If this parameter is not specified,False
will be used by default. - Kms
Key stringId - Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
- Rotation
Begin stringTime - User-Defined rotation start time in the format of 2006-01-02 15:04:05.When
EnableRotation
isTrue
, this parameter is required. - Rotation
Frequency float64 - Rotation frequency in days. Default value: 1 day.
- Ssm
Product stringSecret Id - ID of the resource.
- Status string
- Enable or Disable Secret. Valid values is
Enabled
orDisabled
. Default isEnabled
. - map[string]string
- Tags of secret.
- domains List<String>
- Domain name of the account in the form of IP. You can enter
%
. - instance
Id String - Tencent Cloud service instance ID.
- privileges
Lists List<SsmProduct Secret Privileges List> - List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
- product
Name String - Name of the Tencent Cloud service bound to the credential, such as
Mysql
,Tdsql-mysql
,Tdsql_C_Mysql
. you can use dataSourcetencentcloud.getSsmProducts
to query supported products. - secret
Name String - Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
- user
Name StringPrefix - Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
- description String
- Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
- enable
Rotation Boolean - Specifies whether to enable rotation, when secret status is
Disabled
, rotation will be disabled.True
- enable,False
- do not enable. If this parameter is not specified,False
will be used by default. - kms
Key StringId - Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
- rotation
Begin StringTime - User-Defined rotation start time in the format of 2006-01-02 15:04:05.When
EnableRotation
isTrue
, this parameter is required. - rotation
Frequency Double - Rotation frequency in days. Default value: 1 day.
- ssm
Product StringSecret Id - ID of the resource.
- status String
- Enable or Disable Secret. Valid values is
Enabled
orDisabled
. Default isEnabled
. - Map<String,String>
- Tags of secret.
- domains string[]
- Domain name of the account in the form of IP. You can enter
%
. - instance
Id string - Tencent Cloud service instance ID.
- privileges
Lists SsmProduct Secret Privileges List[] - List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
- product
Name string - Name of the Tencent Cloud service bound to the credential, such as
Mysql
,Tdsql-mysql
,Tdsql_C_Mysql
. you can use dataSourcetencentcloud.getSsmProducts
to query supported products. - secret
Name string - Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
- user
Name stringPrefix - Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
- description string
- Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
- enable
Rotation boolean - Specifies whether to enable rotation, when secret status is
Disabled
, rotation will be disabled.True
- enable,False
- do not enable. If this parameter is not specified,False
will be used by default. - kms
Key stringId - Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
- rotation
Begin stringTime - User-Defined rotation start time in the format of 2006-01-02 15:04:05.When
EnableRotation
isTrue
, this parameter is required. - rotation
Frequency number - Rotation frequency in days. Default value: 1 day.
- ssm
Product stringSecret Id - ID of the resource.
- status string
- Enable or Disable Secret. Valid values is
Enabled
orDisabled
. Default isEnabled
. - {[key: string]: string}
- Tags of secret.
- domains Sequence[str]
- Domain name of the account in the form of IP. You can enter
%
. - instance_
id str - Tencent Cloud service instance ID.
- privileges_
lists Sequence[SsmProduct Secret Privileges List Args] - List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
- product_
name str - Name of the Tencent Cloud service bound to the credential, such as
Mysql
,Tdsql-mysql
,Tdsql_C_Mysql
. you can use dataSourcetencentcloud.getSsmProducts
to query supported products. - secret_
name str - Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
- user_
name_ strprefix - Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
- description str
- Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
- enable_
rotation bool - Specifies whether to enable rotation, when secret status is
Disabled
, rotation will be disabled.True
- enable,False
- do not enable. If this parameter is not specified,False
will be used by default. - kms_
key_ strid - Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
- rotation_
begin_ strtime - User-Defined rotation start time in the format of 2006-01-02 15:04:05.When
EnableRotation
isTrue
, this parameter is required. - rotation_
frequency float - Rotation frequency in days. Default value: 1 day.
- ssm_
product_ strsecret_ id - ID of the resource.
- status str
- Enable or Disable Secret. Valid values is
Enabled
orDisabled
. Default isEnabled
. - Mapping[str, str]
- Tags of secret.
- domains List<String>
- Domain name of the account in the form of IP. You can enter
%
. - instance
Id String - Tencent Cloud service instance ID.
- privileges
Lists List<Property Map> - List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
- product
Name String - Name of the Tencent Cloud service bound to the credential, such as
Mysql
,Tdsql-mysql
,Tdsql_C_Mysql
. you can use dataSourcetencentcloud.getSsmProducts
to query supported products. - secret
Name String - Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
- user
Name StringPrefix - Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
- description String
- Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
- enable
Rotation Boolean - Specifies whether to enable rotation, when secret status is
Disabled
, rotation will be disabled.True
- enable,False
- do not enable. If this parameter is not specified,False
will be used by default. - kms
Key StringId - Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
- rotation
Begin StringTime - User-Defined rotation start time in the format of 2006-01-02 15:04:05.When
EnableRotation
isTrue
, this parameter is required. - rotation
Frequency Number - Rotation frequency in days. Default value: 1 day.
- ssm
Product StringSecret Id - ID of the resource.
- status String
- Enable or Disable Secret. Valid values is
Enabled
orDisabled
. Default isEnabled
. - Map<String>
- Tags of secret.
Outputs
All input properties are implicitly available as output properties. Additionally, the SsmProductSecret resource produces the following output properties:
- Create
Time double - Credential creation time in UNIX timestamp format.
- Id string
- The provider-assigned unique ID for this managed resource.
- Secret
Type double 0
: user-defined secret.1
: Tencent Cloud services secret.2
: SSH key secret.3
: Tencent Cloud API key secret. Note: this field may returnnull
, indicating that no valid values can be obtained.
- Create
Time float64 - Credential creation time in UNIX timestamp format.
- Id string
- The provider-assigned unique ID for this managed resource.
- Secret
Type float64 0
: user-defined secret.1
: Tencent Cloud services secret.2
: SSH key secret.3
: Tencent Cloud API key secret. Note: this field may returnnull
, indicating that no valid values can be obtained.
- create
Time Double - Credential creation time in UNIX timestamp format.
- id String
- The provider-assigned unique ID for this managed resource.
- secret
Type Double 0
: user-defined secret.1
: Tencent Cloud services secret.2
: SSH key secret.3
: Tencent Cloud API key secret. Note: this field may returnnull
, indicating that no valid values can be obtained.
- create
Time number - Credential creation time in UNIX timestamp format.
- id string
- The provider-assigned unique ID for this managed resource.
- secret
Type number 0
: user-defined secret.1
: Tencent Cloud services secret.2
: SSH key secret.3
: Tencent Cloud API key secret. Note: this field may returnnull
, indicating that no valid values can be obtained.
- create_
time float - Credential creation time in UNIX timestamp format.
- id str
- The provider-assigned unique ID for this managed resource.
- secret_
type float 0
: user-defined secret.1
: Tencent Cloud services secret.2
: SSH key secret.3
: Tencent Cloud API key secret. Note: this field may returnnull
, indicating that no valid values can be obtained.
- create
Time Number - Credential creation time in UNIX timestamp format.
- id String
- The provider-assigned unique ID for this managed resource.
- secret
Type Number 0
: user-defined secret.1
: Tencent Cloud services secret.2
: SSH key secret.3
: Tencent Cloud API key secret. Note: this field may returnnull
, indicating that no valid values can be obtained.
Look up Existing SsmProductSecret Resource
Get an existing SsmProductSecret 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?: SsmProductSecretState, opts?: CustomResourceOptions): SsmProductSecret
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[float] = None,
description: Optional[str] = None,
domains: Optional[Sequence[str]] = None,
enable_rotation: Optional[bool] = None,
instance_id: Optional[str] = None,
kms_key_id: Optional[str] = None,
privileges_lists: Optional[Sequence[SsmProductSecretPrivilegesListArgs]] = None,
product_name: Optional[str] = None,
rotation_begin_time: Optional[str] = None,
rotation_frequency: Optional[float] = None,
secret_name: Optional[str] = None,
secret_type: Optional[float] = None,
ssm_product_secret_id: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
user_name_prefix: Optional[str] = None) -> SsmProductSecret
func GetSsmProductSecret(ctx *Context, name string, id IDInput, state *SsmProductSecretState, opts ...ResourceOption) (*SsmProductSecret, error)
public static SsmProductSecret Get(string name, Input<string> id, SsmProductSecretState? state, CustomResourceOptions? opts = null)
public static SsmProductSecret get(String name, Output<String> id, SsmProductSecretState state, CustomResourceOptions options)
resources: _: type: tencentcloud:SsmProductSecret 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.
- Create
Time double - Credential creation time in UNIX timestamp format.
- Description string
- Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
- Domains List<string>
- Domain name of the account in the form of IP. You can enter
%
. - Enable
Rotation bool - Specifies whether to enable rotation, when secret status is
Disabled
, rotation will be disabled.True
- enable,False
- do not enable. If this parameter is not specified,False
will be used by default. - Instance
Id string - Tencent Cloud service instance ID.
- Kms
Key stringId - Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
- Privileges
Lists List<SsmProduct Secret Privileges List> - List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
- Product
Name string - Name of the Tencent Cloud service bound to the credential, such as
Mysql
,Tdsql-mysql
,Tdsql_C_Mysql
. you can use dataSourcetencentcloud.getSsmProducts
to query supported products. - Rotation
Begin stringTime - User-Defined rotation start time in the format of 2006-01-02 15:04:05.When
EnableRotation
isTrue
, this parameter is required. - Rotation
Frequency double - Rotation frequency in days. Default value: 1 day.
- Secret
Name string - Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
- Secret
Type double 0
: user-defined secret.1
: Tencent Cloud services secret.2
: SSH key secret.3
: Tencent Cloud API key secret. Note: this field may returnnull
, indicating that no valid values can be obtained.- Ssm
Product stringSecret Id - ID of the resource.
- Status string
- Enable or Disable Secret. Valid values is
Enabled
orDisabled
. Default isEnabled
. - Dictionary<string, string>
- Tags of secret.
- User
Name stringPrefix - Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
- Create
Time float64 - Credential creation time in UNIX timestamp format.
- Description string
- Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
- Domains []string
- Domain name of the account in the form of IP. You can enter
%
. - Enable
Rotation bool - Specifies whether to enable rotation, when secret status is
Disabled
, rotation will be disabled.True
- enable,False
- do not enable. If this parameter is not specified,False
will be used by default. - Instance
Id string - Tencent Cloud service instance ID.
- Kms
Key stringId - Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
- Privileges
Lists []SsmProduct Secret Privileges List Args - List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
- Product
Name string - Name of the Tencent Cloud service bound to the credential, such as
Mysql
,Tdsql-mysql
,Tdsql_C_Mysql
. you can use dataSourcetencentcloud.getSsmProducts
to query supported products. - Rotation
Begin stringTime - User-Defined rotation start time in the format of 2006-01-02 15:04:05.When
EnableRotation
isTrue
, this parameter is required. - Rotation
Frequency float64 - Rotation frequency in days. Default value: 1 day.
- Secret
Name string - Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
- Secret
Type float64 0
: user-defined secret.1
: Tencent Cloud services secret.2
: SSH key secret.3
: Tencent Cloud API key secret. Note: this field may returnnull
, indicating that no valid values can be obtained.- Ssm
Product stringSecret Id - ID of the resource.
- Status string
- Enable or Disable Secret. Valid values is
Enabled
orDisabled
. Default isEnabled
. - map[string]string
- Tags of secret.
- User
Name stringPrefix - Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
- create
Time Double - Credential creation time in UNIX timestamp format.
- description String
- Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
- domains List<String>
- Domain name of the account in the form of IP. You can enter
%
. - enable
Rotation Boolean - Specifies whether to enable rotation, when secret status is
Disabled
, rotation will be disabled.True
- enable,False
- do not enable. If this parameter is not specified,False
will be used by default. - instance
Id String - Tencent Cloud service instance ID.
- kms
Key StringId - Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
- privileges
Lists List<SsmProduct Secret Privileges List> - List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
- product
Name String - Name of the Tencent Cloud service bound to the credential, such as
Mysql
,Tdsql-mysql
,Tdsql_C_Mysql
. you can use dataSourcetencentcloud.getSsmProducts
to query supported products. - rotation
Begin StringTime - User-Defined rotation start time in the format of 2006-01-02 15:04:05.When
EnableRotation
isTrue
, this parameter is required. - rotation
Frequency Double - Rotation frequency in days. Default value: 1 day.
- secret
Name String - Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
- secret
Type Double 0
: user-defined secret.1
: Tencent Cloud services secret.2
: SSH key secret.3
: Tencent Cloud API key secret. Note: this field may returnnull
, indicating that no valid values can be obtained.- ssm
Product StringSecret Id - ID of the resource.
- status String
- Enable or Disable Secret. Valid values is
Enabled
orDisabled
. Default isEnabled
. - Map<String,String>
- Tags of secret.
- user
Name StringPrefix - Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
- create
Time number - Credential creation time in UNIX timestamp format.
- description string
- Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
- domains string[]
- Domain name of the account in the form of IP. You can enter
%
. - enable
Rotation boolean - Specifies whether to enable rotation, when secret status is
Disabled
, rotation will be disabled.True
- enable,False
- do not enable. If this parameter is not specified,False
will be used by default. - instance
Id string - Tencent Cloud service instance ID.
- kms
Key stringId - Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
- privileges
Lists SsmProduct Secret Privileges List[] - List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
- product
Name string - Name of the Tencent Cloud service bound to the credential, such as
Mysql
,Tdsql-mysql
,Tdsql_C_Mysql
. you can use dataSourcetencentcloud.getSsmProducts
to query supported products. - rotation
Begin stringTime - User-Defined rotation start time in the format of 2006-01-02 15:04:05.When
EnableRotation
isTrue
, this parameter is required. - rotation
Frequency number - Rotation frequency in days. Default value: 1 day.
- secret
Name string - Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
- secret
Type number 0
: user-defined secret.1
: Tencent Cloud services secret.2
: SSH key secret.3
: Tencent Cloud API key secret. Note: this field may returnnull
, indicating that no valid values can be obtained.- ssm
Product stringSecret Id - ID of the resource.
- status string
- Enable or Disable Secret. Valid values is
Enabled
orDisabled
. Default isEnabled
. - {[key: string]: string}
- Tags of secret.
- user
Name stringPrefix - Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
- create_
time float - Credential creation time in UNIX timestamp format.
- description str
- Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
- domains Sequence[str]
- Domain name of the account in the form of IP. You can enter
%
. - enable_
rotation bool - Specifies whether to enable rotation, when secret status is
Disabled
, rotation will be disabled.True
- enable,False
- do not enable. If this parameter is not specified,False
will be used by default. - instance_
id str - Tencent Cloud service instance ID.
- kms_
key_ strid - Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
- privileges_
lists Sequence[SsmProduct Secret Privileges List Args] - List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
- product_
name str - Name of the Tencent Cloud service bound to the credential, such as
Mysql
,Tdsql-mysql
,Tdsql_C_Mysql
. you can use dataSourcetencentcloud.getSsmProducts
to query supported products. - rotation_
begin_ strtime - User-Defined rotation start time in the format of 2006-01-02 15:04:05.When
EnableRotation
isTrue
, this parameter is required. - rotation_
frequency float - Rotation frequency in days. Default value: 1 day.
- secret_
name str - Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
- secret_
type float 0
: user-defined secret.1
: Tencent Cloud services secret.2
: SSH key secret.3
: Tencent Cloud API key secret. Note: this field may returnnull
, indicating that no valid values can be obtained.- ssm_
product_ strsecret_ id - ID of the resource.
- status str
- Enable or Disable Secret. Valid values is
Enabled
orDisabled
. Default isEnabled
. - Mapping[str, str]
- Tags of secret.
- user_
name_ strprefix - Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
- create
Time Number - Credential creation time in UNIX timestamp format.
- description String
- Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
- domains List<String>
- Domain name of the account in the form of IP. You can enter
%
. - enable
Rotation Boolean - Specifies whether to enable rotation, when secret status is
Disabled
, rotation will be disabled.True
- enable,False
- do not enable. If this parameter is not specified,False
will be used by default. - instance
Id String - Tencent Cloud service instance ID.
- kms
Key StringId - Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
- privileges
Lists List<Property Map> - List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
- product
Name String - Name of the Tencent Cloud service bound to the credential, such as
Mysql
,Tdsql-mysql
,Tdsql_C_Mysql
. you can use dataSourcetencentcloud.getSsmProducts
to query supported products. - rotation
Begin StringTime - User-Defined rotation start time in the format of 2006-01-02 15:04:05.When
EnableRotation
isTrue
, this parameter is required. - rotation
Frequency Number - Rotation frequency in days. Default value: 1 day.
- secret
Name String - Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
- secret
Type Number 0
: user-defined secret.1
: Tencent Cloud services secret.2
: SSH key secret.3
: Tencent Cloud API key secret. Note: this field may returnnull
, indicating that no valid values can be obtained.- ssm
Product StringSecret Id - ID of the resource.
- status String
- Enable or Disable Secret. Valid values is
Enabled
orDisabled
. Default isEnabled
. - Map<String>
- Tags of secret.
- user
Name StringPrefix - Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
Supporting Types
SsmProductSecretPrivilegesList, SsmProductSecretPrivilegesListArgs
- Privilege
Name string - Permission name. Valid values:
GlobalPrivileges
,DatabasePrivileges
,TablePrivileges
,ColumnPrivileges
. When the permission isDatabasePrivileges
, the database name must be specified by theDatabase
parameter; When the permission isTablePrivileges
, the database name and the table name in the database must be specified by theDatabase
andTableName
parameters; When the permission isColumnPrivileges
, the database name, table name in the database, and column name in the table must be specified by theDatabase
,TableName
, andColumnName
parameters. - Privileges List<string>
- Permission list. For the
Mysql
service, optional permission values are: 1. Valid values ofGlobalPrivileges
: SELECT,INSERT,UPDATE,DELETE,CREATE, PROCESS, DROP,REFERENCES,INDEX,ALTER,SHOW DATABASES,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 2. Valid values ofDatabasePrivileges
: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 3. Valid values ofTablePrivileges
: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE VIEW,SHOW VIEW, TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 4. Valid values ofColumnPrivileges
: SELECT,INSERT,UPDATE,REFERENCES.Note: if this parameter is not passed in, it means to clear the permission. - Column
Name string - This value takes effect only when
PrivilegeName
isColumnPrivileges
, and the following parameters are required in this case:Database: explicitly indicate the database instance.TableName: explicitly indicate the table. - Database string
- This value takes effect only when
PrivilegeName
isDatabasePrivileges
. - Table
Name string - This value takes effect only when
PrivilegeName
isTablePrivileges
, and theDatabase
parameter is required in this case to explicitly indicate the database instance.
- Privilege
Name string - Permission name. Valid values:
GlobalPrivileges
,DatabasePrivileges
,TablePrivileges
,ColumnPrivileges
. When the permission isDatabasePrivileges
, the database name must be specified by theDatabase
parameter; When the permission isTablePrivileges
, the database name and the table name in the database must be specified by theDatabase
andTableName
parameters; When the permission isColumnPrivileges
, the database name, table name in the database, and column name in the table must be specified by theDatabase
,TableName
, andColumnName
parameters. - Privileges []string
- Permission list. For the
Mysql
service, optional permission values are: 1. Valid values ofGlobalPrivileges
: SELECT,INSERT,UPDATE,DELETE,CREATE, PROCESS, DROP,REFERENCES,INDEX,ALTER,SHOW DATABASES,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 2. Valid values ofDatabasePrivileges
: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 3. Valid values ofTablePrivileges
: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE VIEW,SHOW VIEW, TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 4. Valid values ofColumnPrivileges
: SELECT,INSERT,UPDATE,REFERENCES.Note: if this parameter is not passed in, it means to clear the permission. - Column
Name string - This value takes effect only when
PrivilegeName
isColumnPrivileges
, and the following parameters are required in this case:Database: explicitly indicate the database instance.TableName: explicitly indicate the table. - Database string
- This value takes effect only when
PrivilegeName
isDatabasePrivileges
. - Table
Name string - This value takes effect only when
PrivilegeName
isTablePrivileges
, and theDatabase
parameter is required in this case to explicitly indicate the database instance.
- privilege
Name String - Permission name. Valid values:
GlobalPrivileges
,DatabasePrivileges
,TablePrivileges
,ColumnPrivileges
. When the permission isDatabasePrivileges
, the database name must be specified by theDatabase
parameter; When the permission isTablePrivileges
, the database name and the table name in the database must be specified by theDatabase
andTableName
parameters; When the permission isColumnPrivileges
, the database name, table name in the database, and column name in the table must be specified by theDatabase
,TableName
, andColumnName
parameters. - privileges List<String>
- Permission list. For the
Mysql
service, optional permission values are: 1. Valid values ofGlobalPrivileges
: SELECT,INSERT,UPDATE,DELETE,CREATE, PROCESS, DROP,REFERENCES,INDEX,ALTER,SHOW DATABASES,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 2. Valid values ofDatabasePrivileges
: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 3. Valid values ofTablePrivileges
: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE VIEW,SHOW VIEW, TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 4. Valid values ofColumnPrivileges
: SELECT,INSERT,UPDATE,REFERENCES.Note: if this parameter is not passed in, it means to clear the permission. - column
Name String - This value takes effect only when
PrivilegeName
isColumnPrivileges
, and the following parameters are required in this case:Database: explicitly indicate the database instance.TableName: explicitly indicate the table. - database String
- This value takes effect only when
PrivilegeName
isDatabasePrivileges
. - table
Name String - This value takes effect only when
PrivilegeName
isTablePrivileges
, and theDatabase
parameter is required in this case to explicitly indicate the database instance.
- privilege
Name string - Permission name. Valid values:
GlobalPrivileges
,DatabasePrivileges
,TablePrivileges
,ColumnPrivileges
. When the permission isDatabasePrivileges
, the database name must be specified by theDatabase
parameter; When the permission isTablePrivileges
, the database name and the table name in the database must be specified by theDatabase
andTableName
parameters; When the permission isColumnPrivileges
, the database name, table name in the database, and column name in the table must be specified by theDatabase
,TableName
, andColumnName
parameters. - privileges string[]
- Permission list. For the
Mysql
service, optional permission values are: 1. Valid values ofGlobalPrivileges
: SELECT,INSERT,UPDATE,DELETE,CREATE, PROCESS, DROP,REFERENCES,INDEX,ALTER,SHOW DATABASES,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 2. Valid values ofDatabasePrivileges
: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 3. Valid values ofTablePrivileges
: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE VIEW,SHOW VIEW, TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 4. Valid values ofColumnPrivileges
: SELECT,INSERT,UPDATE,REFERENCES.Note: if this parameter is not passed in, it means to clear the permission. - column
Name string - This value takes effect only when
PrivilegeName
isColumnPrivileges
, and the following parameters are required in this case:Database: explicitly indicate the database instance.TableName: explicitly indicate the table. - database string
- This value takes effect only when
PrivilegeName
isDatabasePrivileges
. - table
Name string - This value takes effect only when
PrivilegeName
isTablePrivileges
, and theDatabase
parameter is required in this case to explicitly indicate the database instance.
- privilege_
name str - Permission name. Valid values:
GlobalPrivileges
,DatabasePrivileges
,TablePrivileges
,ColumnPrivileges
. When the permission isDatabasePrivileges
, the database name must be specified by theDatabase
parameter; When the permission isTablePrivileges
, the database name and the table name in the database must be specified by theDatabase
andTableName
parameters; When the permission isColumnPrivileges
, the database name, table name in the database, and column name in the table must be specified by theDatabase
,TableName
, andColumnName
parameters. - privileges Sequence[str]
- Permission list. For the
Mysql
service, optional permission values are: 1. Valid values ofGlobalPrivileges
: SELECT,INSERT,UPDATE,DELETE,CREATE, PROCESS, DROP,REFERENCES,INDEX,ALTER,SHOW DATABASES,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 2. Valid values ofDatabasePrivileges
: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 3. Valid values ofTablePrivileges
: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE VIEW,SHOW VIEW, TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 4. Valid values ofColumnPrivileges
: SELECT,INSERT,UPDATE,REFERENCES.Note: if this parameter is not passed in, it means to clear the permission. - column_
name str - This value takes effect only when
PrivilegeName
isColumnPrivileges
, and the following parameters are required in this case:Database: explicitly indicate the database instance.TableName: explicitly indicate the table. - database str
- This value takes effect only when
PrivilegeName
isDatabasePrivileges
. - table_
name str - This value takes effect only when
PrivilegeName
isTablePrivileges
, and theDatabase
parameter is required in this case to explicitly indicate the database instance.
- privilege
Name String - Permission name. Valid values:
GlobalPrivileges
,DatabasePrivileges
,TablePrivileges
,ColumnPrivileges
. When the permission isDatabasePrivileges
, the database name must be specified by theDatabase
parameter; When the permission isTablePrivileges
, the database name and the table name in the database must be specified by theDatabase
andTableName
parameters; When the permission isColumnPrivileges
, the database name, table name in the database, and column name in the table must be specified by theDatabase
,TableName
, andColumnName
parameters. - privileges List<String>
- Permission list. For the
Mysql
service, optional permission values are: 1. Valid values ofGlobalPrivileges
: SELECT,INSERT,UPDATE,DELETE,CREATE, PROCESS, DROP,REFERENCES,INDEX,ALTER,SHOW DATABASES,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 2. Valid values ofDatabasePrivileges
: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 3. Valid values ofTablePrivileges
: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE VIEW,SHOW VIEW, TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 4. Valid values ofColumnPrivileges
: SELECT,INSERT,UPDATE,REFERENCES.Note: if this parameter is not passed in, it means to clear the permission. - column
Name String - This value takes effect only when
PrivilegeName
isColumnPrivileges
, and the following parameters are required in this case:Database: explicitly indicate the database instance.TableName: explicitly indicate the table. - database String
- This value takes effect only when
PrivilegeName
isDatabasePrivileges
. - table
Name String - This value takes effect only when
PrivilegeName
isTablePrivileges
, and theDatabase
parameter is required in this case to explicitly indicate the database instance.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.