tencentcloud.SsmSecret
Explore with Pulumi AI
Provide a resource to create a SSM secret.
Example Usage
Create user defined secret
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.SsmSecret("example", {
description: "desc.",
isEnabled: true,
recoveryWindowInDays: 0,
secretName: "tf-example",
tags: {
createBy: "terraform",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.SsmSecret("example",
description="desc.",
is_enabled=True,
recovery_window_in_days=0,
secret_name="tf-example",
tags={
"createBy": "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.NewSsmSecret(ctx, "example", &tencentcloud.SsmSecretArgs{
Description: pulumi.String("desc."),
IsEnabled: pulumi.Bool(true),
RecoveryWindowInDays: pulumi.Float64(0),
SecretName: pulumi.String("tf-example"),
Tags: pulumi.StringMap{
"createBy": 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.SsmSecret("example", new()
{
Description = "desc.",
IsEnabled = true,
RecoveryWindowInDays = 0,
SecretName = "tf-example",
Tags =
{
{ "createBy", "terraform" },
},
});
});
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 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()
.description("desc.")
.isEnabled(true)
.recoveryWindowInDays(0)
.secretName("tf-example")
.tags(Map.of("createBy", "terraform"))
.build());
}
}
resources:
example:
type: tencentcloud:SsmSecret
properties:
description: desc.
isEnabled: true
recoveryWindowInDays: 0
secretName: tf-example
tags:
createBy: terraform
Create SsmSecret Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SsmSecret(name: string, args: SsmSecretArgs, opts?: CustomResourceOptions);
@overload
def SsmSecret(resource_name: str,
args: SsmSecretArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SsmSecret(resource_name: str,
opts: Optional[ResourceOptions] = None,
secret_name: Optional[str] = None,
additional_config: Optional[str] = None,
description: Optional[str] = None,
is_enabled: Optional[bool] = None,
kms_key_id: Optional[str] = None,
recovery_window_in_days: Optional[float] = None,
secret_type: Optional[float] = None,
ssm_secret_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewSsmSecret(ctx *Context, name string, args SsmSecretArgs, opts ...ResourceOption) (*SsmSecret, error)
public SsmSecret(string name, SsmSecretArgs args, CustomResourceOptions? opts = null)
public SsmSecret(String name, SsmSecretArgs args)
public SsmSecret(String name, SsmSecretArgs args, CustomResourceOptions options)
type: tencentcloud:SsmSecret
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 SsmSecretArgs
- 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 SsmSecretArgs
- 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 SsmSecretArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SsmSecretArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SsmSecretArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
SsmSecret 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 SsmSecret resource accepts the following input properties:
- Secret
Name string - Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
- Additional
Config string - Additional config for specific secret types in JSON string format.
- Description string
- Description of secret. The maximum is 2048 bytes.
- Is
Enabled bool - Specify whether to enable secret. Default value is
true
. - Kms
Key stringId - KMS keyId used to encrypt secret. If it is empty, it means that the CMK created by SSM for you by default is used for encryption. You can also specify the KMS CMK created by yourself in the same region for encryption.
- Recovery
Window doubleIn Days - Specify the scheduled deletion date. Default value is
0
that means to delete immediately. 1-30 means the number of days reserved, completely deleted after this date. - Secret
Type double - Type of secret.
0
: user-defined secret.4
: redis secret. Default is0
. - Ssm
Secret stringId - ID of the resource.
- Dictionary<string, string>
- Tags of secret.
- Secret
Name string - Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
- Additional
Config string - Additional config for specific secret types in JSON string format.
- Description string
- Description of secret. The maximum is 2048 bytes.
- Is
Enabled bool - Specify whether to enable secret. Default value is
true
. - Kms
Key stringId - KMS keyId used to encrypt secret. If it is empty, it means that the CMK created by SSM for you by default is used for encryption. You can also specify the KMS CMK created by yourself in the same region for encryption.
- Recovery
Window float64In Days - Specify the scheduled deletion date. Default value is
0
that means to delete immediately. 1-30 means the number of days reserved, completely deleted after this date. - Secret
Type float64 - Type of secret.
0
: user-defined secret.4
: redis secret. Default is0
. - Ssm
Secret stringId - ID of the resource.
- map[string]string
- Tags of secret.
- secret
Name String - Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
- additional
Config String - Additional config for specific secret types in JSON string format.
- description String
- Description of secret. The maximum is 2048 bytes.
- is
Enabled Boolean - Specify whether to enable secret. Default value is
true
. - kms
Key StringId - KMS keyId used to encrypt secret. If it is empty, it means that the CMK created by SSM for you by default is used for encryption. You can also specify the KMS CMK created by yourself in the same region for encryption.
- recovery
Window DoubleIn Days - Specify the scheduled deletion date. Default value is
0
that means to delete immediately. 1-30 means the number of days reserved, completely deleted after this date. - secret
Type Double - Type of secret.
0
: user-defined secret.4
: redis secret. Default is0
. - ssm
Secret StringId - ID of the resource.
- Map<String,String>
- Tags of secret.
- secret
Name string - Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
- additional
Config string - Additional config for specific secret types in JSON string format.
- description string
- Description of secret. The maximum is 2048 bytes.
- is
Enabled boolean - Specify whether to enable secret. Default value is
true
. - kms
Key stringId - KMS keyId used to encrypt secret. If it is empty, it means that the CMK created by SSM for you by default is used for encryption. You can also specify the KMS CMK created by yourself in the same region for encryption.
- recovery
Window numberIn Days - Specify the scheduled deletion date. Default value is
0
that means to delete immediately. 1-30 means the number of days reserved, completely deleted after this date. - secret
Type number - Type of secret.
0
: user-defined secret.4
: redis secret. Default is0
. - ssm
Secret stringId - ID of the resource.
- {[key: string]: string}
- Tags of secret.
- secret_
name str - Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
- additional_
config str - Additional config for specific secret types in JSON string format.
- description str
- Description of secret. The maximum is 2048 bytes.
- is_
enabled bool - Specify whether to enable secret. Default value is
true
. - kms_
key_ strid - KMS keyId used to encrypt secret. If it is empty, it means that the CMK created by SSM for you by default is used for encryption. You can also specify the KMS CMK created by yourself in the same region for encryption.
- recovery_
window_ floatin_ days - Specify the scheduled deletion date. Default value is
0
that means to delete immediately. 1-30 means the number of days reserved, completely deleted after this date. - secret_
type float - Type of secret.
0
: user-defined secret.4
: redis secret. Default is0
. - ssm_
secret_ strid - ID of the resource.
- Mapping[str, str]
- Tags of secret.
- secret
Name String - Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
- additional
Config String - Additional config for specific secret types in JSON string format.
- description String
- Description of secret. The maximum is 2048 bytes.
- is
Enabled Boolean - Specify whether to enable secret. Default value is
true
. - kms
Key StringId - KMS keyId used to encrypt secret. If it is empty, it means that the CMK created by SSM for you by default is used for encryption. You can also specify the KMS CMK created by yourself in the same region for encryption.
- recovery
Window NumberIn Days - Specify the scheduled deletion date. Default value is
0
that means to delete immediately. 1-30 means the number of days reserved, completely deleted after this date. - secret
Type Number - Type of secret.
0
: user-defined secret.4
: redis secret. Default is0
. - ssm
Secret StringId - ID of the resource.
- Map<String>
- Tags of secret.
Outputs
All input properties are implicitly available as output properties. Additionally, the SsmSecret resource produces the following output properties:
Look up Existing SsmSecret Resource
Get an existing SsmSecret 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?: SsmSecretState, opts?: CustomResourceOptions): SsmSecret
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
additional_config: Optional[str] = None,
description: Optional[str] = None,
is_enabled: Optional[bool] = None,
kms_key_id: Optional[str] = None,
recovery_window_in_days: Optional[float] = None,
secret_name: Optional[str] = None,
secret_type: Optional[float] = None,
ssm_secret_id: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None) -> SsmSecret
func GetSsmSecret(ctx *Context, name string, id IDInput, state *SsmSecretState, opts ...ResourceOption) (*SsmSecret, error)
public static SsmSecret Get(string name, Input<string> id, SsmSecretState? state, CustomResourceOptions? opts = null)
public static SsmSecret get(String name, Output<String> id, SsmSecretState state, CustomResourceOptions options)
resources: _: type: tencentcloud:SsmSecret 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.
- Additional
Config string - Additional config for specific secret types in JSON string format.
- Description string
- Description of secret. The maximum is 2048 bytes.
- Is
Enabled bool - Specify whether to enable secret. Default value is
true
. - Kms
Key stringId - KMS keyId used to encrypt secret. If it is empty, it means that the CMK created by SSM for you by default is used for encryption. You can also specify the KMS CMK created by yourself in the same region for encryption.
- Recovery
Window doubleIn Days - Specify the scheduled deletion date. Default value is
0
that means to delete immediately. 1-30 means the number of days reserved, completely deleted after this date. - Secret
Name string - Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
- Secret
Type double - Type of secret.
0
: user-defined secret.4
: redis secret. Default is0
. - Ssm
Secret stringId - ID of the resource.
- Status string
- Status of secret.
- Dictionary<string, string>
- Tags of secret.
- Additional
Config string - Additional config for specific secret types in JSON string format.
- Description string
- Description of secret. The maximum is 2048 bytes.
- Is
Enabled bool - Specify whether to enable secret. Default value is
true
. - Kms
Key stringId - KMS keyId used to encrypt secret. If it is empty, it means that the CMK created by SSM for you by default is used for encryption. You can also specify the KMS CMK created by yourself in the same region for encryption.
- Recovery
Window float64In Days - Specify the scheduled deletion date. Default value is
0
that means to delete immediately. 1-30 means the number of days reserved, completely deleted after this date. - Secret
Name string - Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
- Secret
Type float64 - Type of secret.
0
: user-defined secret.4
: redis secret. Default is0
. - Ssm
Secret stringId - ID of the resource.
- Status string
- Status of secret.
- map[string]string
- Tags of secret.
- additional
Config String - Additional config for specific secret types in JSON string format.
- description String
- Description of secret. The maximum is 2048 bytes.
- is
Enabled Boolean - Specify whether to enable secret. Default value is
true
. - kms
Key StringId - KMS keyId used to encrypt secret. If it is empty, it means that the CMK created by SSM for you by default is used for encryption. You can also specify the KMS CMK created by yourself in the same region for encryption.
- recovery
Window DoubleIn Days - Specify the scheduled deletion date. Default value is
0
that means to delete immediately. 1-30 means the number of days reserved, completely deleted after this date. - secret
Name String - Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
- secret
Type Double - Type of secret.
0
: user-defined secret.4
: redis secret. Default is0
. - ssm
Secret StringId - ID of the resource.
- status String
- Status of secret.
- Map<String,String>
- Tags of secret.
- additional
Config string - Additional config for specific secret types in JSON string format.
- description string
- Description of secret. The maximum is 2048 bytes.
- is
Enabled boolean - Specify whether to enable secret. Default value is
true
. - kms
Key stringId - KMS keyId used to encrypt secret. If it is empty, it means that the CMK created by SSM for you by default is used for encryption. You can also specify the KMS CMK created by yourself in the same region for encryption.
- recovery
Window numberIn Days - Specify the scheduled deletion date. Default value is
0
that means to delete immediately. 1-30 means the number of days reserved, completely deleted after this date. - secret
Name string - Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
- secret
Type number - Type of secret.
0
: user-defined secret.4
: redis secret. Default is0
. - ssm
Secret stringId - ID of the resource.
- status string
- Status of secret.
- {[key: string]: string}
- Tags of secret.
- additional_
config str - Additional config for specific secret types in JSON string format.
- description str
- Description of secret. The maximum is 2048 bytes.
- is_
enabled bool - Specify whether to enable secret. Default value is
true
. - kms_
key_ strid - KMS keyId used to encrypt secret. If it is empty, it means that the CMK created by SSM for you by default is used for encryption. You can also specify the KMS CMK created by yourself in the same region for encryption.
- recovery_
window_ floatin_ days - Specify the scheduled deletion date. Default value is
0
that means to delete immediately. 1-30 means the number of days reserved, completely deleted after this date. - secret_
name str - Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
- secret_
type float - Type of secret.
0
: user-defined secret.4
: redis secret. Default is0
. - ssm_
secret_ strid - ID of the resource.
- status str
- Status of secret.
- Mapping[str, str]
- Tags of secret.
- additional
Config String - Additional config for specific secret types in JSON string format.
- description String
- Description of secret. The maximum is 2048 bytes.
- is
Enabled Boolean - Specify whether to enable secret. Default value is
true
. - kms
Key StringId - KMS keyId used to encrypt secret. If it is empty, it means that the CMK created by SSM for you by default is used for encryption. You can also specify the KMS CMK created by yourself in the same region for encryption.
- recovery
Window NumberIn Days - Specify the scheduled deletion date. Default value is
0
that means to delete immediately. 1-30 means the number of days reserved, completely deleted after this date. - secret
Name String - Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
- secret
Type Number - Type of secret.
0
: user-defined secret.4
: redis secret. Default is0
. - ssm
Secret StringId - ID of the resource.
- status String
- Status of secret.
- Map<String>
- Tags of secret.
Import
SSM secret can be imported using the secretName, e.g.
$ pulumi import tencentcloud:index/ssmSecret:SsmSecret foo test
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.