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

Terragrunt does not detect changes to remote state bucket_sse_kms_key_id #3364

Open
caspar-ds opened this issue Aug 27, 2024 · 3 comments · Fixed by #3383
Open

Terragrunt does not detect changes to remote state bucket_sse_kms_key_id #3364

caspar-ds opened this issue Aug 27, 2024 · 3 comments · Fixed by #3383
Assignees
Labels
bug Something isn't working needs design We need to flesh out the design before we can resolve the issue

Comments

@caspar-ds
Copy link

Describe the bug

Terragrunt does not check for changes to the remote_state bucket_sse_kms_key_id config value.

Steps To Reproduce

  • Initialise a new S3 remote state backend using the AWS managed KMS key
  • Set bucket_sse_kms_key_id to a KMS key id
  • Remove .terragrunt-cache
  • Init

Expected behavior

The remote state bucket should be updated to use the CMK provided in bucket_sse_kms_key_id

Versions

  • Terragrunt version: 0.66.9
  • Terraform version: 1.5.7
  • Environment details (Ubuntu 20.04, Windows 10, etc.): OS X

Additional context

It looks like only the bucket algorithm is used when determining if an update is required:

enabled, err := checkIfSSEForS3Enabled(s3Client, config, terragruntOptions)

if *rule.ApplyServerSideEncryptionByDefault.SSEAlgorithm == fetchEncryptionAlgorithm(config) {

@caspar-ds caspar-ds added the bug Something isn't working label Aug 27, 2024
@shaheerkhan12605
Copy link

Not sure if this would help. For me, every time I made changes in the remote repository, I use terragrunt plan --terragrunt-source-update --terragrunt-provider-cache flags to update terragrunt cache.

@yhakbar
Copy link
Collaborator

yhakbar commented Sep 4, 2024

Fix released in v0.67.2

@yhakbar yhakbar reopened this Sep 5, 2024
@yhakbar
Copy link
Collaborator

yhakbar commented Sep 5, 2024

The fix to address this had some unforeseen consequences. We will revisit the issue in the future as part of a breaking change.

See explanation here.

@yhakbar yhakbar added the needs design We need to flesh out the design before we can resolve the issue label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs design We need to flesh out the design before we can resolve the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants