Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws provider v4.0.0 doesn't support ap-northeast-3 region #23116

Closed
LeiZhang-okta opened this issue Feb 11, 2022 · 9 comments · Fixed by #23191 or #23282
Closed

aws provider v4.0.0 doesn't support ap-northeast-3 region #23116

LeiZhang-okta opened this issue Feb 11, 2022 · 9 comments · Fixed by #23191 or #23282
Labels
bug Addresses a defect in current functionality. provider Pertains to the provider itself, rather than any interaction with AWS. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement.
Milestone

Comments

@LeiZhang-okta
Copy link

LeiZhang-okta commented Feb 11, 2022

Dear,

It seems the latest aws provider v4.0.0 doesn't support Osaka region(ap-northeast-3), I see this error:

Initializing provider plugins...
- Using previously-installed hashicorp/aws v4.0.0

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, we recommend adding version constraints in a required_providers block
in your configuration, with the constraint strings suggested below.

* hashicorp/aws: version = "~> 4.0.0"

Terraform has been successfully initialized!
...

Refreshing state...

Error: Invalid AWS Region: ap-northeast-3
...

If I pin provider version to v3.74.1, then it works.

Thank you!
Regards,

Lei

@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Feb 11, 2022
@Rajendraladkat1919
Copy link

@LeiZhang-okta can you please add below line in provider section.

skip_region_validation = true

@Rajendraladkat1919
Copy link

Also please check below links which will help you on this isse.

hashicorp/terraform#18834
#5835
hashicorp/terraform#20599

Hope this will help you.
Thanks.

@LeiZhang-okta
Copy link
Author

@Rajendraladkat1919 thank you for your reply. We could bypass this by adding skip_region_validation = true, we did this a lot in our terraform v0.11.x version because it doesn't support higher versions(>=3.31.0) of aws provider that supports the region.

However, this happens in our terraform 0.13.x environment today, which has been working with latest aws provider 3.x.x. I believe this was fixed since aws provider >=3.31.0, when 4.0.0 was published today, it broke again.

@ewbankkit ewbankkit added bug Addresses a defect in current functionality. provider Pertains to the provider itself, rather than any interaction with AWS. labels Feb 11, 2022
@ewbankkit
Copy link
Contributor

Relates: #22860.
I think this is caused by the upgrade to v2 of https://github.com/hashicorp/aws-sdk-go-base and its internal list of AWS Regions: https://github.com/hashicorp/aws-sdk-go-base/blob/v2/internal/endpoints/endpoints.go.
cc @gdavison.

@ewbankkit ewbankkit added regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. and removed needs-triage Waiting for first response or review from a maintainer. labels Feb 11, 2022
@github-actions github-actions bot added this to the v4.1.0 milestone Feb 15, 2022
@github-actions
Copy link

This functionality has been released in v4.1.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@LeiZhang-okta
Copy link
Author

Seems that 4.1.0 still does not support ap-northeast-3, here is my test

Initializing provider plugins...
- Finding hashicorp/aws versions matching "~> 4.1.0"...
- Installing hashicorp/aws v4.1.0...
- Installed hashicorp/aws v4.1.0 (signed by HashiCorp)

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
[terragrunt] [/terraform-live/root_modules/default/okta_quadrant/network_vpc_peering] 2022/02/15 22:51:08 Detected 1 Hooks
[terragrunt] 2022/02/15 22:51:08 Running command: terraform plan -var-file=tmp_var_file.tfvars -out=last_run_plan
Acquiring state lock. This may take a few moments...
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

module.network_vpc_peering.data.aws_caller_identity.requester: Refreshing state...
module.network_vpc_peering.data.aws_vpc.requester: Refreshing state...
module.network_vpc_peering.data.aws_route_tables.requester_private_route_tables: Refreshing state...

Error: Invalid AWS Region: ap-northeast-3

  on providers.tf line 12, in provider "aws":
  12: provider "aws" {

@github-actions
Copy link

This functionality has been released in v4.2.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@LeiZhang-okta
Copy link
Author

Thank you!, I can confirm that this issue has been fixed in v4.2.0.

@github-actions
Copy link

I'm going to lock this issue 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 similar to this, 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 May 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. provider Pertains to the provider itself, rather than any interaction with AWS. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement.
Projects
None yet
4 participants