Terraform 1.16 Delivers In-Module Imports and Ephemeral State Persistence
HashiCorp has officially released Terraform 1.16.0, introducing several foundational enhancements to the core workflow engine. Chief among these updates is first-class support for `import` blocks within child modules, eliminating the longstanding constraint that required all declarative resource adoptions to originate at the root configuration level. The release also debuts the `store` block within `terraform_data` to safely hold ephemeral and sensitive state across plan and apply stages, adds provider capability for nested computed blocks, introduces customizable failure modes (`halt`, `taint`, `continue`) for resource action triggers, and extends native binary support to Linux s390x architectures.
For platform engineers and DevOps architects, module-level `import` blocks solve a major operational headache in modern multi-tier deployments. Previously, importing legacy or out-of-band cloud resources into shared, opinionated modules required awkward root-level definitions followed by tedious state refactoring. By encapsulating adoption logic inside the module itself, platform teams can distribute self-contained blueprints that smoothly bring unmanaged assets under code governance. Simultaneously, storing provider-specific private state and ephemeral data across phases mitigates race conditions and prevents unintentional plaintext exposure in pipeline logs.
This release reflects the broader industry movement toward zero-trust automation and modular platform engineering. As organizations scale out complex multi-cloud environments, infrastructure pipelines increasingly act as full application control planes rather than simple provisioning scripts. In this environment, granular failure handling—such as choosing whether an action trigger should taint a resource or halt execution entirely—is necessary to prevent cascading downtime in continuous delivery workflows.
In practice, teams should evaluate their existing module catalogs to encapsulate resource import strategies directly within module definitions, drastically simplifying onboarding paths for brownfield workloads. Security leads should audit ephemeral secret handling to replace temporary variable hacks with native `terraform_data` storage blocks. While the upgrade from 1.15 is non-breaking, platform operators should update CI/CD linting configurations and verify provider compatibility to take full advantage of nested computed structures and improved failure routing.
Read original source