published on Tuesday, Jun 30, 2026 by tencentcloudstack
published on Tuesday, Jun 30, 2026 by tencentcloudstack
Example Usage
Text-type credential, plaintext
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.SsmSecret("example", {
secretName: "tf-example",
description: "desc.",
recoveryWindowInDays: 0,
isEnabled: true,
});
const v1 = new tencentcloud.SsmSecretVersionV2("v1", {
secretName: example.secretName,
versionId: "v1",
secretString: "this is secret string",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.SsmSecret("example",
secret_name="tf-example",
description="desc.",
recovery_window_in_days=0,
is_enabled=True)
v1 = tencentcloud.SsmSecretVersionV2("v1",
secret_name=example.secret_name,
version_id="v1",
secret_string="this is secret string")
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 {
example, err := tencentcloud.NewSsmSecret(ctx, "example", &tencentcloud.SsmSecretArgs{
SecretName: pulumi.String("tf-example"),
Description: pulumi.String("desc."),
RecoveryWindowInDays: pulumi.Float64(0),
IsEnabled: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = tencentcloud.NewSsmSecretVersionV2(ctx, "v1", &tencentcloud.SsmSecretVersionV2Args{
SecretName: example.SecretName,
VersionId: pulumi.String("v1"),
SecretString: pulumi.String("this is secret string"),
})
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.SsmSecret("example", new()
{
SecretName = "tf-example",
Description = "desc.",
RecoveryWindowInDays = 0,
IsEnabled = true,
});
var v1 = new Tencentcloud.SsmSecretVersionV2("v1", new()
{
SecretName = example.SecretName,
VersionId = "v1",
SecretString = "this is secret string",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.SsmSecret;
import com.pulumi.tencentcloud.SsmSecretArgs;
import com.pulumi.tencentcloud.SsmSecretVersionV2;
import com.pulumi.tencentcloud.SsmSecretVersionV2Args;
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 SsmSecret("example", SsmSecretArgs.builder()
.secretName("tf-example")
.description("desc.")
.recoveryWindowInDays(0.0)
.isEnabled(true)
.build());
var v1 = new SsmSecretVersionV2("v1", SsmSecretVersionV2Args.builder()
.secretName(example.secretName())
.versionId("v1")
.secretString("this is secret string")
.build());
}
}
resources:
example:
type: tencentcloud:SsmSecret
properties:
secretName: tf-example
description: desc.
recoveryWindowInDays: 0
isEnabled: true
v1:
type: tencentcloud:SsmSecretVersionV2
properties:
secretName: ${example.secretName}
versionId: v1
secretString: this is secret string
Example coming soon!
Write-only credential (value not persisted in state)
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const wo = new tencentcloud.SsmSecretVersionV2("wo", {
secretName: example.secretName,
versionId: "wo",
secretStringWo: "this value is never persisted in plan or state",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
wo = tencentcloud.SsmSecretVersionV2("wo",
secret_name=example["secretName"],
version_id="wo",
secret_string_wo="this value is never persisted in plan or state")
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.NewSsmSecretVersionV2(ctx, "wo", &tencentcloud.SsmSecretVersionV2Args{
SecretName: pulumi.Any(example.SecretName),
VersionId: pulumi.String("wo"),
SecretStringWo: pulumi.String("this value is never persisted in plan or state"),
})
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 wo = new Tencentcloud.SsmSecretVersionV2("wo", new()
{
SecretName = example.SecretName,
VersionId = "wo",
SecretStringWo = "this value is never persisted in plan or state",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.SsmSecretVersionV2;
import com.pulumi.tencentcloud.SsmSecretVersionV2Args;
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 wo = new SsmSecretVersionV2("wo", SsmSecretVersionV2Args.builder()
.secretName(example.secretName())
.versionId("wo")
.secretStringWo("this value is never persisted in plan or state")
.build());
}
}
resources:
wo:
type: tencentcloud:SsmSecretVersionV2
properties:
secretName: ${example.secretName}
versionId: wo
secretStringWo: this value is never persisted in plan or state
Example coming soon!
Binary credential, encoded using base64
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const v2 = new tencentcloud.SsmSecretVersionV2("v2", {
secretName: example.secretName,
versionId: "v2",
secretBinary: "MTIzMTIzMTIzMTIzMTIzQQ==",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
v2 = tencentcloud.SsmSecretVersionV2("v2",
secret_name=example["secretName"],
version_id="v2",
secret_binary="MTIzMTIzMTIzMTIzMTIzQQ==")
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.NewSsmSecretVersionV2(ctx, "v2", &tencentcloud.SsmSecretVersionV2Args{
SecretName: pulumi.Any(example.SecretName),
VersionId: pulumi.String("v2"),
SecretBinary: pulumi.String("MTIzMTIzMTIzMTIzMTIzQQ=="),
})
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 v2 = new Tencentcloud.SsmSecretVersionV2("v2", new()
{
SecretName = example.SecretName,
VersionId = "v2",
SecretBinary = "MTIzMTIzMTIzMTIzMTIzQQ==",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.SsmSecretVersionV2;
import com.pulumi.tencentcloud.SsmSecretVersionV2Args;
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 v2 = new SsmSecretVersionV2("v2", SsmSecretVersionV2Args.builder()
.secretName(example.secretName())
.versionId("v2")
.secretBinary("MTIzMTIzMTIzMTIzMTIzQQ==")
.build());
}
}
resources:
v2:
type: tencentcloud:SsmSecretVersionV2
properties:
secretName: ${example.secretName}
versionId: v2
secretBinary: MTIzMTIzMTIzMTIzMTIzQQ==
Example coming soon!
Create SsmSecretVersionV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SsmSecretVersionV2(name: string, args: SsmSecretVersionV2Args, opts?: CustomResourceOptions);@overload
def SsmSecretVersionV2(resource_name: str,
args: SsmSecretVersionV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def SsmSecretVersionV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
secret_name: Optional[str] = None,
version_id: Optional[str] = None,
secret_binary: Optional[str] = None,
secret_string: Optional[str] = None,
secret_string_wo: Optional[str] = None)func NewSsmSecretVersionV2(ctx *Context, name string, args SsmSecretVersionV2Args, opts ...ResourceOption) (*SsmSecretVersionV2, error)public SsmSecretVersionV2(string name, SsmSecretVersionV2Args args, CustomResourceOptions? opts = null)
public SsmSecretVersionV2(String name, SsmSecretVersionV2Args args)
public SsmSecretVersionV2(String name, SsmSecretVersionV2Args args, CustomResourceOptions options)
type: tencentcloud:SsmSecretVersionV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "tencentcloud_ssmsecretversionv2" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args SsmSecretVersionV2Args
- 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 SsmSecretVersionV2Args
- 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 SsmSecretVersionV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SsmSecretVersionV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SsmSecretVersionV2Args
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
SsmSecretVersionV2 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 SsmSecretVersionV2 resource accepts the following input properties:
- Secret
Name string - Specifies the name of the credential to which the new version is to be added.
- Version
Id string - Specifies the version ID for the newly added version. It can be up to 64 bytes in length and must consist of a combination of letters, numbers, and the characters
-,_, or., starting with a letter or a number. - Secret
Binary string - Binary credential information, encoded using Base64. Conflicts with secret_string and secret_string_wo.
- Secret
String string - Text-based credential information in plaintext (Base64 encoding is not required). Conflicts with secret_binary and secret_string_wo.
- Secret
String stringWo - Write-only text-based credential information. Its value is sent to the API but never persisted in pulumi preview or state. Conflicts with secret_binary and secret_string.
- Secret
Name string - Specifies the name of the credential to which the new version is to be added.
- Version
Id string - Specifies the version ID for the newly added version. It can be up to 64 bytes in length and must consist of a combination of letters, numbers, and the characters
-,_, or., starting with a letter or a number. - Secret
Binary string - Binary credential information, encoded using Base64. Conflicts with secret_string and secret_string_wo.
- Secret
String string - Text-based credential information in plaintext (Base64 encoding is not required). Conflicts with secret_binary and secret_string_wo.
- Secret
String stringWo - Write-only text-based credential information. Its value is sent to the API but never persisted in pulumi preview or state. Conflicts with secret_binary and secret_string.
- secret_
name string - Specifies the name of the credential to which the new version is to be added.
- version_
id string - Specifies the version ID for the newly added version. It can be up to 64 bytes in length and must consist of a combination of letters, numbers, and the characters
-,_, or., starting with a letter or a number. - secret_
binary string - Binary credential information, encoded using Base64. Conflicts with secret_string and secret_string_wo.
- secret_
string string - Text-based credential information in plaintext (Base64 encoding is not required). Conflicts with secret_binary and secret_string_wo.
- secret_
string_ stringwo - Write-only text-based credential information. Its value is sent to the API but never persisted in pulumi preview or state. Conflicts with secret_binary and secret_string.
- secret
Name String - Specifies the name of the credential to which the new version is to be added.
- version
Id String - Specifies the version ID for the newly added version. It can be up to 64 bytes in length and must consist of a combination of letters, numbers, and the characters
-,_, or., starting with a letter or a number. - secret
Binary String - Binary credential information, encoded using Base64. Conflicts with secret_string and secret_string_wo.
- secret
String String - Text-based credential information in plaintext (Base64 encoding is not required). Conflicts with secret_binary and secret_string_wo.
- secret
String StringWo - Write-only text-based credential information. Its value is sent to the API but never persisted in pulumi preview or state. Conflicts with secret_binary and secret_string.
- secret
Name string - Specifies the name of the credential to which the new version is to be added.
- version
Id string - Specifies the version ID for the newly added version. It can be up to 64 bytes in length and must consist of a combination of letters, numbers, and the characters
-,_, or., starting with a letter or a number. - secret
Binary string - Binary credential information, encoded using Base64. Conflicts with secret_string and secret_string_wo.
- secret
String string - Text-based credential information in plaintext (Base64 encoding is not required). Conflicts with secret_binary and secret_string_wo.
- secret
String stringWo - Write-only text-based credential information. Its value is sent to the API but never persisted in pulumi preview or state. Conflicts with secret_binary and secret_string.
- secret_
name str - Specifies the name of the credential to which the new version is to be added.
- version_
id str - Specifies the version ID for the newly added version. It can be up to 64 bytes in length and must consist of a combination of letters, numbers, and the characters
-,_, or., starting with a letter or a number. - secret_
binary str - Binary credential information, encoded using Base64. Conflicts with secret_string and secret_string_wo.
- secret_
string str - Text-based credential information in plaintext (Base64 encoding is not required). Conflicts with secret_binary and secret_string_wo.
- secret_
string_ strwo - Write-only text-based credential information. Its value is sent to the API but never persisted in pulumi preview or state. Conflicts with secret_binary and secret_string.
- secret
Name String - Specifies the name of the credential to which the new version is to be added.
- version
Id String - Specifies the version ID for the newly added version. It can be up to 64 bytes in length and must consist of a combination of letters, numbers, and the characters
-,_, or., starting with a letter or a number. - secret
Binary String - Binary credential information, encoded using Base64. Conflicts with secret_string and secret_string_wo.
- secret
String String - Text-based credential information in plaintext (Base64 encoding is not required). Conflicts with secret_binary and secret_string_wo.
- secret
String StringWo - Write-only text-based credential information. Its value is sent to the API but never persisted in pulumi preview or state. Conflicts with secret_binary and secret_string.
Outputs
All input properties are implicitly available as output properties. Additionally, the SsmSecretVersionV2 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 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 SsmSecretVersionV2 Resource
Get an existing SsmSecretVersionV2 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?: SsmSecretVersionV2State, opts?: CustomResourceOptions): SsmSecretVersionV2@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
secret_binary: Optional[str] = None,
secret_name: Optional[str] = None,
secret_string: Optional[str] = None,
secret_string_wo: Optional[str] = None,
version_id: Optional[str] = None) -> SsmSecretVersionV2func GetSsmSecretVersionV2(ctx *Context, name string, id IDInput, state *SsmSecretVersionV2State, opts ...ResourceOption) (*SsmSecretVersionV2, error)public static SsmSecretVersionV2 Get(string name, Input<string> id, SsmSecretVersionV2State? state, CustomResourceOptions? opts = null)public static SsmSecretVersionV2 get(String name, Output<String> id, SsmSecretVersionV2State state, CustomResourceOptions options)resources: _: type: tencentcloud:SsmSecretVersionV2 get: id: ${id}import {
to = tencentcloud_ssmsecretversionv2.example
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.
- Secret
Binary string - Binary credential information, encoded using Base64. Conflicts with secret_string and secret_string_wo.
- Secret
Name string - Specifies the name of the credential to which the new version is to be added.
- Secret
String string - Text-based credential information in plaintext (Base64 encoding is not required). Conflicts with secret_binary and secret_string_wo.
- Secret
String stringWo - Write-only text-based credential information. Its value is sent to the API but never persisted in pulumi preview or state. Conflicts with secret_binary and secret_string.
- Version
Id string - Specifies the version ID for the newly added version. It can be up to 64 bytes in length and must consist of a combination of letters, numbers, and the characters
-,_, or., starting with a letter or a number.
- Secret
Binary string - Binary credential information, encoded using Base64. Conflicts with secret_string and secret_string_wo.
- Secret
Name string - Specifies the name of the credential to which the new version is to be added.
- Secret
String string - Text-based credential information in plaintext (Base64 encoding is not required). Conflicts with secret_binary and secret_string_wo.
- Secret
String stringWo - Write-only text-based credential information. Its value is sent to the API but never persisted in pulumi preview or state. Conflicts with secret_binary and secret_string.
- Version
Id string - Specifies the version ID for the newly added version. It can be up to 64 bytes in length and must consist of a combination of letters, numbers, and the characters
-,_, or., starting with a letter or a number.
- secret_
binary string - Binary credential information, encoded using Base64. Conflicts with secret_string and secret_string_wo.
- secret_
name string - Specifies the name of the credential to which the new version is to be added.
- secret_
string string - Text-based credential information in plaintext (Base64 encoding is not required). Conflicts with secret_binary and secret_string_wo.
- secret_
string_ stringwo - Write-only text-based credential information. Its value is sent to the API but never persisted in pulumi preview or state. Conflicts with secret_binary and secret_string.
- version_
id string - Specifies the version ID for the newly added version. It can be up to 64 bytes in length and must consist of a combination of letters, numbers, and the characters
-,_, or., starting with a letter or a number.
- secret
Binary String - Binary credential information, encoded using Base64. Conflicts with secret_string and secret_string_wo.
- secret
Name String - Specifies the name of the credential to which the new version is to be added.
- secret
String String - Text-based credential information in plaintext (Base64 encoding is not required). Conflicts with secret_binary and secret_string_wo.
- secret
String StringWo - Write-only text-based credential information. Its value is sent to the API but never persisted in pulumi preview or state. Conflicts with secret_binary and secret_string.
- version
Id String - Specifies the version ID for the newly added version. It can be up to 64 bytes in length and must consist of a combination of letters, numbers, and the characters
-,_, or., starting with a letter or a number.
- secret
Binary string - Binary credential information, encoded using Base64. Conflicts with secret_string and secret_string_wo.
- secret
Name string - Specifies the name of the credential to which the new version is to be added.
- secret
String string - Text-based credential information in plaintext (Base64 encoding is not required). Conflicts with secret_binary and secret_string_wo.
- secret
String stringWo - Write-only text-based credential information. Its value is sent to the API but never persisted in pulumi preview or state. Conflicts with secret_binary and secret_string.
- version
Id string - Specifies the version ID for the newly added version. It can be up to 64 bytes in length and must consist of a combination of letters, numbers, and the characters
-,_, or., starting with a letter or a number.
- secret_
binary str - Binary credential information, encoded using Base64. Conflicts with secret_string and secret_string_wo.
- secret_
name str - Specifies the name of the credential to which the new version is to be added.
- secret_
string str - Text-based credential information in plaintext (Base64 encoding is not required). Conflicts with secret_binary and secret_string_wo.
- secret_
string_ strwo - Write-only text-based credential information. Its value is sent to the API but never persisted in pulumi preview or state. Conflicts with secret_binary and secret_string.
- version_
id str - Specifies the version ID for the newly added version. It can be up to 64 bytes in length and must consist of a combination of letters, numbers, and the characters
-,_, or., starting with a letter or a number.
- secret
Binary String - Binary credential information, encoded using Base64. Conflicts with secret_string and secret_string_wo.
- secret
Name String - Specifies the name of the credential to which the new version is to be added.
- secret
String String - Text-based credential information in plaintext (Base64 encoding is not required). Conflicts with secret_binary and secret_string_wo.
- secret
String StringWo - Write-only text-based credential information. Its value is sent to the API but never persisted in pulumi preview or state. Conflicts with secret_binary and secret_string.
- version
Id String - Specifies the version ID for the newly added version. It can be up to 64 bytes in length and must consist of a combination of letters, numbers, and the characters
-,_, or., starting with a letter or a number.
Import
SSM secret version (v2) can be imported using secretName#versionId, e.g.
$ pulumi import tencentcloud:index/ssmSecretVersionV2:SsmSecretVersionV2 v1 test#v1
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
tencentcloudTerraform Provider.
published on Tuesday, Jun 30, 2026 by tencentcloudstack