From 71da24531c9de24438594969ad698044d805c12f Mon Sep 17 00:00:00 2001 From: Basilio Bogado <541149+basiliskus@users.noreply.github.com> Date: Tue, 5 Dec 2023 11:15:29 -0800 Subject: [PATCH] Added terraform to create new storage account and metadata container --- operations/template/app.tf | 2 +- operations/template/storage.tf | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 operations/template/storage.tf diff --git a/operations/template/app.tf b/operations/template/app.tf index c94106c1b..c08df5f53 100644 --- a/operations/template/app.tf +++ b/operations/template/app.tf @@ -34,7 +34,7 @@ resource "azurerm_linux_web_app" "api" { ENV = var.environment REPORT_STREAM_URL_PREFIX = "https://${local.rs_domain_prefix}prime.cdc.gov" KEY_VAULT_NAME = azurerm_key_vault.key_storage.name - + METADATA_CONTAINER_NAME = azurerm_storage_container.metadata.name } identity { diff --git a/operations/template/storage.tf b/operations/template/storage.tf new file mode 100644 index 000000000..b9c467cae --- /dev/null +++ b/operations/template/storage.tf @@ -0,0 +1,15 @@ +resource "azurerm_storage_account" "storage" { + name = "cdcti${var.environment}" + resource_group_name = data.azurerm_resource_group.group.name + location = data.azurerm_resource_group.group.location + account_tier = "Standard" + account_replication_type = "GRS" + account_kind = "StorageV2" + allow_nested_items_to_be_public = false +} + +resource "azurerm_storage_container" "metadata" { + name = "metadata" + storage_account_name = azurerm_storage_account.storage.name + container_access_type = "private" +}