Skip to content

Commit

Permalink
Adding a hash to the user data scripts so terraform will see changes …
Browse files Browse the repository at this point in the history
…exist and replace them as needed
  • Loading branch information
cbailey6079 committed Apr 25, 2024
1 parent 80f8002 commit 958b306
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions s3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ resource "aws_s3_object" "web_user_data" {
bucket = aws_s3_bucket.user_data.id
key = "web_user_data.sh"
content = sensitive(templatefile("${path.module}/templates/web_user_data.sh", local.web_interpolation_vars))
source_hash = md5(sensitive(templatefile("${path.module}/templates/web_user_data.sh", local.web_interpolation_vars)))
}

resource "aws_s3_object" "worker_user_data" {
bucket = aws_s3_bucket.user_data.id
key = "worker_user_data.sh"
content = sensitive(templatefile("${path.module}/templates/worker_user_data.sh", local.worker_interpolation_vars))
source_hash = md5(sensitive(templatefile("${path.module}/templates/worker_user_data.sh", local.worker_interpolation_vars)))
}

0 comments on commit 958b306

Please sign in to comment.