Retrieve metadata information about a Secrets Manager secret. To retrieve a secret value, see the aws_secretsmanager_secret_version data source.
data "aws_secretsmanager_secret" "by-arn" {
arn = "arn:aws:secretsmanager:us-east-1:123456789012:secret:example-123456"
}
data "aws_secretsmanager_secret" "by-name" {
name = "example"
}
arn - (Optional) The Amazon Resource Name (ARN) of the secret to retrieve. name - (Optional) The name of the secret to retrieve. arn - The Amazon Resource Name (ARN) of the secret. description - A description of the secret. kms_key_id - The Key Management Service (KMS) Customer Master Key (CMK) associated with the secret. id - The Amazon Resource Name (ARN) of the secret. rotation_enabled - Whether rotation is enabled or not. rotation_lambda_arn - Rotation Lambda function Amazon Resource Name (ARN) if rotation is enabled. rotation_rules - Rotation rules if rotation is enabled. tags - Tags of the secret.
© 2018 HashiCorpLicensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/aws/d/secretsmanager_secret.html