Hi,
I have an issue linked to eu-west-3 region support with terraform_remote_state.
This is linked to https://github.com/terraform-providers/terraform-provider-aws/issues/2745, but might not be covered yet, since I follow the workarounds provided there (skip_region_validation) and this still does not work.
I could not find where the source code of terraform_remote_state is located to investigate myself.
Terraform v0.11.2
AWS Provider 1.7.1
Please list the resources as a list, for example:
provider "aws" {
version = "~> 1.7.0"
allowed_account_ids = ["${var.allowed_account_id}"]
region = "eu-west-3"
skip_region_validation = "true"
}
terraform {
backend "s3" {
bucket = "mybucket"
key = "path/to/my/key"
region = "eu-west-3"
skip_region_validation = "true"
}
}
data "terraform_remote_state" "this" {
backend = "s3"
config {
region = "eu-west-3"
bucket = "path/to/this/key"
key = "terraform.tfstate"
}
}
data.terraform_remote_state.vpc: Refreshing state...
Error: Error refreshing state: 1 error(s) occurred:
* data.terraform_remote_state.this: 1 error(s) occurred:
* data.terraform_remote_state.this: data.terraform_remote_state.this: error initializing backend: Not a valid region: eu-west-3
https://github.com/terraform-providers/terraform-provider-aws/issues/2745
Hi @ebarault! Thanks for opening an issue. This likely requires the vendored version of the AWS plugin to be in updated in Terraform core - the provider knows about eu-west-3 but not the back end code (this is a client-side validation). I'll update the dependency in the main repository and open a pull request on it.
replying to myself:
it happens that we can also set the skip_region_validation = true option in each terraform_remote_state block like this:
data "terraform_remote_state" "this" {
backend = "s3"
config {
region = "eu-west-3"
bucket = "path/to/this/key"
skip_region_validation = true
key = "terraform.tfstate"
}
}
a bit annoying when requiring lots of terraform_remote_state, but works.
@ebarault The referenced pull request should do the trick - in the meantime your workaround is valid, if a little ugly!
@jen20 : thks, i'll follow the landing of this PR and update with my test results
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!