Hi,
It was happening because i did not configure the aws cli to use a named profile. I had it configured to use the root user. Using the Admin user fixed this error for me.
If your trying to use jenkins x and using the admin user doesn’t resolve it; you can refering to my issue here:
opened 03:27PM - 10 Dec 21 UTC
closed 09:25PM - 28 Dec 21 UTC
Receiving the following error after attempting to follow the [EKS Terraform quic… k start template](https://github.com/jx3-gitops-repositories/jx3-terraform-eks)
```
│ Error: error waiting for KMS Key (eea6239e-40cc-408a-a412-fa1ece308c15) policy propagation: timeout while waiting for state to become 'TRUE' (last state: 'FALSE', timeout: 5m0s)
│
│ with module.eks-jx.module.vault.aws_kms_key.kms_vault_unseal[0],
│ on .terraform\modules\eks-jx\modules\vault\main.tf line 98, in resource "aws_kms_key" "kms_vault_unseal":
│ 98: resource "aws_kms_key" "kms_vault_unseal" {
```
I've seen the resolution to this in this thread [here](https://github.com/hashicorp/terraform-provider-aws/issues/20588), which says I should downgrade the aws provider to 3.52. Although upon attempting to do that I get the following error regarding constraints.
```
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider
│ hashicorp/aws: locked provider registry.terraform.io/hashicorp/aws 3.52.0
│ does not match configured version constraint 1.52.0, >= 2.23.0, >= 2.53.0,
│ >= 2.70.0, >= 3.56.0, < 4.0.0; must use terraform init -upgrade to allow
│ selection of new versions
```
Terraform Version
`v1.1.0`
Registry Versions
```
+ provider registry.terraform.io/hashicorp/aws v3.69.0
+ provider registry.terraform.io/hashicorp/cloudinit v2.2.0
+ provider registry.terraform.io/hashicorp/helm v2.4.1
+ provider registry.terraform.io/hashicorp/kubernetes v2.7.1
+ 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
+ provider registry.terraform.io/terraform-aws-modules/http v2.4.1
```
My Variables.tf File contains:
```
// ----------------------------------------------------------------------------
// Optional Variables
// ----------------------------------------------------------------------------
variable "region" {
description = "AWS region code for creating resources."
type = string
default = "eu-west-2"
}
variable "profile" {
description = "Profile stored in aws config or credentials file"
type = string
default = "default"
}
variable "cluster_version" {
description = "Kubernetes version to use for the EKS cluster."
type = string
default = "1.21"
}
variable "vault_user" {
description = "The AWS IAM Username whose credentials will be used to authenticate the Vault pods against AWS"
type = string
default = "Administrator"
}
variable "cluster_name" {
description = "Name of the Kubernetes cluster to create"
type = string
default = "jx-infrastructure"
}
variable "force_destroy" {
description = "Flag to determine whether storage buckets get forcefully destroyed. If set to false, empty the bucket first in the aws s3 console, else terraform destroy will fail with BucketNotEmpty error"
type = bool
default = false
}
variable "is_jx2" {
default = false
type = bool
description = "Flag to specify if jx2 related resources need to be created"
}
variable "jx_git_url" {
description = "URL for the Jenins X cluster git repository"
type = string
default = "" // I've set to my Jenins X cluster git repo
}
variable "jx_bot_username" {
description = "Bot username used to interact with the Jenkins X cluster git repository"
type = string
default = ""// I've set the default to bot username
}
variable "jx_bot_token" {
description = "Bot token used to interact with the Jenkins X cluster git repository"
type = string
default = "" // I've set the default to my Bot Token
}
variable "nginx_chart_version" {
type = string
description = "nginx chart version"
default = "3.12.0"
}
variable "install_kuberhealthy" {
description = "Flag to specify if kuberhealthy operator should be installed"
type = bool
default = true
}
```
Hopefully it would be helpful