Skip to content

Conversation

@mohag
Copy link
Contributor

@mohag mohag commented Jul 18, 2025

Description

  • Raises min supported Terraform version to v1.5.7 to support most of the latest features of the framework but still being compatible with alternative methods (OpenTofu)
  • Raises min supported AWS provider version to v6.0.0 to support new region argument added in the v6 provider
  • Add variable optional attributes to timeouts variable definition
  • Update examples to match current practices

Motivation and Context

Breaking Changes

  • Yes due to increasing min supported Terraform and AWS provider versions across major versions

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@mohag mohag changed the title Add support for specifying the region for version 6+ of the AWS provider Feat: Add support for specifying the region for version 6+ of the AWS provider Jul 18, 2025
@mohag mohag changed the title Feat: Add support for specifying the region for version 6+ of the AWS provider feat: Add support for specifying the region for version 6+ of the AWS provider Jul 18, 2025
@github-actions
Copy link

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Aug 18, 2025
@mohag
Copy link
Contributor Author

mohag commented Aug 18, 2025

Now to see if a normal comment will work or if I need some kind of slash command

@github-actions github-actions bot removed the stale label Aug 19, 2025
@mohag
Copy link
Contributor Author

mohag commented Aug 25, 2025

This would also (indirectly) fix #133

@yyarmoshyk
Copy link
Contributor

@mohag Please try to init multiple providers

provider "aws" {
  alias = euw1
  region ="eu-west-1"
}

provider "aws" {
  alias = eun1
  region ="eu-north-1"
}

next please refer to documentation about passing Providers Explicitly to terraform modules.

module "tgw_region1" {
  source = "../../"
  providers = {
    aws = aws.euw1
  }
...
}
module "tgw_region2" {
  source = "../../"
  providers = {
    aws = aws.eun1
  }
...
}

There is no need to create more variables in the module

@mohag
Copy link
Contributor Author

mohag commented Sep 23, 2025

@mohag Please try to init multiple providers

provider "aws" {
  alias = euw1
  region ="eu-west-1"
}

provider "aws" {
  alias = eun1
  region ="eu-north-1"
}

next please refer to documentation about passing Providers Explicitly to terraform modules.

module "tgw_region1" {
  source = "../../"
  providers = {
    aws = aws.euw1
  }
...
}
module "tgw_region2" {
  source = "../../"
  providers = {
    aws = aws.eun1
  }
...
}

There is no need to create more variables in the module

That works and is what I have currently. I'm hoping to get faster plans and lower resource usage by eliminating that. (Separate providers has been eliminated on everything else in the specific module)

(I can also do a for_each with a variable, which is not an option with provider configs)

@bryantbiggs bryantbiggs changed the title feat: Add support for specifying the region for version 6+ of the AWS provider feat!: Raise MSV of Terraform and AWS provider to v1.5.7 and v6.0.0 respectively, add support for region argument Sep 25, 2025
@bryantbiggs
Copy link
Member

@mohag Please try to init multiple providers

provider "aws" {
  alias = euw1
  region ="eu-west-1"
}

provider "aws" {
  alias = eun1
  region ="eu-north-1"
}

next please refer to documentation about passing Providers Explicitly to terraform modules.

module "tgw_region1" {
  source = "../../"
  providers = {
    aws = aws.euw1
  }
...
}
module "tgw_region2" {
  source = "../../"
  providers = {
    aws = aws.eun1
  }
...
}

There is no need to create more variables in the module

The region argument should be preferred over the alias provider approach. As to whether or not one should put multiple regions into one statefile is an entirely different conversation and more subjective 😅 (don't do it - violates practices of cellular architecture. Only use the region argument for examples/PoCs/or for the cases where certain resources must be provisioned in us-east-1 - all my opinion)

Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good to me as an initial "soft" breaking change (no disruption to users, just the version requirements have changed). Then folks can iterate such as #132 or start to look at larger, more disruptive structural changes like #113 / #95

what do you think @yyarmoshyk / @antonbabenko

@antonbabenko
Copy link
Member

Sounds good to me. This module didn't receive enough attention for a rather long time, so making improvements in any order is better than not making any improvements at all. Let's merge this one and proceed with bigger breaking changes.

@mohag
Copy link
Contributor Author

mohag commented Sep 26, 2025

A suggestion for the repo: It might make sense to split the "Breaking changes" question into "affects existing module usage" (incompatible interface changes), "will recreate resources", "add / removes resources" and "dependency changes".

@bryantbiggs
Copy link
Member

A suggestion for the repo: It might make sense to split the "Breaking changes" question into "affects existing module usage" (incompatible interface changes), "will recreate resources", "add / removes resources" and "dependency changes".

What? Could you elaborate

@bryantbiggs
Copy link
Member

we'll proceed with this and look to continue improving/iterating

@bryantbiggs bryantbiggs merged commit 9ded85b into terraform-aws-modules:master Sep 26, 2025
10 checks passed
antonbabenko pushed a commit that referenced this pull request Sep 26, 2025
## [3.0.0](v2.13.1...v3.0.0) (2025-09-26)

### ⚠ BREAKING CHANGES

* Raise MSV of Terraform and AWS provider to `v1.5.7` and `v6.0.0` respectively, add support for `region` argument (#146)

### Features

* Raise MSV of Terraform and AWS provider to `v1.5.7` and `v6.0.0` respectively, add support for `region` argument ([#146](#146)) ([9ded85b](9ded85b))
@antonbabenko
Copy link
Member

This PR is included in version 3.0.0 🎉

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

versions.tf: bump required_providers.aws.version to >= 5.69, as required by #133

5 participants