Company
Date Published
Author
Bruno Schaatsbergen
Word count
1591
Language
English
Hacker News points
None

Summary

Ephemeral values in Terraform are a way to manage sensitive data securely without persisting it in the Terraform plan artifact or state file. This is achieved through the use of ephemeral resources, write-only arguments, and deferring resource execution until necessary information becomes available. Ephemeral resources are temporary and do not persist anything to the Terraform plan artifact or state file, while write-only arguments are managed resource attributes that are configured by users but are not persisted to the Terraform plan artifact or state file. Deferring ephemeral resources allows Terraform to evaluate them at the correct time, ensuring that they are not executed prematurely. The lifecycle of an ephemeral resource includes opening, renewing, and closing stages, with only some resources implementing all three stages. Persisting ephemeral secrets is essential when using ephemeral random passwords, which generate new secrets without being persisted to a secrets manager yet. </s>