Created
May 29, 2023 14:11
-
-
Save ItayPodhajcer/e83660de93405a3f51c97561894a069c to your computer and use it in GitHub Desktop.
terraform-did-web-azure/main.tf-docs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "azurerm_storage_blob" "root" { | |
name = ".well-known/did.json" | |
storage_account_name = azurerm_storage_account.this.name | |
storage_container_name = "$web" | |
type = "Block" | |
content_type = "application/json" | |
source_content = templatefile(var.root_doc, { | |
domain = cloudflare_record.this.hostname | |
}) | |
} | |
resource "azurerm_storage_blob" "subdocs" { | |
for_each = var.sub_docs | |
name = "${each.value.route}/did.json" | |
storage_account_name = azurerm_storage_account.this.name | |
storage_container_name = "$web" | |
type = "Block" | |
content_type = "application/json" | |
source_content = templatefile(each.value.doc, { | |
domain = cloudflare_record.this.hostname | |
route = replace(each.value.route, "/", ":") | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment