Skip to content

Data Source: awsSecretsmanagerSecret

Retrieve metadata information about a Secrets Manager secret. To retrieve a secret value, see the awsSecretsmanagerSecretVersion data source.

Example Usage

ARN

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsSecretsmanagerSecret.DataAwsSecretsmanagerSecret(
  this,
  "by-arn",
  {
    arn: "arn:aws:secretsmanager:us-east-1:123456789012:secret:example-123456",
  }
);

Name

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsSecretsmanagerSecret.DataAwsSecretsmanagerSecret(
  this,
  "by-name",
  {
    name: "example",
  }
);

Argument Reference

  • arn - (Optional) ARN of the secret to retrieve.
  • name - (Optional) Name of the secret to retrieve.

Attributes Reference

  • arn - ARN of the secret.
  • description - Description of the secret.
  • kmsKeyId - Key Management Service (KMS) Customer Master Key (CMK) associated with the secret.
  • id - ARN of the secret.
  • rotationEnabled - Whether rotation is enabled or not.
  • rotationLambdaArn - Rotation Lambda function ARN if rotation is enabled.
  • rotationRules - Rotation rules if rotation is enabled.
  • tags - Tags of the secret.
  • policy - Resource-based policy document that's attached to the secret.