AwsSecretsManagerSecret

Creates an AWS Secrets Manager secret.

Remarks

This component wraps aws.secretsmanager.Secret and applies default tags. If args.policy is provided as a template, placeholders are resolved before resource creation. Default tags are applied using ${namespace}:project and ${namespace}:env.

Naming:

  • This value helper owns no component root or type token.
  • Its aws:secretsmanager/secret:Secret child receives [args.name] and is named ${env}-${projectHash}-${sanitiseNamePart(args.name)}. Its optional aws:secretsmanager/secretVersion:SecretVersion child receives the same tuple and final logical name.
  • The secret provider name uses stackAndPurpose from args.name; it is validated as a camelCase purpose and the 512-character provider limit needs no local cap. The version resource has no provider name.

Example

CODE
const secret = new AwsSecretsManagerSecret({
  name: 'dbCredentials',
  description: 'Database credentials for the application',
});

Constructors

new AwsSecretsManagerSecret( args: AwsSecretsManagerSecretArgs, options?: ResourceOptions, ): AwsSecretsManagerSecret

Parameters

  • args (AwsSecretsManagerSecretArgs) — Component inputs forwarded to the underlying secret resource.
  • options (ResourceOptions, optional) — Optional settings controlling resource behaviour.

Returns

AwsSecretsManagerSecret


Properties

arn: Output<string>

readonly

The ARN of the secret.

id: Output<string>

readonly

The provider-assigned ID for this secret resource.

name: Output<string>

readonly

The name of the secret.

secret: Secret

readonly

The underlying AWS Secrets Manager secret resource.

secretVersion: SecretVersion | undefined

readonly

Optional secret version resource created when a value source is provided.

versionId: Output<string> | undefined

readonly

Optional version id output from the created secret version.