Skill 4.8.2
Ephemeral values and resources
Key Concepts
An input variable or a child module output with ephemeral = true accepts a value for the current run only. An ephemeral resource, declared with an ephemeral "TYPE" "NAME" block and referenced as ephemeral.TYPE.NAME, is opened during each run to obtain a temporary value, such as a secret from a secrets manager or a short-lived token, and is closed at the end. Ephemeral values were introduced in Terraform 1.10.
Terraform allows ephemeral values only in ephemeral contexts: other ephemeral variables and outputs, local values, ephemeral resources, provider and provisioner blocks, and write-only arguments. Using one in a normal resource argument is an error, because that argument would be stored in state.