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

Error configuring the backend "s3": Not a valid region: eu-west-3 #2745

Closed
pbramy opened this issue Dec 21, 2017 · 10 comments
Closed

Error configuring the backend "s3": Not a valid region: eu-west-3 #2745

pbramy opened this issue Dec 21, 2017 · 10 comments
Labels
bug Addresses a defect in current functionality. upstream-terraform Addresses functionality related to the Terraform core binary.

Comments

@pbramy
Copy link

pbramy commented Dec 21, 2017

After rebuilding the plugin for region eu-west-3.
We are able to create ressources .
One problem is still open is the usage of the region eu-west-3 in the S3 backend

Terraform Version

Terraform v0.11.1

  • provider.aws v1.6.0
  • provider.null v1.0.0
  • provider.template v1.0.0

Affected Resource(s)

Please list the resources as a list, for example:
S3 backend

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

terraform {
backend "s3" {
bucket = "deploystate"
key = "AWS/PARIS/tfstate"
region = "eu-west-3"
}
}

Debug Output

Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.

Expected Behavior

What should have happened?
We expect to use the S3 backend in the region eu-west-3

Actual Behavior

What actually happened?
After rebuilding the plugin with the fix to introduce the eu-west-3, terrafrom apply is OK for ressources creation.
Last problem is the S3 backend usage in the region.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform init
@jen20 jen20 added bug Addresses a defect in current functionality. dependencies Used to indicate dependency changes. upstream-terraform Addresses functionality related to the Terraform core binary. and removed dependencies Used to indicate dependency changes. labels Dec 29, 2017
@jen20
Copy link
Contributor

jen20 commented Dec 29, 2017

Hi @pbramy! Thanks for opening an issue. This is actually a bug with upstream Terraform, since the backends are contained there. I'll submit a pull request and link back to this issue, but unfortunately I can't merge it there.

@jen20
Copy link
Contributor

jen20 commented Dec 29, 2017

In the meantime, you can use the skip_region_validation parameter on the back end to avoid hitting this error.

@pbramy
Copy link
Author

pbramy commented Dec 29, 2017

@jen20 Thank a lot for your feedback. I tried the following in the main.tif without success.. Did I do wrong ?

main.tf
terraform {
backend "s3" {
bucket = "deploystate"
key = "AWS/PSG/tfstate"
region = "eu-west-3"
}
}

provider "aws" {
access_key = "${var.access_key}"
secret_key = "${var.secret_key}"
region = "${var.region}"
skip_region_validation = "true"
}

@loivis
Copy link
Contributor

loivis commented Dec 30, 2017

skip_region_validation = true
instead of
skip_region_validation = "true"?

@jen20
Copy link
Contributor

jen20 commented Dec 30, 2017

@loivis is correct here - the relevant code is: https://github.com/hashicorp/terraform/blob/master/backend/remote-state/s3/backend.go#L139-L144 - you'll need a literal true instead of a quoted string.

@pbramy
Copy link
Author

pbramy commented Dec 31, 2017

Dear all,
Something seems wrong in my configuration..
Terraform v0.11.1

  • provider.aws v1.6.0
  • provider.null v1.0.0
  • provider.template v1.0.0

plugin.
116256115 Dec 21 21:27 terraform-provider-aws_v1.6.0_x4

backend declaration...
terraform {
backend "s3" {
bucket = "deploystate"
key = "AWS/PSG/tfstate"
region = "eu-west-3"
skip_region_validation = true
}
}
and still the following error..
Error initializing new backend: Error configuring the backend "s3": 1 error(s) occurred:

  • : invalid or unknown key: skip_region_validation

I moved the declaration in provider
provider "aws" {
access_key = "${var.access_key}"
secret_key = "${var.secret_key}"
region = "${var.region}"
skip_region_validation = true
}
And get the error..

Error initializing new backend:
Error configuring the backend "s3": Not a valid region: eu-west-3

Last post for 2017... let's see if 2018 will be better..
Happy new year.

@Ninir
Copy link
Contributor

Ninir commented Jan 3, 2018

Hi folks,

Regarding @pbramy's error, there are multiple things to note:

Hope it helps and makes sense. We just need a bit more patience here :)

Happy Terraforming!

@pbramy
Copy link
Author

pbramy commented Jan 3, 2018

Hi @Ninir,
Thanks you for your feedback and ready to wait Terraform 0.11.2 and AWS provider 1.6.1.
We are not stuck based on the github integration we performed previously !
We tested the relocation of an Oracle workload from eu-west-1 to eu-west-3 without any problem. We will adjust our setup when the versions will be out.
Thanx again and Happy New Year 2018 !

@bflad
Copy link
Contributor

bflad commented Apr 11, 2018

Support for the eu-west-3 region in the S3 backend was released in Terraform core 0.11.3. Closing this out!

@bflad bflad closed this as completed Apr 11, 2018
@ghost
Copy link

ghost commented Apr 6, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 6, 2020
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. upstream-terraform Addresses functionality related to the Terraform core binary.
Projects
None yet
Development

No branches or pull requests

5 participants