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" {
84
84
output_path = " ${ path . module } /compose.zip"
85
85
}
86
86
87
+ locals {
88
+ compose_zip = data. archive_file . compose . output_size > 0 ? " " : filebase64 (" ${ path . module } /compose.zip" )
89
+ }
90
+
87
91
data "cloudinit_config" "setup" {
88
92
depends_on = [
89
93
data . archive_file . compose ,
90
- // resource.null_resource.setup
91
94
]
92
95
gzip = false # not supported on Equinix Metal
93
96
base64_encode = false # not supported on Equinix Metal
@@ -99,7 +102,7 @@ data "cloudinit_config" "setup" {
99
102
part {
100
103
content_type = " text/cloud-config"
101
104
content = templatefile (" ${ path . module } /cloud-config.cfg" , {
102
- COMPOSE_ZIP = filebase64 ( " ${ path . module } /compose.zip " )
105
+ COMPOSE_ZIP = local.compose_zip
103
106
WORKER_MAC = metal_device.tink_worker.ports[1 ].mac
104
107
PROVISIONER_IP = metal_device.tink_provisioner.network[0 ].address
105
108
})
You can’t perform that action at this time.
0 commit comments