Refactor bucket and encryption configuration

This commit is contained in:
2024-10-01 23:15:31 +02:00
parent 2271bc9ac3
commit dbd1155c2b
3 changed files with 19 additions and 7 deletions
+13
View File
@@ -0,0 +1,13 @@
resource "scaleway_object" "encryption_key" {
bucket = scaleway_object_bucket.infra_assets.id
key = "keys/${replace(data.contabo_instance.microk8s.mac_address, ":", "_")}.key"
content_base64 = base64encode(var.encryption_key)
}
resource "scaleway_object" "system_id_encryption_key" {
bucket = scaleway_object_bucket.infra_assets.id
key = "keys/${var.system_id}.key"
content_base64 = base64encode(var.encryption_key)
}