Version 5.0 of the HashiCorp Terraform AWS provider brings improvements to default tags, allowing practitioners to set tags at the provider level.
We are excited to announce the release of version 5.0 of the Terraform AWS provider with highly anticipated updates to default tags. Initially launched in May 2021, default tags can now be set at the provider level, which applies them across all resources that support them in the configuration. This post reviews the details and benefits of this updated feature and also covers a handful of new features released this year.
As the Terraform AWS provider download count tops 1.7 billion, AWS and HashiCorp continue to develop new integrations to help customers work faster, use more services and features, and enjoy developer-friendly ways to provision cloud infrastructure. This year we focused on improving the user experience for practitioners by adding new services to the AWS provider including:
Default tags in the Terraform AWS provider allow practitioners to define common metadata tags at the provider level. These tags are then applied to all supported resources in the Terraform configuration. Previously, assumptions and restrictions were made to allow this feature to function across as many resources as possible. However, it could be difficult to retrofit existing code, causing frustrating manual intervention.
Thanks to new features available in the Terraform plugin SDK and the Terraform plugin framework, we have removed several limitations which made default tags difficult to integrate with existing resources and modules.
The updates in version 5.0 solve for:
These changes make the behavior align more consistently with community expectations. You can find more details about the updates to default tags in the AWS provider changelog.
Default tags are an easy way to standardize your Terraform configuration in accordance with AWS’s recommended best practices.
This example shows how default tags can be used to apply common metadata to a Terraform configuration:
Previously when using attributes marked as deprecated or removed, users would receive a “warning” notification. With this release, users will no longer receive a warning detailing what attribute to use. Instead, users will receive an “unsupported error” as these attributes will be removed. This will help ensure practitioners are using best practices and are not using outdated features.
While the AWS team removed EC2-Classic networking functionality back in August 2022, the Terraform AWS provider team worked closely with AWS to extend support for the functionality until late September. This allowed any AWS customers who had qualified for extension to be able to finish their migration. These features were marked as deprecated and it is now time to remove them as the functionality is no longer available through AWS. Practitioners should experience no changes as all AWS users have now fully migrated off EC2-Classic networking functionality.
The release of version 5.0 of the Terraform AWS provider allows practitioners to more efficiently manage tags for the provider. Here are a few of the main benefits of this new release:
Developers can use the Terraform AWS provider to interact with the many resources supported by AWS. To learn the basics of Terraform using this provider, follow the hands-on tutorials for getting started with Terraform on AWS on our developer education platform.
When upgrading to version 5.0 of the Terraform AWS provider, please consult the upgrade guide on the Terraform Registry, as it contains not only a list of changes but also examples. Because this release introduces breaking changes, we recommend pinning your provider version to protect against unexpected results.For a complete list of the changes in 5.0, please reference the AWS provider changelog.
Please share any bugs or enhancement requests with us via GitHub issues. We look forward to your feedback and want to thank you for being such a great community!
If you are currently using Terraform open source or are completely new to Terraform, you can sign up for Terraform Cloud and get started using the Free offering today.
Improve the developer experience writing Terraform code with the help of generative AI powered by Amazon CodeWhisperer.
HashiCorp’s Terraform provider for AWS now enables users to manage their S3 Express buckets.
A new view in the HashiCorp Terraform extension for Visual Studio Code shows your Terraform Cloud workspaces and runs, reducing context-switching.