diff --git a/src/domains/citizen-auth-app/04_redis.tf b/src/domains/citizen-auth-app/04_redis.tf index cf4ffcfb5..7b303aba1 100644 --- a/src/domains/citizen-auth-app/04_redis.tf +++ b/src/domains/citizen-auth-app/04_redis.tf @@ -1,9 +1,4 @@ # Citizen-auth domain Redis Common -data "azurerm_redis_cache" "redis_common" { - name = format("%s-%s-%s-redis-std-v6", local.product, var.location_short, var.domain) - resource_group_name = data.azurerm_resource_group.data_rg.name -} - data "azurerm_redis_cache" "redis_common_itn" { name = format("%s-redis-std-v6", local.project_itn) resource_group_name = data.azurerm_resource_group.data_rg_itn.name diff --git a/src/domains/citizen-auth-app/README.md b/src/domains/citizen-auth-app/README.md index b1f212d80..f771e43c0 100644 --- a/src/domains/citizen-auth-app/README.md +++ b/src/domains/citizen-auth-app/README.md @@ -133,7 +133,6 @@ | [azurerm_private_dns_zone.privatelink_queue_core_windows_net](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/private_dns_zone) | data source | | [azurerm_private_dns_zone.privatelink_table_core_windows_net](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/private_dns_zone) | data source | | [azurerm_redis_cache.core_domain_redis_common](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/redis_cache) | data source | -| [azurerm_redis_cache.redis_common](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/redis_cache) | data source | | [azurerm_redis_cache.redis_common_itn](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/redis_cache) | data source | | [azurerm_resource_group.core_domain_common_rg](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/resource_group) | data source | | [azurerm_resource_group.data_rg](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/resource_group) | data source | diff --git a/src/domains/citizen-auth-common/01_network.tf b/src/domains/citizen-auth-common/01_network.tf index 019cebe86..1f58c6f80 100644 --- a/src/domains/citizen-auth-common/01_network.tf +++ b/src/domains/citizen-auth-common/01_network.tf @@ -57,17 +57,6 @@ data "azurerm_subnet" "private_endpoints_subnet_itn" { resource_group_name = "io-p-itn-common-rg-01" } -## Redis Common subnet -module "redis_common_snet" { - source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet?ref=v8.44.1" - name = format("%s-redis-snet", local.project) - address_prefixes = var.cidr_subnet_redis_common - resource_group_name = local.vnet_common_resource_group_name - virtual_network_name = local.vnet_common_name - - private_endpoint_network_policies_enabled = false -} - ## Cosmos Private Endpoint resource "azurerm_private_endpoint" "cosmos_db" { name = "${local.project_itn}-account-sql-pep-01" @@ -82,6 +71,8 @@ resource "azurerm_private_endpoint" "cosmos_db" { subresource_names = ["Sql"] } } + +## Redis Common subnet module "redis_common_snet_itn" { source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet?ref=v8.44.1" name = format("%s-redis-snet", local.project_itn) diff --git a/src/domains/citizen-auth-common/04_redis_common.tf b/src/domains/citizen-auth-common/04_redis_common.tf index 6339af44a..62f37684e 100644 --- a/src/domains/citizen-auth-common/04_redis_common.tf +++ b/src/domains/citizen-auth-common/04_redis_common.tf @@ -2,52 +2,6 @@ /** * [REDIS V6] */ -module "redis_common" { - source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//redis_cache?ref=v8.44.1" - name = format("%s-redis-std-v6", local.project) - resource_group_name = azurerm_resource_group.data_rg.name - location = azurerm_resource_group.data_rg.location - capacity = 1 - family = "C" - sku_name = "Standard" - redis_version = "6" - enable_authentication = true - zones = null - - // when azure can apply patch? - patch_schedules = [{ - day_of_week = "Sunday" - start_hour_utc = 23 - }, - { - day_of_week = "Monday" - start_hour_utc = 23 - }, - { - day_of_week = "Tuesday" - start_hour_utc = 23 - }, - { - day_of_week = "Wednesday" - start_hour_utc = 23 - }, - { - day_of_week = "Thursday" - start_hour_utc = 23 - }, - ] - - private_endpoint = { - enabled = true - virtual_network_id = data.azurerm_virtual_network.vnet_common.id - subnet_id = module.redis_common_snet.id - private_dns_zone_ids = [data.azurerm_private_dns_zone.privatelink_redis_cache.id] - } - - tags = var.tags -} - - resource "azurerm_resource_group" "data_rg_itn" { name = "${local.project_itn}-data-rg-01" location = local.itn_location diff --git a/src/domains/citizen-auth-common/99_variables.tf b/src/domains/citizen-auth-common/99_variables.tf index 1d82f6338..affb24784 100644 --- a/src/domains/citizen-auth-common/99_variables.tf +++ b/src/domains/citizen-auth-common/99_variables.tf @@ -107,11 +107,6 @@ variable "enable_azdoa" { } # Redis Common -variable "cidr_subnet_redis_common" { - type = list(string) - description = "Redis Common address space." -} - variable "cidr_subnet_redis_common_itn" { type = list(string) description = "Redis Common address space." diff --git a/src/domains/citizen-auth-common/README.md b/src/domains/citizen-auth-common/README.md index 9b6b43b67..3e18c5108 100644 --- a/src/domains/citizen-auth-common/README.md +++ b/src/domains/citizen-auth-common/README.md @@ -31,9 +31,7 @@ | [key\_vault](#module\_key\_vault) | git::https://github.com/pagopa/terraform-azurerm-v3.git//key_vault | v8.44.1 | | [lollipop\_assertions\_storage](#module\_lollipop\_assertions\_storage) | github.com/pagopa/terraform-azurerm-v3//storage_account | v8.12.0 | | [lollipop\_assertions\_storage\_customer\_managed\_key](#module\_lollipop\_assertions\_storage\_customer\_managed\_key) | git::https://github.com/pagopa/terraform-azurerm-v3//storage_account_customer_managed_key | v8.12.0 | -| [redis\_common](#module\_redis\_common) | git::https://github.com/pagopa/terraform-azurerm-v3.git//redis_cache | v8.44.1 | | [redis\_common\_itn](#module\_redis\_common\_itn) | git::https://github.com/pagopa/terraform-azurerm-v3.git//redis_cache | v8.44.1 | -| [redis\_common\_snet](#module\_redis\_common\_snet) | git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet | v8.44.1 | | [redis\_common\_snet\_itn](#module\_redis\_common\_snet\_itn) | git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet | v8.44.1 | ## Resources @@ -121,7 +119,6 @@ | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [application\_insights\_name](#input\_application\_insights\_name) | Specifies the name of the Application Insights. | `string` | n/a | yes | -| [cidr\_subnet\_redis\_common](#input\_cidr\_subnet\_redis\_common) | Redis Common address space. | `list(string)` | n/a | yes | | [cidr\_subnet\_redis\_common\_itn](#input\_cidr\_subnet\_redis\_common\_itn) | Redis Common address space. | `list(string)` | n/a | yes | | [citizen\_auth\_database](#input\_citizen\_auth\_database) | n/a |
map(| n/a | yes | | [domain](#input\_domain) | n/a | `string` | n/a | yes | diff --git a/src/domains/citizen-auth-common/env/prod/terraform.tfvars b/src/domains/citizen-auth-common/env/prod/terraform.tfvars index 8cbc3e141..1f02d9ba2 100644 --- a/src/domains/citizen-auth-common/env/prod/terraform.tfvars +++ b/src/domains/citizen-auth-common/env/prod/terraform.tfvars @@ -35,5 +35,4 @@ application_insights_name = "io-p-ai-common" # You can retrieve the list of current defined subnets using the CLI command # az network vnet subnet list --subscription PROD-IO --vnet-name io-p-vnet-common --resource-group io-p-rg-common --output table # and thus define new CIDRs according to the unallocated address space -cidr_subnet_redis_common = ["10.0.118.0/24"] cidr_subnet_redis_common_itn = ["10.20.17.0/24"]
object({
max_throughput = number
ttl = number
})
)