Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Enable burst capacity BO Mongo db #2569

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/domains/selfcare-common/02_security.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resource "azurerm_resource_group" "sec_rg" {
}

module "key_vault" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//key_vault?ref=v6.7.0"
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//key_vault?ref=0b02ad0b16c57ee7afc663d4a97cca35d729841e"

name = "${local.product}-${var.domain}-kv"
location = azurerm_resource_group.sec_rg.location
Expand Down
20 changes: 11 additions & 9 deletions src/domains/selfcare-common/03_cosmosdb_bopagopa_datastore.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ locals {
}

module "bopagopa_cosmosdb_mongodb_snet" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet?ref=v6.7.0"
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet?ref=0b02ad0b16c57ee7afc663d4a97cca35d729841e"
name = "${local.project}-datastore-cosmosdb-snet"
address_prefixes = var.cidr_subnet_cosmosdb_mongodb
resource_group_name = local.vnet_resource_group_name
Expand All @@ -27,7 +27,7 @@ module "bopagopa_cosmosdb_mongodb_snet" {


module "bopagopa_cosmosdb_mongo_account" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//cosmosdb_account?ref=v6.7.0"
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//cosmosdb_account?ref=0b02ad0b16c57ee7afc663d4a97cca35d729841e"
name = "${local.project}-cosmos-account"
location = var.location
domain = var.domain
Expand All @@ -42,6 +42,8 @@ module "bopagopa_cosmosdb_mongo_account" {

enable_free_tier = var.bopagopa_datastore_cosmos_db_params.enable_free_tier

burst_capacity_enabled = var.bopagopa_datastore_cosmos_db_params.enable_burst_capacity

public_network_access_enabled = var.bopagopa_datastore_cosmos_db_params.public_network_access_enabled

consistency_policy = var.bopagopa_datastore_cosmos_db_params.consistency_policy
Expand All @@ -58,9 +60,9 @@ module "bopagopa_cosmosdb_mongo_account" {
allowed_virtual_network_subnet_ids = var.bopagopa_datastore_cosmos_db_params.public_network_access_enabled ? [] : [data.azurerm_subnet.aks_subnet.id]


private_endpoint_enabled = var.bopagopa_datastore_cosmos_db_params.private_endpoint_enabled
subnet_id = module.bopagopa_cosmosdb_mongodb_snet.id
private_dns_zone_ids = [data.azurerm_private_dns_zone.cosmos.id]
private_endpoint_enabled = var.bopagopa_datastore_cosmos_db_params.private_endpoint_enabled
subnet_id = module.bopagopa_cosmosdb_mongodb_snet.id
private_dns_zone_mongo_ids = [data.azurerm_private_dns_zone.cosmos.id]

tags = var.tags
}
Expand Down Expand Up @@ -96,7 +98,7 @@ resource "azurerm_management_lock" "mongodb_pagopa_backoffice" {

# Collections
module "mongdb_collection_products" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//cosmosdb_mongodb_collection?ref=v6.7.0"
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//cosmosdb_mongodb_collection?ref=0b02ad0b16c57ee7afc663d4a97cca35d729841e"

name = "wrappers"
resource_group_name = azurerm_resource_group.bopagopa_rg.name
Expand All @@ -118,7 +120,7 @@ module "mongdb_collection_products" {
}

module "mongdb_collection_brokeribans" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//cosmosdb_mongodb_collection?ref=v6.7.0"
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//cosmosdb_mongodb_collection?ref=0b02ad0b16c57ee7afc663d4a97cca35d729841e"

name = "brokerIbans"
resource_group_name = azurerm_resource_group.bopagopa_rg.name
Expand All @@ -140,7 +142,7 @@ module "mongdb_collection_brokeribans" {
}

module "mongdb_collection_brokerinstitutions" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//cosmosdb_mongodb_collection?ref=v6.7.0"
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//cosmosdb_mongodb_collection?ref=0b02ad0b16c57ee7afc663d4a97cca35d729841e"

name = "brokerInstitutions"
resource_group_name = azurerm_resource_group.bopagopa_rg.name
Expand All @@ -163,7 +165,7 @@ module "mongdb_collection_brokerinstitutions" {
}

module "mongdb_collection_maintenance" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//cosmosdb_mongodb_collection?ref=v6.7.0"
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//cosmosdb_mongodb_collection?ref=0b02ad0b16c57ee7afc663d4a97cca35d729841e"

name = "maintenance"
resource_group_name = azurerm_resource_group.bopagopa_rg.name
Expand Down
4 changes: 2 additions & 2 deletions src/domains/selfcare-common/10_github_identity.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ locals {

# create a module for each 20 repos
module "identity_cd_01" {
source = "github.com/pagopa/terraform-azurerm-v3//github_federated_identity?ref=v7.45.0"
source = "github.com/pagopa/terraform-azurerm-v3//github_federated_identity?ref=0b02ad0b16c57ee7afc663d4a97cca35d729841e"
# pagopa-<ENV><DOMAIN>-<COUNTER>-github-<PERMS>-identity
prefix = var.prefix
env_short = var.env_short
Expand Down Expand Up @@ -119,7 +119,7 @@ resource "null_resource" "github_runner_app_permissions_to_namespace_cd_01" {

# create a module for each 20 repos
module "identity_pr_01" {
source = "github.com/pagopa/terraform-azurerm-v3//github_federated_identity?ref=v8.18.0"
source = "github.com/pagopa/terraform-azurerm-v3//github_federated_identity?ref=0b02ad0b16c57ee7afc663d4a97cca35d729841e"
prefix = var.prefix
env_short = var.env_short
domain = "${var.domain}-01-pr"
Expand Down
2 changes: 1 addition & 1 deletion src/domains/selfcare-common/99_main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "<= 3.53.0"
version = "<= 3.116.0"
}
azuread = {
source = "hashicorp/azuread"
Expand Down
1 change: 1 addition & 0 deletions src/domains/selfcare-common/99_variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ variable "bopagopa_datastore_cosmos_db_params" {
})
main_geo_location_zone_redundant = bool
enable_free_tier = bool
enable_burst_capacity = bool
additional_geo_locations = list(object({
location = string
failover_priority = number
Expand Down
1 change: 1 addition & 0 deletions src/domains/selfcare-common/env/weu-dev/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ bopagopa_datastore_cosmos_db_params = {
server_version = "4.0"
main_geo_location_zone_redundant = false
enable_free_tier = false
enable_burst_capacity = false

additional_geo_locations = []
private_endpoint_enabled = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ bopagopa_datastore_cosmos_db_params = {
server_version = "4.0"
main_geo_location_zone_redundant = true
enable_free_tier = false
enable_burst_capacity = true

additional_geo_locations = [{
location = "northeurope"
Expand Down
1 change: 1 addition & 0 deletions src/domains/selfcare-common/env/weu-uat/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ bopagopa_datastore_cosmos_db_params = {
server_version = "4.0"
main_geo_location_zone_redundant = false
enable_free_tier = false
enable_burst_capacity = false

additional_geo_locations = []
private_endpoint_enabled = true
Expand Down
Loading