Data Source: aws_secretsmanager_secret

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

Example Usage

ARN

data "aws_secretsmanager_secret" "by-arn" {
  arn = "arn:aws:secretsmanager:us-east-1:123456789012:secret:example-123456"
}

Name

data "aws_secretsmanager_secret" "by-name" {
  name = "example"
}

Argument Reference

Attribute Reference

This data source exports the following attributes in addition to the arguments above: