Skip to content

Commit 5a2af36

Browse files
committed
Add comment
1 parent 114f8a4 commit 5a2af36

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

common/provision/main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ locals {
1414
provision_folder = "etc_puppetlabs"
1515
}
1616

17+
# When adding archive_file sources, also add matching sha256 to
18+
# deploy_puppetserver_files' triggers_replace.
1719
data "archive_file" "puppetserver_files" {
1820
type = "zip"
1921
output_path = "${path.module}/files/${local.provision_folder}.zip"
@@ -79,6 +81,9 @@ resource "terraform_data" "deploy_puppetserver_files" {
7981
private_key = var.configuration.ssh_key.private
8082
}
8183

84+
# Use individual hashes instead of archive_file.output_sha256
85+
# because when using output_sha256 Terraform would trigger a deployment even when the sha256 was unchanged.
86+
# Make sure to mirror the content of archive file.
8287
triggers_replace = {
8388
puppetserver_ids = var.puppetserver_ids
8489
terraform_data = sha256(var.configuration.terraform_data)

0 commit comments

Comments
 (0)