Refactor config and encryption files to use instance_mac_addr variable
This commit is contained in:
@@ -2,4 +2,5 @@ locals {
|
||||
instance_ips = [
|
||||
"${data.contabo_instance.microk8s.ip_config[0].v4[0].ip}/32",
|
||||
]
|
||||
instance_mac_addr = replace(data.contabo_instance.microk8s.mac_address, ":", "_")
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
resource "scaleway_object" "encryption_key" {
|
||||
bucket = scaleway_object_bucket.infra_assets.id
|
||||
key = "keys/${replace(data.contabo_instance.microk8s.mac_address, ":", "_")}.key"
|
||||
key = "keys/${local.instance_mac_addr}.key"
|
||||
|
||||
content_base64 = base64encode(var.encryption_key)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user