aws-samples / aws-cudos-framework-deployment

Command Line Interface tool for Cloud Intelligence Dashboards deployment
https://catalog.workshops.aws/awscid
MIT No Attribution
377 stars 144 forks source link

Terraform: S3 object tags and fix for continous drift with KMS-encrypted bucket #679

Closed sean-nixon closed 8 months ago

sean-nixon commented 8 months ago

Issue #, if available: #650 #659

Description of changes:

Adds template tags to S3 object and fixes issue of continual drift when using KMS default server-side encryption configuration on the S3 template_bucket. The etag of objects encrypted with SSE-C or SSE-KMS is not set to the MD5 hash of the object (https://docs.aws.amazon.com/AmazonS3/latest/API/API_Object.html). Terraform instead exposes a source_hash used to trigger re-uploads of the S3 objects to work around this issue with the etag.

I've also included tests that plan operations immediately after terraform apply do not result in changes when using default settings and when using KMS encryption.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.