Published on march 10, 2023
Several improvements have been made to Terraform 1.4 for use within Terraform Cloud environments. CLI support for structured run outputs and OPA policy results is included in these improvements. Additionally, a native replacement for the Null utility provider has been added.
The terraform_data resource has been added as a built-in replacement for the null resource. They do not perform any actions on their own, but can be used in situations where resource replacement is not possible. Terraform_data implements the standard resource lifecycle and does not require or require configuration of a provider.
Terraform_data is primarily used to store values that require a managed resource lifecycle and trigger provisioners that do not have a logical managed resource available. Replace_triggered_by, for instance, replaces the resource when any of the referenced items changes. Since the replacement decision is based on the planned actions for all of the given resources, it can only be used with resource addresses.
When there is no convenient attribute to force replacement, terraform_data may be used. Local values or input variables without planned actions may be used in this manner. The resource example_database will be replaced whenever the revision variable value changes in the following example
In this release, the structured run outputs available within Terraform Cloud are extended to include results from CLI runs as well. HashiCorp’s Terraform Cloud is a Terraform-as-a-Service environment. In this view, the results of the run are presented in a more user-friendly manner. Previously, only runs initiated through the UI, version control integrations, or the API were supported.
Open Policy Agent (OPA) was previously supported by Terraform Cloud. A policy engine known as OPA makes use of a high-level declarative language known as Rego. By using policy-as-code, OPA support provides enforcement alongside Sentinel. HashiCorp’s policy-as-code language is Sentinel.
The Terraform 1.4 release adds support for OPA results in CLI-driven runs within Terraform Cloud. There is now parity between OPA policies and Sentinel policies for these runs. The CLI also supports manual overrides if a policy fails and overrides have been allowed.
Terraform plan now stores a plan file even if errors occur. In order to troubleshoot the error, this can be inspected. The new -or-create flag has been added to the terraform workspace select command in order to simplify the process of automatically creating workspaces.
You can find more details about the 1.4 release in the documentation or in the changelog. Download Terraform 1.4 from the HashiCorp website or use Terraform Cloud.
Presentations
Browse LSET presentations to understand interesting…
Explore Now
eBooks
Get complete guides to empower yourself academically…
Explore Now
Infographics
Learn about information technology and business…
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
[wpforms id=”9030″]