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

Specifying Encryption type "KMS" with a custom KMS key specifies a destroy/create for each new plan #85

Open
jim-leary opened this issue Sep 7, 2021 · 2 comments
Labels
bug 🐛 An issue with the system

Comments

@jim-leary
Copy link

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

Specifying Encryption type "KMS" with a custom KMS key specifies a destroy/create of all defined registries for each new Terraform plan

Expected Behavior

No changes should be identified. Works as expected when not configuring a custom KMS key.

Steps to Reproduce

Steps to reproduce the behavior:
See above

Screenshots

Environment (please complete the following information):

  • OSX: 11.5.2
  • Terraform: v1.0.4
  • This module: ~> 0.32
  • AWS Provider hashicorp/aws: ~> 3.49

Additional Context

@jim-leary jim-leary added the bug 🐛 An issue with the system label Sep 7, 2021
@achakote
Copy link

achakote commented Dec 9, 2021

Workaround for this issue is using target_key_arn

data "aws_kms_alias" "ecr" {
  name = "alias/aws/ecr"
}

module "ecr" {
  source  = "cloudposse/ecr/aws"
  version = "0.32.3"
  image_names          = ["abc" "asdada"]

  encryption_configuration = ({
    encryption_type = "KMS"
    kms_key         = data.aws_kms_alias.ecr.target_key_arn
  })
}

@xcloudscript
Copy link

Use the key_id output instead ARN, here works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

3 participants