File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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.
1719data "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 )
You can’t perform that action at this time.
0 commit comments