Improved terraform syntax

This commit is contained in:
Michele Cereda
2023-01-18 00:19:15 +01:00
parent cf3d57046a
commit 063f76a435
2 changed files with 12 additions and 6 deletions

View File

@@ -112,15 +112,21 @@ merge_type: 'list(append)+dict(recurse_array)+str()'
base64_encode = true
part {
content = file("files/first.yaml")
content = file("${path.module}/files/cloud-init/first.yaml")
content_type = "text/cloud-config"
filename = "first.yaml"
}
part {
content = file("files/n-th.yaml")
content = templatefile(
"${path.module}/templates/cloud-init/n-th.yaml.tftpl",
{
key = value
}
)
content_type = "text/cloud-config"
filename = "n-th.yaml"
merge_type = "dict(recurse_array,no_replace)+list(append)"
filename = "n-th.yaml"
}
}
```

View File

@@ -8,7 +8,7 @@ ocpus = 4
# or check https://docs.oracle.com/en-us/iaas/images/
source_id = "ocid1.image.oc1.eu-amsterdam-1.aaaaaaaavmra3s4va4fqd4vlcrqc5v5jyqov5vdla3x3b6gzc64n6dkpuqua"
ssh_authorized_keys = <<EOT
ssh-ed25519 key-1 comment
ssh-ed25519 key-n comment
ssh_authorized_keys = <<-EOT
ssh-ed25519 key-1 comment
ssh-ed25519 key-n comment
EOT