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-459] Added new storage account iopstelt for ITN migration #1279

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

cfcuffari120400
Copy link
Contributor

@cfcuffari120400 cfcuffari120400 commented Nov 5, 2024

Motivation and Context

Storage accounts must be replicated to italy north in view of the infrastructure migration

Major Changes

Create replication of iopstelt in italy north

Dependencies

Testing

Documentation

Other Considerations

@FasanoBip FasanoBip changed the title CES-459-migrate-iopstelt new module code [CES-459] Added new storage account iopstelt for ITN migration Nov 8, 2024
Copy link

sonarqubecloud bot commented Dec 4, 2024

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we delete this file?

locals {
prefix = "io"
env_short = "p"
# domain = "elt"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# domain = "elt"

env_short = local.env_short
location = var.location
app_name = local.app_name
# domain = local.domain
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# domain = local.domain

@@ -6,3 +6,8 @@ terraform {
}
}
}


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

queue = false
table = true
}
blob_features = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
blob_features = {
blob_features = {

}
}


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

@Krusty93 Krusty93 marked this pull request as ready for review December 10, 2024 08:51
@Krusty93 Krusty93 requested a review from a team as a code owner December 10, 2024 08:51
Copy link

📖 Terraform Plan ('src/domains/elt/prod') - success

Terraform Plan
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # module.storage_accounts.azurerm_storage_container.messages_report_step1_itn_new will be created
  + resource "azurerm_storage_container" "messages_report_step1_itn_new" {
      + container_access_type   = "private"
      + has_immutability_policy = (known after apply)
      + has_legal_hold          = (known after apply)
      + id                      = (known after apply)
      + metadata                = (known after apply)
      + name                    = "messages-report-step1"
      + resource_manager_id     = (known after apply)
      + storage_account_name    = "iopweueltst01"
    }

  # module.storage_accounts.azurerm_storage_container.messages_step_final_itn_new will be created
  + resource "azurerm_storage_container" "messages_step_final_itn_new" {
      + container_access_type   = "private"
      + has_immutability_policy = (known after apply)
      + has_legal_hold          = (known after apply)
      + id                      = (known after apply)
      + metadata                = (known after apply)
      + name                    = "messages-report-step-final"
      + resource_manager_id     = (known after apply)
      + storage_account_name    = "iopweueltst01"
    }

  # module.storage_accounts.azurerm_storage_table.fneltcommands_itn_new will be created
  + resource "azurerm_storage_table" "fneltcommands_itn_new" {
      + id                   = (known after apply)
      + name                 = "fneltcommands"
      + storage_account_name = "iopweueltst01"
    }

  # module.storage_accounts.azurerm_storage_table.fnelterrors_itn_new will be created
  + resource "azurerm_storage_table" "fnelterrors_itn_new" {
      + id                   = (known after apply)
      + name                 = "fnelterrors"
      + storage_account_name = "iopweueltst01"
    }

  # module.storage_accounts.azurerm_storage_table.fnelterrors_message_status_itn_new will be created
  + resource "azurerm_storage_table" "fnelterrors_message_status_itn_new" {
      + id                   = (known after apply)
      + name                 = "fnelterrorsMessageStatus"
      + storage_account_name = "iopweueltst01"
    }

  # module.storage_accounts.azurerm_storage_table.fnelterrors_messages_itn_new will be created
  + resource "azurerm_storage_table" "fnelterrors_messages_itn_new" {
      + id                   = (known after apply)
      + name                 = "fnelterrorsMessages"
      + storage_account_name = "iopweueltst01"
    }

  # module.storage_accounts.azurerm_storage_table.fnelterrors_notification_status_itn_new will be created
  + resource "azurerm_storage_table" "fnelterrors_notification_status_itn_new" {
      + id                   = (known after apply)
      + name                 = "fnelterrorsNotificationStatus"
      + storage_account_name = "iopweueltst01"
    }

  # module.storage_accounts.azurerm_storage_table.fneltexports_itn_new will be created
  + resource "azurerm_storage_table" "fneltexports_itn_new" {
      + id                   = (known after apply)
      + name                 = "fneltexports"
      + storage_account_name = "iopweueltst01"
    }

  # module.storage_accounts.module.storage_account_elt_itn.azurerm_monitor_metric_alert.storage_account_health_check[0] will be created
  + resource "azurerm_monitor_metric_alert" "storage_account_health_check" {
      + auto_mitigate            = false
      + description              = "The average availability is less than 99.8%. Runbook: not needed."
      + enabled                  = true
      + frequency                = "PT5M"
      + id                       = (known after apply)
      + name                     = "[iopweueltst01] Low Availability"
      + resource_group_name      = "io-p-itn-elt-rg-01"
      + scopes                   = (known after apply)
      + severity                 = 0
      + tags                     = {
          + "CostCenter"     = "TS310 - PAGAMENTI & SERVIZI"
          + "CreatedBy"      = "Terraform"
          + "Environment"    = "Prod"
          + "ManagementTeam" = "IO Platform"
          + "Owner"          = "IO"
          + "Source"         = "https://github.com/pagopa/io-infra/blob/main/src/domains/elt/prod"
        }
      + target_resource_location = (known after apply)
      + target_resource_type     = (known after apply)
      + window_size              = "PT5M"

      + criteria {
          + aggregation            = "Average"
          + metric_name            = "Availability"
          + metric_namespace       = "Microsoft.Storage/storageAccounts"
          + operator               = "LessThan"
          + skip_metric_validation = false
          + threshold              = 99.8
        }
    }

  # module.storage_accounts.module.storage_account_elt_itn.azurerm_private_endpoint.this["blob"] will be created
  + resource "azurerm_private_endpoint" "this" {
      + custom_dns_configs       = (known after apply)
      + id                       = (known after apply)
      + location                 = "westeurope"
      + name                     = "io-p-weu-elt-blob-pep-01"
      + network_interface        = (known after apply)
      + private_dns_zone_configs = (known after apply)
      + resource_group_name      = "io-p-itn-elt-rg-01"
      + subnet_id                = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-common-rg-01/providers/Microsoft.Network/virtualNetworks/io-p-itn-common-vnet-01/subnets/io-p-itn-pep-snet-01"
      + tags                     = {
          + "CostCenter"     = "TS310 - PAGAMENTI & SERVIZI"
          + "CreatedBy"      = "Terraform"
          + "Environment"    = "Prod"
          + "ManagementTeam" = "IO Platform"
          + "Owner"          = "IO"
          + "Source"         = "https://github.com/pagopa/io-infra/blob/main/src/domains/elt/prod"
        }

      + private_dns_zone_group {
          + id                   = (known after apply)
          + name                 = "private-dns-zone-group"
          + private_dns_zone_ids = [
              + "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/privateDnsZones/privatelink.blob.core.windows.net",
            ]
        }

      + private_service_connection {
          + is_manual_connection           = false
          + name                           = "io-p-weu-elt-blob-pep-01"
          + private_connection_resource_id = (known after apply)
          + private_ip_address             = (known after apply)
          + subresource_names              = [
              + "blob",
            ]
        }
    }

  # module.storage_accounts.module.storage_account_elt_itn.azurerm_private_endpoint.this["table"] will be created
  + resource "azurerm_private_endpoint" "this" {
      + custom_dns_configs       = (known after apply)
      + id                       = (known after apply)
      + location                 = "westeurope"
      + name                     = "io-p-weu-elt-table-pep-01"
      + network_interface        = (known after apply)
      + private_dns_zone_configs = (known after apply)
      + resource_group_name      = "io-p-itn-elt-rg-01"
      + subnet_id                = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-common-rg-01/providers/Microsoft.Network/virtualNetworks/io-p-itn-common-vnet-01/subnets/io-p-itn-pep-snet-01"
      + tags                     = {
          + "CostCenter"     = "TS310 - PAGAMENTI & SERVIZI"
          + "CreatedBy"      = "Terraform"
          + "Environment"    = "Prod"
          + "ManagementTeam" = "IO Platform"
          + "Owner"          = "IO"
          + "Source"         = "https://github.com/pagopa/io-infra/blob/main/src/domains/elt/prod"
        }

      + private_dns_zone_group {
          + id                   = (known after apply)
          + name                 = "private-dns-zone-group"
          + private_dns_zone_ids = [
              + "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/privateDnsZones/privatelink.table.core.windows.net",
            ]
        }

      + private_service_connection {
          + is_manual_connection           = false
          + name                           = "io-p-weu-elt-table-pep-01"
          + private_connection_resource_id = (known after apply)
          + private_ip_address             = (known after apply)
          + subresource_names              = [
              + "table",
            ]
        }
    }

  # module.storage_accounts.module.storage_account_elt_itn.azurerm_security_center_storage_defender.this[0] will be created
  + resource "azurerm_security_center_storage_defender" "this" {
      + id                                          = (known after apply)
      + malware_scanning_on_upload_cap_gb_per_month = -1
      + malware_scanning_on_upload_enabled          = false
      + override_subscription_settings_enabled      = false
      + sensitive_data_discovery_enabled            = false
      + storage_account_id                          = (known after apply)
    }

  # module.storage_accounts.module.storage_account_elt_itn.azurerm_storage_account.this will be created
  + resource "azurerm_storage_account" "this" {
      + access_tier                        = "Hot"
      + account_kind                       = "StorageV2"
      + account_replication_type           = "ZRS"
      + account_tier                       = "Standard"
      + allow_nested_items_to_be_public    = true
      + cross_tenant_replication_enabled   = true
      + default_to_oauth_authentication    = false
      + enable_https_traffic_only          = true
      + id                                 = (known after apply)
      + infrastructure_encryption_enabled  = false
      + is_hns_enabled                     = false
      + large_file_share_enabled           = (known after apply)
      + local_user_enabled                 = true
      + location                           = "westeurope"
      + min_tls_version                    = "TLS1_2"
      + name                               = "iopweueltst01"
      + nfsv3_enabled                      = false
      + primary_access_key                 = (sensitive value)
      + primary_blob_connection_string     = (sensitive value)
      + primary_blob_endpoint              = (known after apply)
      + primary_blob_host                  = (known after apply)
      + primary_blob_internet_endpoint     = (known after apply)
      + primary_blob_internet_host         = (known after apply)
      + primary_blob_microsoft_endpoint    = (known after apply)
      + primary_blob_microsoft_host        = (known after apply)
      + primary_connection_string          = (sensitive value)
      + primary_dfs_endpoint               = (known after apply)
      + primary_dfs_host                   = (known after apply)
      + primary_dfs_internet_endpoint      = (known after apply)
      + primary_dfs_internet_host          = (known after apply)
      + primary_dfs_microsoft_endpoint     = (known after apply)
      + primary_dfs_microsoft_host         = (known after apply)
      + primary_file_endpoint              = (known after apply)
      + primary_file_host                  = (known after apply)
      + primary_file_internet_endpoint     = (known after apply)
      + primary_file_internet_host         = (known after apply)
      + primary_file_microsoft_endpoint    = (known after apply)
      + primary_file_microsoft_host        = (known after apply)
      + primary_location                   = (known after apply)
      + primary_queue_endpoint             = (known after apply)
      + primary_queue_host                 = (known after apply)
      + primary_queue_microsoft_endpoint   = (known after apply)
      + primary_queue_microsoft_host       = (known after apply)
      + primary_table_endpoint             = (known after apply)
      + primary_table_host                 = (known after apply)
      + primary_table_microsoft_endpoint   = (known after apply)
      + primary_table_microsoft_host       = (known after apply)
      + primary_web_endpoint               = (known after apply)
      + primary_web_host                   = (known after apply)
      + primary_web_internet_endpoint      = (known after apply)
      + primary_web_internet_host          = (known after apply)
      + primary_web_microsoft_endpoint     = (known after apply)
      + primary_web_microsoft_host         = (known after apply)
      + public_network_access_enabled      = true
      + queue_encryption_key_type          = "Service"
      + resource_group_name                = "io-p-itn-elt-rg-01"
      + secondary_access_key               = (sensitive value)
      + secondary_blob_connection_string   = (sensitive value)
      + secondary_blob_endpoint            = (known after apply)
      + secondary_blob_host                = (known after apply)
      + secondary_blob_internet_endpoint   = (known after apply)
      + secondary_blob_internet_host       = (known after apply)
      + secondary_blob_microsoft_endpoint  = (known after apply)
      + secondary_blob_microsoft_host      = (known after apply)
      + secondary_connection_string        = (sensitive value)
      + secondary_dfs_endpoint             = (known after apply)
      + secondary_dfs_host                 = (known after apply)
      + secondary_dfs_internet_endpoint    = (known after apply)
      + secondary_dfs_internet_host        = (known after apply)
      + secondary_dfs_microsoft_endpoint   = (known after apply)
      + secondary_dfs_microsoft_host       = (known after apply)
      + secondary_file_endpoint            = (known after apply)
      + secondary_file_host                = (known after apply)
      + secondary_file_internet_endpoint   = (known after apply)
      + secondary_file_internet_host       = (known after apply)
      + secondary_file_microsoft_endpoint  = (known after apply)
      + secondary_file_microsoft_host      = (known after apply)
      + secondary_location                 = (known after apply)
      + secondary_queue_endpoint           = (known after apply)
      + secondary_queue_host               = (known after apply)
      + secondary_queue_microsoft_endpoint = (known after apply)
      + secondary_queue_microsoft_host     = (known after apply)
      + secondary_table_endpoint           = (known after apply)
      + secondary_table_host               = (known after apply)
      + secondary_table_microsoft_endpoint = (known after apply)
      + secondary_table_microsoft_host     = (known after apply)
      + secondary_web_endpoint             = (known after apply)
      + secondary_web_host                 = (known after apply)
      + secondary_web_internet_endpoint    = (known after apply)
      + secondary_web_internet_host        = (known after apply)
      + secondary_web_microsoft_endpoint   = (known after apply)
      + secondary_web_microsoft_host       = (known after apply)
      + sftp_enabled                       = false
      + shared_access_key_enabled          = true
      + table_encryption_key_type          = "Service"
      + tags                               = {
          + "CostCenter"     = "TS310 - PAGAMENTI & SERVIZI"
          + "CreatedBy"      = "Terraform"
          + "Environment"    = "Prod"
          + "ManagementTeam" = "IO Platform"
          + "Owner"          = "IO"
          + "Source"         = "https://github.com/pagopa/io-infra/blob/main/src/domains/elt/prod"
        }

      + blob_properties {
          + change_feed_enabled      = true
          + default_service_version  = (known after apply)
          + last_access_time_enabled = false
          + versioning_enabled       = true
        }

      + identity {
          + principal_id = (known after apply)
          + tenant_id    = (known after apply)
          + type         = "SystemAssigned"
        }

      + network_rules (known after apply)

      + queue_properties (known after apply)

      + routing (known after apply)

      + share_properties (known after apply)
    }

Plan: 13 to add, 0 to change, 0 to destroy.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants