Friday, November 8, 2024

Terraform Google Provider 6.0.0: Better Flexibility, Control

- Advertisement -

Terraform-Provider-Google

The Terraform Google Provider v6.0.0

It is now GA to use the Terraform Google Provider 6.0.0. The Hashicorp/Google provider team has been attentively monitoring community comments since the previous major Terraform release in September 2023. The main improvements and problem fixes that this significant release concentrates on are covered below. The major version release v6.0.0 of HashiCorp Terraform will not affect support for previous versions of the software.

Highlights of Terraform Google Provider

The following are the main noteworthy changes:

- Advertisement -
  • The default label “goog-terraform-provisioned” can be removed.
  • Addition of deletion protection fields to certain resources
  • Permitted lowering the length of the suffix in “name_prefix” for some resources

Opt-out default label “goog-terraform-provisioned”

The opt-out default label “goog-terraform-provisioned” is included in the 6.0.0 major release as a follow-up to the addition of provider-level default labels in 5.16.0. To identify resources produced by Terraform, the provider-level label “goog-terraform-provisioned” will be appended to relevant resources. Only recently generated resources with a labels field will have this default label applied to it. As a result, users will be able to see resources controlled by Terraform when examining or modifying them in other tools such as Cloud Billing, Cloud Console, etc.

Please be aware that Terraform Google Provider v6.0.0 will change the label to opt-out from the opt-in version that was previously issued in 5.16.0. Users can toggle the add_terraform_attribution_label provider configuration parameter to reject this default label. Any release starting with 5.16.0 can be used to explicitly configure this, and the value specified in the configuration will take effect upon the 6.0.0 upgrade.

provider “google” {
// opt out of “goog-terraform-provisioned” default label
add_terraform_attribution_label = false
}

Addition of deletion protection fields to certain resources

Many resources now come with some sort of deletion protection activated by default, helping to guard against the unintentional loss of crucial resources. Google_domain, Google Cloud Run V2 Job, Google Cloud Run V2 Service, Google Folder, and Google Project are some of these resources. The deletion_protection field makes the majority of these enabled. In particular, the deletion_policy variable in google_project has a default value of PREVENT.

- Advertisement -

Permitted to shorten the “name_prefix” suffix

Allowing decreasing the suffix length added to instance templates name_prefix (#15374)” is another noteworthy problem fixed in this significant version that modifies name_prefix’s default behavior across various resources. The user-defined name prefix now has a maximum length of 54 characters instead of just 37. When using a name_prefix larger than 37 characters, the provider will use a shorter appended suffix; this should allow resource names to be more flexible. Take google_instance_template.name_prefix, for instance.

This version guards against the unintentional loss of crucial resources and allows users to access Terraform-managed resources in other tools thanks to features like deletion protection and opt-out default labels. The goal of the Terraform Google Provider 6.0.0 release is to enhance Terraform’s usability and security when it comes to resource management on Google Cloud. Please refer to the upgrade guide on the Terraform Registry for a comprehensive list of changes and upgrade considerations when upgrading to version 6.0 of the Terraform Google Provider. To learn more about this significant version release, kindly refer to the Release notes for Terraform Google Provider 6.0.0. Visit the Terraform on Google Cloud documentation to find out more about Terraform on Cloud.

Terraform Google Provider 6.0.0

With Terraform Google Provider 6.0.0, you can now manage and automate Google Cloud resources better with a number of new capabilities, improvements, and game-changing adjustments. The following are this release’s main highlights:

Important Elements and Improvements

Fresh Sources of Information and Data:

Several new tools and data sources for managing Google Cloud Platform (GCP) services are included in this release. Resources for controlling Google Cloud Armor security policies, Artifact Registry repositories, and Cloud Build triggers are a few noteworthy improvements.

Improved Assistance for Current Resources:

More precise control over resource setup is made possible by improvements to current resources. For example, google_compute_instance has been updated to accommodate the newest features and machine kinds.

Better Record-Keeping:

The rewritten manual removes any doubts or inaccuracies from earlier iterations and offers more precise instructions on how to use new features. By doing this, users are guaranteed access to correct information for efficient use.

Revolutionizing Shifts

Elimination of Outdated Fields:

This release includes the removal of some deprecated fields and resources. Users whose Terraform setups depend on these fields will need to be updated to reflect the latest version.

Revised Default Settings and Actions:

Some resources now have changed default behaviors or values. In order to understand how these changes can impact their configurations, users should read the release notes.

Upgrade Points to Remember

  • Compatible Version of Terraform: Terraform version 1.0 or later is needed to use the Terraform Google Provider 6.0.0. To prevent incompatibilities, make sure the Terraform CLI is up to current.
  • Guides for Migration: It is advised that you review the migration recommendations that the Terraform team has made available in order to handle any changes that could affect your current infrastructure.
  • Gains from Improving Performance and Security: The enhanced security and performance enhancements offered by the new version aid in more effective resource management for GCP.
  • Obtain the Most Recent GCP Features: Upgrading allows customers to benefit from the newest capabilities and services offered by Google Cloud Platform, which are now supported by the Terraform provider.
- Advertisement -
Thota nithya
Thota nithya
Thota Nithya has been writing Cloud Computing articles for govindhtech from APR 2023. She was a science graduate. She was an enthusiast of cloud computing.
RELATED ARTICLES

Recent Posts

Popular Post

Govindhtech.com Would you like to receive notifications on latest updates? No Yes