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

Terraform 1.6.0 s3 backend kms_key_id doesn't work anymore with alias #34005

Closed
dosilyoun opened this issue Oct 6, 2023 · 2 comments · Fixed by #33993
Closed

Terraform 1.6.0 s3 backend kms_key_id doesn't work anymore with alias #34005

dosilyoun opened this issue Oct 6, 2023 · 2 comments · Fixed by #33993
Labels
backend/s3 bug new new issue not yet triaged v1.6 Issues (primarily bugs) reported against v1.6 releases
Milestone

Comments

@dosilyoun
Copy link

Terraform Version

1.6.0

Terraform Configuration Files

terraform {
  backend "s3" {
    region = "eu-central-1"
    bucket = "*****"
    key    = "terraform-state/***/***/terraform.tfstate"

    encrypt = true
    kms_key_id = "arn:aws:kms:eu-central-1:*********:alias/k*******"
    dynamodb_table = "****"
    assume_role = {
      role_arn = "arn:aws:iam::****:role/*****"
    }
  }
}

Debug Output

Error: Invalid KMS Key ARN

│ on backend.tf line 14, in terraform:
│ 14: kms_key_id = "arn:aws:kms:eu-central-1::alias/"

│ Value must be a valid KMS Key ARN, got "arn:aws:kms:eu-central-1::alias/"

Expected Behavior

terraform init is successful.
With version 1.5.7, it was worked.
Using key id instead of alias is still working in version 1.6.0

Actual Behavior

terraform init fails

Steps to Reproduce

  1. 'terraform init'

Additional Context

No response

References

No response

@dosilyoun dosilyoun added bug new new issue not yet triaged labels Oct 6, 2023
@jbardin jbardin added backend/s3 v1.6 Issues (primarily bugs) reported against v1.6 releases labels Oct 6, 2023
@WtfJoke
Copy link

WtfJoke commented Oct 6, 2023

I think thats a duplicate of #33979

Copy link
Contributor

github-actions bot commented Dec 9, 2023

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backend/s3 bug new new issue not yet triaged v1.6 Issues (primarily bugs) reported against v1.6 releases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants