Terraform 1.10 introduced the ephemeral resource to address the security risk of storing sensitive data like passwords and API keys in state files.
Ephemeral resources are defined using a new block type and allow dynamic retrieval of sensitive values during runtime without persisting them in the state file.
Ephemeral resources are not stored in the state file and are referenced similarly to data sources.
The use of ephemeral resources improves security, ensures up-to-date information, helps meet regulatory requirements, and simplifies secret management.