aws_iam_generate_key

token
data "external" "rds_auth_token" {
  program = [
    "bash", "-c", replace(
      <<-EOF
        aws rds generate-db-auth-token
          --hostname  ${module.cluster_endpoint}
          --port      ${module.cluster_port}
          --region    ${replace(aws_db_instance.database.availability_zone, "/[[:lower:]]$/", "")}
          --username  ${aws_db_instance.database.username}
          --profile   my-aws-profile
        | jq --raw-input '{ password: . }'
      EOF
    , "\n", " ")
  ]
}
  • aws_iam_generate_key.txt
  • Last modified: 2024/02/27 08:53
  • by andonovj