Hi,
I am attempting to follow the example specified here. Am I understanding correctly that these ephemeral values can only be passed to other ephemeral objects. I attempted passing it into a template file but that still failed with:
│ 69: CLIENT_ID = local.credentials.client_id
│ 70: SECRET = local.credentials.private_key
│ 71: }
│ 72: )
│
│ Ephemeral values are not valid in resource arguments, because resource
│ instances must persist between Terraform phases.
Using:
terraform {
required_version = “>= 1.10.5”
and:
ephemeral “aws_secretsmanager_secret_version” “my_key” {
secret_id = “mysecret/keys”
}
locals {
credentials = jsondecode(ephemeral.aws_secretsmanager_secret_version.my_key.secret_string)
}