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

[CES-476] Added new storage account iopsignst for ITN migration #313

Draft
wants to merge 5 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
10 changes: 10 additions & 0 deletions infra/resources/prod/data.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
data "azurerm_virtual_network" "vnet_itn" {
name = "${local.project}-itn-common-vnet-01"
resource_group_name = "${local.project}-itn-common-rg-01"
}

data "azurerm_subnet" "subnet_private_endpoints_itn" {
name = "io-p-itn-pep-snet-01 "
resource_group_name = data.azurerm_virtual_network.vnet_itn.resource_group_name
virtual_network_name = data.azurerm_virtual_network.vnet_itn.name
}
14 changes: 14 additions & 0 deletions infra/resources/prod/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,17 @@ locals {
product = format("%s-%s", var.prefix, var.env_short)
project_itn = "${local.product}-itn"
}
###Italy North
locals {
prefix = "io"
env_short = "p"
domain = "sign"
instance_number = "01"
itn_environment = {
prefix = local.prefix
env_short = local.env_short
location = var.location
domain = local.domain
instance_number = local.instance_number
}
}
25 changes: 25 additions & 0 deletions infra/resources/prod/storage.tf
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,28 @@ resource "azurerm_storage_queue" "itn_api_keys" {
name = "api-keys"
storage_account_name = module.io_sign_storage_itn.name
}

module "azure_storage_account" {
source = "github.com/pagopa/dx//infra/modules/azure_storage_account?ref=main"

environment = local.itn_environment
resource_group_name = azurerm_resource_group.data_rg.name
access_tier = "Hot"

###TO CHECK
subnet_pep_id = data.azurerm_subnet.subnet_pep_itn.id
private_dns_zone_resource_group_name = "${local.prefix}-${local.env_short}-itn-common-rg-01"

subservices_enabled = {
blob = true
file = false
queue = true
table = false
}

force_public_network_access_enabled = false

action_group_id = data.azurerm_monitor_action_group.error_action_group.name

tags = var.tags
}
12 changes: 12 additions & 0 deletions infra/resources/prod/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -227,4 +227,16 @@ variable "io_sign_backoffice_func" {
variable "landing_cdn_url" {
type = string
description = "The URL of the landing CDN hosted by PAWSBuilder"
}

variable "environment" {
type = object({
prefix = string
env_short = string
location = string
domain = optional(string)
instance_number = string
})

description = "Values which are used to generate resource names and location short names. They are all mandatory except for domain, which should not be used only in the case of a resource used by multiple domains."
}
Loading