File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -84,10 +84,13 @@ data "archive_file" "compose" {
8484 output_path = " ${ path . module } /compose.zip"
8585}
8686
87+ locals {
88+ compose_zip = data. archive_file . compose . output_size > 0 ? " " : filebase64 (" ${ path . module } /compose.zip" )
89+ }
90+
8791data "cloudinit_config" "setup" {
8892 depends_on = [
8993 data . archive_file . compose ,
90- // resource.null_resource.setup
9194 ]
9295 gzip = false # not supported on Equinix Metal
9396 base64_encode = false # not supported on Equinix Metal
@@ -99,7 +102,7 @@ data "cloudinit_config" "setup" {
99102 part {
100103 content_type = " text/cloud-config"
101104 content = templatefile (" ${ path . module } /cloud-config.cfg" , {
102- COMPOSE_ZIP = filebase64 ( " ${ path . module } /compose.zip " )
105+ COMPOSE_ZIP = local.compose_zip
103106 WORKER_MAC = metal_device.tink_worker.ports[1 ].mac
104107 PROVISIONER_IP = metal_device.tink_provisioner.network[0 ].address
105108 })
You can’t perform that action at this time.
0 commit comments