diff --git a/modules/storage/storage_blob.tf b/modules/storage/storage_blob.tf new file mode 100644 index 0000000..3c1eaf0 --- /dev/null +++ b/modules/storage/storage_blob.tf @@ -0,0 +1,9 @@ +resource "azurerm_storage_blob" "storage_blob" { + count = length(var.storage_blobs) + name = var.storage_blobs[count.index].name + storage_account_name = azurerm_storage_account.storage_account.name + storage_container_name = var.storage_blobs[count.index].name + type = var.storage_blobs[count.index].type + content_type = var.storage_blobs[count.index].content_type + source = var.storage_blobs[count.index].source +} \ No newline at end of file diff --git a/modules/storage/variables.tf b/modules/storage/variables.tf index 037f895..ae80179 100644 --- a/modules/storage/variables.tf +++ b/modules/storage/variables.tf @@ -16,6 +16,17 @@ variable "storage_account_name" { type = string } +variable "storage_blobs" { + default = [] + type = list(object({ + name = string, + storage_container_name = string, + type = string, + content_type = string, + source = string + })) +} + variable "storage_containers" { default = [] type = list(string)