{"id":2146,"date":"2025-06-18T18:20:40","date_gmt":"2025-06-18T18:20:40","guid":{"rendered":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/2025\/06\/18\/terraform-aws-provider-6-0-now-generally-available\/"},"modified":"2025-06-18T18:20:40","modified_gmt":"2025-06-18T18:20:40","slug":"terraform-aws-provider-6-0-now-generally-available","status":"publish","type":"post","link":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/2025\/06\/18\/terraform-aws-provider-6-0-now-generally-available\/","title":{"rendered":"Terraform AWS provider 6.0 now generally available"},"content":{"rendered":"<p>The Terraform AWS provider serves as the bridge between Terraform configurations and AWS, enabling users to define and manage AWS resources as code. We are excited to share that version 6.0 of the Terraform AWS provider is now generally available. Along with bugfixes, the latest update brings enhanced multi-region support and other workflow improvements.<\/p>\n<p>With this release, AWS and HashiCorp continue to expand their partnership \u2014 delivering new integrations that help customers move faster, adopt more AWS services and features, and deploy infrastructure with developer-friendly workflows.<\/p>\n<h2>Enhanced region support<\/h2>\n<p>Previously in the Terraform AWS provider, each provider configuration targeted a single AWS region. With this limitation, practitioners had to update every configuration file individually if they wanted to change a particular resource\u2019s configuration. For global companies, this could mean editing the same parameter in up to 32 separate configuration files for each region.<\/p>\n<p>With 6.0, the AWS provider now supports multiple regions all within a single configuration file. This new approach leverages an injected region attribute at the resource level to simplify configuration efforts. This method also reduces the need to load multiple instances of the AWS provider, lowering memory usage overall.<\/p>\n<p>Here are some more key highlights in this feature:<\/p>\n<p><strong>Single provider configuration<\/strong>: Reduces the need to load multiple instances of the AWS provider, lowering memory usage.<br \/>\n<strong>Region attribute injection<\/strong>: The region argument is added to all resources (except global resources) without requiring explicit schema changes.<br \/>\n<strong>Global resources exclusion<\/strong>: Services like IAM, CloudFront, and Route 53 remain unaffected as they operate globally.<br \/>\n<strong>Terraform plugin framework updates<\/strong>: Adjustments to the AWS API client mechanism support per-region API client mappings.<br \/>\n<strong>Resource import enhancements<\/strong>: A new @&lt;regionID&gt; suffix allows importing of resources from different regions.<br \/>\n<strong>Documentation and testing<\/strong>: Changes are documented at the provider level and tested to ensure backward compatibility.<\/p>\n<p>This example shows how to use the new region attribute for the aws<em>vpc<\/em>peering<em>connection<\/em>accepter in your Terraform configuration: <\/p>\n<p>provider &#8220;aws&#8221; {<br \/>\n  region = &#8220;us-east-1&#8221;<br \/>\n}<\/p>\n<p>resource &#8220;aws_vpc&#8221; &#8220;main&#8221; {<br \/>\n  cidr_block = &#8220;10.0.0.0\/16&#8221;<br \/>\n}<\/p>\n<p>resource &#8220;aws_vpc&#8221; &#8220;peer&#8221; {<br \/>\n  region = &#8220;us-west-2&#8221;<\/p>\n<p>  cidr_block = &#8220;10.1.0.0\/16&#8221;<br \/>\n}<\/p>\n<p># Requester&#8217;s side of the connection.<br \/>\nresource &#8220;aws_vpc_peering_connection&#8221; &#8220;main&#8221; {<br \/>\n  vpc_id      = aws_vpc.main.id<br \/>\n  peer_vpc_id = aws_vpc.peer.id<br \/>\n  peer_region = &#8220;us-west-2&#8221;<br \/>\n  auto_accept = false<br \/>\n}<\/p>\n<p># Accepter&#8217;s side of the connection.<br \/>\nresource &#8220;aws_vpc_peering_connection_accepter&#8221; &#8220;peer&#8221; {<br \/>\n  region = &#8220;us-west-2&#8221;<\/p>\n<p>  vpc_peering_connection_id = aws_vpc_peering_connection.main.id<br \/>\n  auto_accept               = true<br \/>\n}<\/p>\n<p>This is an example of how to use the new region attribute for the aws<em>kms<\/em>replica_key in your Terraform configuration:<\/p>\n<p>provider &#8220;aws&#8221; {<br \/>\n  region = &#8220;us-west-2&#8221;<br \/>\n}<\/p>\n<p>resource &#8220;aws_kms_key&#8221; &#8220;primary&#8221; {<br \/>\n  region = &#8220;us-east-1&#8221;<\/p>\n<p>  description             = &#8220;Multi-Region primary key&#8221;<br \/>\n  deletion_window_in_days = 30<br \/>\n  multi_region            = true<br \/>\n}<\/p>\n<p>resource &#8220;aws_kms_replica_key&#8221; &#8220;replica&#8221; {<br \/>\n  description             = &#8220;Multi-Region replica key&#8221;<br \/>\n  deletion_window_in_days = 7<br \/>\n  primary_key_arn         = aws_kms_key.primary.arn<br \/>\n}<\/p>\n<h2>Migrating configuration to use the new region parameter<\/h2>\n<p>In many cases, practitioners have used mechanisms such as creating aliases to build configurations that span across multiple AWS Regions. For example:<\/p>\n<p>provider &#8220;aws&#8221; {<br \/>\n  region = &#8220;us-east-1&#8221;<br \/>\n}<\/p>\n<p>provider &#8220;aws&#8221; {<br \/>\n  alias  = &#8220;peer&#8221;<br \/>\n  region = &#8220;us-west-2&#8221;<br \/>\n}<\/p>\n<p>resource &#8220;aws_kms_key&#8221; &#8220;test&#8221; {<br \/>\n  provider = aws.peer<\/p>\n<p>  description  = &#8220;Multi-Region primary key&#8221;<br \/>\n  multi_region = true<br \/>\n}<\/p>\n<p>resource &#8220;aws_kms_replica_key&#8221; &#8220;test&#8221; {<br \/>\n  description     = &#8220;Multi-Region replica key&#8221;<br \/>\n  primary_key_arn = aws_kms_key.test.arn<br \/>\n}<\/p>\n<p>To migrate from a separate provider configuration for each Region to a single provider configuration block and per-resource region values you must ensure that Terraform state is refreshed before editing resource configuration:<\/p>\n<p>Upgrade to version 6.0<br \/>\nRun a Terraform plan in <a href=\"https:\/\/developer.hashicorp.com\/terraform\/cli\/commands\/plan#planning-modes\">refresh-only mode<\/a> \u2014 terraform plan -refresh-only<br \/>\nRun a Terraform apply in <a href=\"https:\/\/developer.hashicorp.com\/terraform\/cli\/commands\/plan#planning-modes\">refresh-only mode<\/a> \u2014 terraform apply -refresh-only<br \/>\nModify the affected resource configurations, replacing the <a href=\"https:\/\/developer.hashicorp.com\/terraform\/language\/meta-arguments\/resource-provider\">provider meta-argument<\/a> with a region argument. For example:<\/p>\n<p>provider &#8220;aws&#8221; {<br \/>\n  region = &#8220;us-east-1&#8221;<br \/>\n}<\/p>\n<p>resource &#8220;aws_kms_key&#8221; &#8220;test&#8221; {<br \/>\n  region = &#8220;us-west-2&#8221;<\/p>\n<p>  description  = &#8220;Multi-Region primary key&#8221;<br \/>\n  multi_region = true<br \/>\n}<\/p>\n<p>resource &#8220;aws_kms_replica_key&#8221; &#8220;test&#8221; {<br \/>\n  description     = &#8220;Multi-Region replica key&#8221;<br \/>\n  primary_key_arn = aws_kms_key.test.arn<br \/>\n}<\/p>\n<h2>Getting started<\/h2>\n<p>The Terraform AWS provider 6.0 is now available for use in the Terraform Registry. When upgrading to version 6.0 of the Terraform AWS provider, please consult the <a href=\"https:\/\/registry.terraform.io\/providers\/hashicorp\/aws\/6.0.0-beta1\/docs\/guides\/version-6-upgrade\">upgrade guide<\/a> on the Terraform Registry as it contains not only a list of changes but also examples. Because this release introduces breaking changes, we recommend <a href=\"https:\/\/developer.hashicorp.com\/terraform\/language\/providers\/requirements#best-practices-for-provider-versions\">pinning your provider version<\/a> to protect against unexpected results. <\/p>\n<p>For the full list of updates in version 6.0, please refer to the <a href=\"https:\/\/github.com\/hashicorp\/terraform-provider-aws\/issues\/41101\">summary of changes<\/a> on GitHub. To learn the basics of Terraform using this provider, follow the hands-on tutorials for <a href=\"https:\/\/developer.hashicorp.com\/terraform\/tutorials\/aws-get-started\">getting started with Terraform on AWS<\/a> on our developer education platform. Interact with AWS services, including <a href=\"https:\/\/aws.amazon.com\/lambda\/\">AWS Lambda<\/a>, <a href=\"https:\/\/aws.amazon.com\/rds\/\">Amazon RDS<\/a>, and <a href=\"https:\/\/aws.amazon.com\/iam\/\">AWS IAM<\/a> by following the <a href=\"https:\/\/developer.hashicorp.com\/terraform\/tutorials\/aws\">AWS services tutorials<\/a>.<\/p>\n<p>If you are currently using Terraform Community Edition or are completely new to Terraform, <a href=\"http:\/\/hashi.co\/tf-cloud-bc\">try HCP Terraform<\/a> for free today.<\/p>","protected":false},"excerpt":{"rendered":"<p>The Terraform AWS provider serves as the bridge between Terraform configurations and AWS, enabling users to define and manage AWS [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[6],"tags":[],"class_list":["post-2146","post","type-post","status-publish","format-standard","hentry","category-terraform"],"_links":{"self":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts\/2146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/comments?post=2146"}],"version-history":[{"count":0,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts\/2146\/revisions"}],"wp:attachment":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/media?parent=2146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/categories?post=2146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/tags?post=2146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}