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

provider/aws: Allow bypassing region validation #11358

Merged
merged 1 commit into from
Jan 23, 2017
Merged

provider/aws: Allow bypassing region validation #11358

merged 1 commit into from
Jan 23, 2017

Conversation

radeksimko
Copy link
Member

This was requested in a few places, e.g. #7183 and could take the pressure off the users (rushing to upgrade) & maintainers (rushing to cut release) when AWS announces new region.

btw. Packer already has a similar option.

It is important to say that there will be still certain data sources & resources which simply won't work as Terraform doesn't have the metadata for unknown regions, e.g.

  • aws_s3_bucket due to zone ID
  • aws_redshift_service_account
  • aws_elb_service_account
  • aws_elb_hosted_zone_id

Before

provider "aws" {
  region = "eu-west-x"
}

resource "aws_vpc" "tada" {
  cidr_block = "10.0.0.0/16"
}
Error refreshing state: 1 error(s) occurred:

* Not a valid region: eu-west-x

After

provider "aws" {
  region = "eu-west-x"
  skip_region_validation = true
}

resource "aws_vpc" "tada" {
  cidr_block = "10.0.0.0/16"
}

Assuming the region doesn't actually exist, the SDK will just keep retrying for ~5mins and eventually return error due to failed DNS lookup:

Error applying plan:

1 error(s) occurred:

* aws_vpc.tada: Error creating VPC: RequestError: send request failed
caused by: Post https://ec2.eu-west-x.amazonaws.com/: dial tcp: lookup ec2.eu-west-x.amazonaws.com on 10.0.0.1:53: no such host

^ that is also why most users using valid and publicly available regions want to avoid setting this new parameter.

@stack72
Copy link
Contributor

stack72 commented Jan 23, 2017

LOVE THIS! LGTM :)

@ghost
Copy link

ghost commented Apr 17, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants