跳到正文
本页尚未翻译成中文,以下为英文原文。 查看英文版

aws_secretsmanager_raw function ​

The aws_secretsmanager_raw function retrieves the raw value of a secret from Amazon Web Services (AWS) Secrets Manager.

hcl
aws_secretsmanager_raw(NAME)

The function returns plaintext secrets as strings. For key-value secrets, it returns the raw JSON value. Use this function when you need the complete secret value instead of one key.

Example ​

hcl
locals {
  database_credentials = jsondecode(
    aws_secretsmanager_raw("production/database")
  )
}

In order to use this function you have to configure valid AWS credentials using one of the following methods:

基于 MPL-2.0 许可证发布。