Several ARN Resources are hardcoded and should use data "aws_partition" "current" {} pattern
xenoglaux88 opened this issue · 0 comments
xenoglaux88 commented
Summary
When deploying to a AWS partition that is not aws
explicitly the system fails with Errors that the resource does not exist.
impacted modules:
eks-jx
eks-jx.cluster.eks
impacted files:
./eks-jx.cluster.eks/local.tf
./eks-jx/modules/cluster/main.tf
./eks-jx/modules/cluster/irsa.tf
./eks-jx/modules/vault/main.tf
Steps to reproduce the behavior
For a non aws region (e.g. aws-us-gov) run the following:
terraform init
terraform plan (visual inspection of arns shows incorrect arn assignments)
terraform apply (for errors)
Expected behavior
The arns produced for route 53, IAM policies, EC2, S3 should show an arn prefix of arn:<aws_partition>:
. In my case arn:aws-us-gov
.
Actual behavior
arn:aws
Terraform version
14.11
The output of terraform version
is:
Terraform v0.14.11
+ provider registry.terraform.io/hashicorp/aws v3.39.0
+ provider registry.terraform.io/hashicorp/helm v2.1.2
+ provider registry.terraform.io/hashicorp/kubernetes v2.1.0
+ provider registry.terraform.io/hashicorp/local v2.1.0
+ provider registry.terraform.io/hashicorp/null v3.1.0
+ provider registry.terraform.io/hashicorp/random v3.1.0
+ provider registry.terraform.io/hashicorp/template v2.2.0
Your version of Terraform is out of date! The latest version
is 0.15.3. You can update by downloading from https://www.terraform.io/downloads.html