You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From time to time, the terraform command fails with
Error: creating KMS Alias (alias/eks/cbci-bp01-ci-v2-eks): AlreadyExistsException: An alias with the name arn:aws:kms:us-east-1:324005994172:alias/eks/cbci-bp01-ci-v2-eks already exists
with module.eks.module.kms.aws_kms_alias.this["cluster"],
on .terraform/modules/eks.kms/main.tf line 255, in resource "aws_kms_alias" "this":
255: resource "aws_kms_alias" "this" {
It only happens in the CI pipeline that it using a s3 as backend.
If your request is for a new feature, please use the Feature request template.
I have searched the open/closed issues in this repository and my issue is not listed.
I have checked that local tests are passing.
If the issue is related to an AWS EKS add-on, I have searched the open/closed issues in the upstream aws-ia/terraform-aws-eks-blueprints and my issue is not listed.
the state is in PENDING DELETION(not removed totally, but still exists with same name/path/arn)
the state file was not updated correctly (it might have been overwritten by an older version, it might for some reason have failed to be updated despite the correct applied changes from Terraform,...)
The text was updated successfully, but these errors were encountered:
Using the time provider as alternative like kms_key_alias = ["eks/${time_static.epoch.unix}"] instead of the random approach kms_key_alias = ["eks/${random_string.this.result}"]
carlosrodlop
changed the title
CI: Terraform Randomly fails with creating KMS Alias (alias/eks/cbci-bpxx-ci-xx-eks): AlreadyExistsException
[CI] Terraform Randomly fails with creating KMS Alias (alias/eks/cbci-bpxx-ci-xx-eks): AlreadyExistsException
Mar 7, 2024
Description
From time to time, the terraform command fails with
It only happens in the CI pipeline that it using a s3 as backend.
If your request is for a new feature, please use the
Feature request
template.Before you submit an issue, please perform the following first:
.terraform
directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!):rm -rf .terraform/
terraform init
Versions
Module version [Required]:
Terraform version:
Reproduction Code [Required]
Steps to reproduce the behavior:
Expected behavior
Actual behavior
Terminal Output Screenshot(s)
Additional context
It is similar to what is explained in https://stackoverflow.com/questions/62654684/terraform-alreadyexistsexception-an-alias-with-the-name-arnawskmsxxxxxxxxxx. Two hypotheses for this behaviour:
The text was updated successfully, but these errors were encountered: