Skip to content

Commit

Permalink
[#IOPID-2041] removed weu-function-app
Browse files Browse the repository at this point in the history
moved cosmos container to specific file
  • Loading branch information
arcogabbo authored and Krusty93 committed Oct 10, 2024
1 parent 30ba2c8 commit e2592c7
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 966 deletions.
71 changes: 0 additions & 71 deletions src/domains/functions/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ data "azurerm_monitor_action_group" "io_com_action_group" {
resource_group_name = "io-p-itn-msgs-rg-01"
}

data "azurerm_subnet" "ioweb_profile_snet" {
name = format("%s-%s-ioweb-profile-snet", local.project, var.location_short)
virtual_network_name = local.vnet_common_name
resource_group_name = local.rg_common_name
}

data "azurerm_private_dns_zone" "privatelink_queue_core" {
name = "privatelink.queue.core.windows.net"
resource_group_name = local.rg_common_name
Expand All @@ -49,14 +43,6 @@ data "azurerm_private_dns_zone" "privatelink_table_core" {
resource_group_name = local.rg_common_name
}

###
# kv where the certificate for api-web domain is located
###
data "azurerm_key_vault" "ioweb_kv" {
name = format("%s-ioweb-kv", local.project)
resource_group_name = format("%s-ioweb-sec-rg", local.project)
}

data "azurerm_subnet" "private_endpoints_subnet" {
name = "pendpoints"
virtual_network_name = local.vnet_common_name
Expand Down Expand Up @@ -105,33 +91,10 @@ data "azurerm_storage_account" "citizen_auth_common" {
resource_group_name = "io-p-citizen-auth-data-rg"
}

#
# Logs resources
#

data "azurerm_storage_account" "logs" {
name = replace(format("%s-stlogs", local.project), "-", "")
resource_group_name = format("%s-rg-operations", local.project)
}

#
# Notifications resources
#

data "azurerm_resource_group" "notifications_rg" {
name = format("%s-weu-messages-notifications-rg", local.project)
}

data "azurerm_storage_account" "push_notifications_storage" {
name = replace(format("%s-weu-messages-notifst", local.project), "-", "")
resource_group_name = data.azurerm_resource_group.notifications_rg.name
}

data "azurerm_storage_account" "notifications" {
name = replace(format("%s-stnotifications", local.project), "-", "")
resource_group_name = format("%s-rg-internal", local.project)
}

data "azurerm_app_service" "appservice_app_backendli" {
name = format("%s-app-appbackendli", local.project)
resource_group_name = format("%s-rg-linux", local.project)
Expand All @@ -142,16 +105,6 @@ data "azurerm_storage_account" "locked_profiles_storage" {
resource_group_name = local.rg_internal_name
}

data "azurerm_storage_account" "storage_apievents" {
name = replace(format("%s-stapievents", local.project), "-", "")
resource_group_name = local.rg_internal_name
}

data "azurerm_key_vault_secret" "app_backend_UNIQUE_EMAIL_ENFORCEMENT_USER" {
name = "appbackend-UNIQUE-EMAIL-ENFORCEMENT-USER"
key_vault_id = data.azurerm_key_vault.common.id
}

data "azurerm_subnet" "function_eucovidcert_snet" {
name = format("%s-eucovidcert-snet", local.project)
resource_group_name = local.rg_common_name
Expand All @@ -169,27 +122,3 @@ data "azurerm_subnet" "azdoa_snet" {
resource_group_name = local.rg_common_name
virtual_network_name = local.vnet_common_name
}

data "azurerm_subnet" "app_backendli_snet" {
name = "appbackendli"
resource_group_name = local.rg_common_name
virtual_network_name = local.vnet_common_name
}

data "azurerm_subnet" "app_backendl1_snet" {
name = "appbackendl1"
resource_group_name = local.rg_common_name
virtual_network_name = local.vnet_common_name
}

data "azurerm_subnet" "app_backendl2_snet" {
name = "appbackendl2"
resource_group_name = local.rg_common_name
virtual_network_name = local.vnet_common_name
}

data "azurerm_subnet" "app_backendl3_snet" {
name = "appbackendl3"
resource_group_name = local.rg_common_name
virtual_network_name = local.vnet_common_name
}
14 changes: 14 additions & 0 deletions src/domains/functions/database.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Containers

module "db_subscription_profileemails_container" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//cosmosdb_sql_container?ref=v7.67.1"
name = "profile-emails-leases"
resource_group_name = format("%s-rg-internal", local.project)
account_name = format("%s-cosmos-api", local.project)
database_name = "db"
partition_key_path = "/_partitionKey"

autoscale_settings = {
max_throughput = 1000
}
}
15 changes: 0 additions & 15 deletions src/domains/functions/env/prod/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,8 @@ lock_enable = true
cidr_subnet_fnadmin = ["10.0.15.0/26"]
cidr_subnet_shared_1 = ["10.0.16.0/26"]
cidr_subnet_fncdnassets = ["10.0.131.0/24"]
cidr_subnet_app = ["10.0.132.0/26", "10.0.132.64/26"]
cidr_subnet_app_async = ["10.0.132.128/26"]
cidr_subnet_services = ["10.0.139.0/26", "10.0.139.64/26"]

# Functions App
function_app_kind = "Linux"
function_app_sku_tier = "PremiumV3"
function_app_sku_size = "P1v3"

# Functions Services
function_services_kind = "Linux"
function_services_sku_tier = "PremiumV3"
Expand All @@ -34,14 +27,6 @@ function_services_autoscale_minimum = 6
function_services_autoscale_maximum = 30
function_services_autoscale_default = 10

# Functions App Async
function_app_async_kind = "Linux"
function_app_async_sku_tier = "PremiumV3"
function_app_async_sku_size = "P1v3"
function_app_async_autoscale_minimum = 3 # 2 instance to achieve redundancy and failover
function_app_async_autoscale_maximum = 30
function_app_async_autoscale_default = 10

# Functions Admin
function_admin_kind = "Linux"
function_admin_sku_tier = "PremiumV3"
Expand Down
Loading

0 comments on commit e2592c7

Please sign in to comment.