Skip to content

Commit

Permalink
[#IOPLT-205] Align Storage accounts to GRS (#796)
Browse files Browse the repository at this point in the history
  • Loading branch information
AleDore authored Dec 14, 2023
1 parent 14827cf commit 97d4c36
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
| <a name="module_redis_cgn_snet"></a> [redis\_cgn\_snet](#module\_redis\_cgn\_snet) | git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet | v7.28.0 |
| <a name="module_redis_common"></a> [redis\_common](#module\_redis\_common) | git::https://github.com/pagopa/terraform-azurerm-v3.git//redis_cache | v7.28.0 |
| <a name="module_redis_common_backup"></a> [redis\_common\_backup](#module\_redis\_common\_backup) | git::https://github.com/pagopa/terraform-azurerm-v3.git//storage_account | v7.28.0 |
| <a name="module_redis_common_backup_zrs"></a> [redis\_common\_backup\_zrs](#module\_redis\_common\_backup\_zrs) | git::https://github.com/pagopa/terraform-azurerm-v3.git//storage_account | v7.28.0 |
| <a name="module_redis_common_snet"></a> [redis\_common\_snet](#module\_redis\_common\_snet) | git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet | v7.28.0 |
| <a name="module_redis_messages_v6"></a> [redis\_messages\_v6](#module\_redis\_messages\_v6) | git::https://github.com/pagopa/terraform-azurerm-v3.git//redis_cache | v7.28.0 |
| <a name="module_selfcare_be_common_snet"></a> [selfcare\_be\_common\_snet](#module\_selfcare\_be\_common\_snet) | git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet | v7.28.0 |
Expand Down
2 changes: 1 addition & 1 deletion src/core/app_messages.tf
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ module "app_messages_function" {
storage_account_info = {
account_kind = "StorageV2"
account_tier = "Standard"
account_replication_type = "LRS"
account_replication_type = "GRS"
access_tier = "Hot"
advanced_threat_protection_enable = true
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/function_devportal_service_data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ module "function_devportalservicedata" {
storage_account_info = {
account_kind = "StorageV2"
account_tier = "Standard"
account_replication_type = "LRS"
account_replication_type = "GRS"
access_tier = "Hot"
advanced_threat_protection_enable = true
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/function_elt.tf
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ module "function_elt" {
storage_account_info = {
account_kind = "StorageV2"
account_tier = "Standard"
account_replication_type = "LRS"
account_replication_type = "GRS"
access_tier = "Hot"
advanced_threat_protection_enable = true
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/function_messages_cqrs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ module "function_messages_cqrs" {
storage_account_info = {
account_kind = "StorageV2"
account_tier = "Standard"
account_replication_type = "LRS"
account_replication_type = "GRS"
access_tier = "Hot"
advanced_threat_protection_enable = true
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/function_publiceventdispatcher.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ module "function_pblevtdispatcher" {
storage_account_info = {
account_kind = "StorageV2"
account_tier = "Standard"
account_replication_type = "LRS"
account_replication_type = "GRS"
access_tier = "Hot"
advanced_threat_protection_enable = true
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/function_subscription_migrations.tf
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ module "function_subscriptionmigrations" {
storage_account_info = {
account_kind = "StorageV2"
account_tier = "Standard"
account_replication_type = "LRS"
account_replication_type = "GRS"
access_tier = "Hot"
advanced_threat_protection_enable = true
}
Expand Down
21 changes: 19 additions & 2 deletions src/core/redis.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,24 @@ module "redis_common_backup" {
account_kind = "StorageV2"
account_tier = "Premium"
access_tier = "Hot"
account_replication_type = "LRS"
account_replication_type = "GRS"
resource_group_name = azurerm_resource_group.rg_common.name
location = azurerm_resource_group.rg_common.location
advanced_threat_protection = true
allow_nested_items_to_be_public = false
public_network_access_enabled = true

tags = var.tags
}

module "redis_common_backup_zrs" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//storage_account?ref=v7.28.0"

name = replace(format("%s-stredisbackup", local.project), "-", "")
account_kind = "StorageV2"
account_tier = "Premium"
access_tier = "Hot"
account_replication_type = "ZRS"
resource_group_name = azurerm_resource_group.rg_common.name
location = azurerm_resource_group.rg_common.location
advanced_threat_protection = true
Expand Down Expand Up @@ -43,7 +60,7 @@ module "redis_common" {
backup_configuration = {
frequency = var.redis_common.rdb_backup_frequency
max_snapshot_count = var.redis_common.rdb_backup_max_snapshot_count
storage_connection_string = module.redis_common_backup.primary_connection_string
storage_connection_string = module.redis_common_backup_zrs.primary_connection_string
}

# when azure can apply patch?
Expand Down
2 changes: 1 addition & 1 deletion src/core/storage_api.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module "storage_api_replica" {
account_kind = "StorageV2"
account_tier = "Standard"
access_tier = "Hot"
account_replication_type = "LRS"
account_replication_type = "GRS"
resource_group_name = azurerm_resource_group.rg_internal.name
location = azurerm_resource_group.rg_internal.location
advanced_threat_protection = true
Expand Down

0 comments on commit 97d4c36

Please sign in to comment.