published on Friday, Jun 19, 2026 by tencentcloudstack
published on Friday, Jun 19, 2026 by tencentcloudstack
Provide a resource to create a SSM secret version.
Note: A maximum of 10 versions can be supported under one credential. Only new versions can be added to credentials in the enabled and disabled states.
Example Usage
Text type credential information 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,
tags: {
createdBy: "terraform",
},
});
const v1 = new tencentcloud.SsmSecretVersion("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,
tags={
"createdBy": "terraform",
})
v1 = tencentcloud.SsmSecretVersion("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),
Tags: pulumi.StringMap{
"createdBy": pulumi.String("terraform"),
},
})
if err != nil {
return err
}
_, err = tencentcloud.NewSsmSecretVersion(ctx, "v1", &tencentcloud.SsmSecretVersionArgs{
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,
Tags =
{
{ "createdBy", "terraform" },
},
});
var v1 = new Tencentcloud.SsmSecretVersion("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.SsmSecretVersion;
import com.pulumi.tencentcloud.SsmSecretVersionArgs;
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)
.tags(Map.of("createdBy", "terraform"))
.build());
var v1 = new SsmSecretVersion("v1", SsmSecretVersionArgs.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
tags:
createdBy: terraform
v1:
type: tencentcloud:SsmSecretVersion
properties:
secretName: ${example.secretName}
versionId: v1
secretString: this is secret string
Example coming soon!
Binary credential information, encoded using base64
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const v2 = new tencentcloud.SsmSecretVersion("v2", {
secretName: example.secretName,
versionId: "v2",
secretBinary: "MTIzMTIzMTIzMTIzMTIzQQ==",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
v2 = tencentcloud.SsmSecretVersion("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.NewSsmSecretVersion(ctx, "v2", &tencentcloud.SsmSecretVersionArgs{
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.SsmSecretVersion("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.SsmSecretVersion;
import com.pulumi.tencentcloud.SsmSecretVersionArgs;
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 SsmSecretVersion("v2", SsmSecretVersionArgs.builder()
.secretName(example.secretName())
.versionId("v2")
.secretBinary("MTIzMTIzMTIzMTIzMTIzQQ==")
.build());
}
}
resources:
v2:
type: tencentcloud:SsmSecretVersion
properties:
secretName: ${example.secretName}
versionId: v2
secretBinary: MTIzMTIzMTIzMTIzMTIzQQ==
Example coming soon!
Create SsmSecretVersion Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SsmSecretVersion(name: string, args: SsmSecretVersionArgs, opts?: CustomResourceOptions);@overload
def SsmSecretVersion(resource_name: str,
args: SsmSecretVersionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SsmSecretVersion(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,
ssm_secret_version_id: Optional[str] = None)func NewSsmSecretVersion(ctx *Context, name string, args SsmSecretVersionArgs, opts ...ResourceOption) (*SsmSecretVersion, error)public SsmSecretVersion(string name, SsmSecretVersionArgs args, CustomResourceOptions? opts = null)
public SsmSecretVersion(String name, SsmSecretVersionArgs args)
public SsmSecretVersion(String name, SsmSecretVersionArgs args, CustomResourceOptions options)
type: tencentcloud:SsmSecretVersion
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "tencentcloud_ssmsecretversion" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args SsmSecretVersionArgs
- 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 SsmSecretVersionArgs
- 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 SsmSecretVersionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SsmSecretVersionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SsmSecretVersionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
SsmSecretVersion 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 SsmSecretVersion 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. You must set exactly one of SecretBinary or SecretString.
- Secret
String string - Text-based credential information in plaintext (Base64 encoding is not required). You must set exactly one of SecretBinary or SecretString.
- Ssm
Secret stringVersion Id - ID of the resource.
- 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. You must set exactly one of SecretBinary or SecretString.
- Secret
String string - Text-based credential information in plaintext (Base64 encoding is not required). You must set exactly one of SecretBinary or SecretString.
- Ssm
Secret stringVersion Id - ID of the resource.
- 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. You must set exactly one of SecretBinary or SecretString.
- secret_
string string - Text-based credential information in plaintext (Base64 encoding is not required). You must set exactly one of SecretBinary or SecretString.
- ssm_
secret_ stringversion_ id - ID of the resource.
- 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. You must set exactly one of SecretBinary or SecretString.
- secret
String String - Text-based credential information in plaintext (Base64 encoding is not required). You must set exactly one of SecretBinary or SecretString.
- ssm
Secret StringVersion Id - ID of the resource.
- 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. You must set exactly one of SecretBinary or SecretString.
- secret
String string - Text-based credential information in plaintext (Base64 encoding is not required). You must set exactly one of SecretBinary or SecretString.
- ssm
Secret stringVersion Id - ID of the resource.
- 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. You must set exactly one of SecretBinary or SecretString.
- secret_
string str - Text-based credential information in plaintext (Base64 encoding is not required). You must set exactly one of SecretBinary or SecretString.
- ssm_
secret_ strversion_ id - ID of the resource.
- 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. You must set exactly one of SecretBinary or SecretString.
- secret
String String - Text-based credential information in plaintext (Base64 encoding is not required). You must set exactly one of SecretBinary or SecretString.
- ssm
Secret StringVersion Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the SsmSecretVersion 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 SsmSecretVersion Resource
Get an existing SsmSecretVersion 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?: SsmSecretVersionState, opts?: CustomResourceOptions): SsmSecretVersion@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,
ssm_secret_version_id: Optional[str] = None,
version_id: Optional[str] = None) -> SsmSecretVersionfunc GetSsmSecretVersion(ctx *Context, name string, id IDInput, state *SsmSecretVersionState, opts ...ResourceOption) (*SsmSecretVersion, error)public static SsmSecretVersion Get(string name, Input<string> id, SsmSecretVersionState? state, CustomResourceOptions? opts = null)public static SsmSecretVersion get(String name, Output<String> id, SsmSecretVersionState state, CustomResourceOptions options)resources: _: type: tencentcloud:SsmSecretVersion get: id: ${id}import {
to = tencentcloud_ssmsecretversion.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. You must set exactly one of SecretBinary or SecretString.
- 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). You must set exactly one of SecretBinary or SecretString.
- Ssm
Secret stringVersion Id - ID of the resource.
- 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. You must set exactly one of SecretBinary or SecretString.
- 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). You must set exactly one of SecretBinary or SecretString.
- Ssm
Secret stringVersion Id - ID of the resource.
- 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. You must set exactly one of SecretBinary or SecretString.
- 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). You must set exactly one of SecretBinary or SecretString.
- ssm_
secret_ stringversion_ id - ID of the resource.
- 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. You must set exactly one of SecretBinary or SecretString.
- 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). You must set exactly one of SecretBinary or SecretString.
- ssm
Secret StringVersion Id - ID of the resource.
- 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. You must set exactly one of SecretBinary or SecretString.
- 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). You must set exactly one of SecretBinary or SecretString.
- ssm
Secret stringVersion Id - ID of the resource.
- 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. You must set exactly one of SecretBinary or SecretString.
- 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). You must set exactly one of SecretBinary or SecretString.
- ssm_
secret_ strversion_ id - ID of the resource.
- 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. You must set exactly one of SecretBinary or SecretString.
- 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). You must set exactly one of SecretBinary or SecretString.
- ssm
Secret StringVersion Id - ID of the resource.
- 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 can be imported using the secretName#versionId, e.g.
$ pulumi import tencentcloud:index/ssmSecretVersion:SsmSecretVersion 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 Friday, Jun 19, 2026 by tencentcloudstack