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

Start using terraform registry #1374

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

christian-calabrese
Copy link
Contributor

Motivation and Context

Major Changes

Dependencies

Testing

Documentation

Other Considerations

Copy link

📖 Terraform Plan ('src/core/prod') - success

Terraform Plan
No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

Warning: Deprecated attribute

  on ../_modules/vpn/main.tf line 22, in module "vpn":
  22:       aad_audience          = data.azuread_application.vpn_app.application_id

The attribute "application_id" is deprecated. Refer to the provider
documentation for details.

(and one more similar warning elsewhere)

Warning: Argument is deprecated

  with module.azdoa_weu.module.azdoa_snet.azurerm_subnet.this,
  on .terraform/modules/azdoa_weu.azdoa_snet/subnet/main.tf line 23, in resource "azurerm_subnet" "this":
  23:   private_endpoint_network_policies_enabled     = var.private_endpoint_network_policies_enabled

`private_endpoint_network_policies_enabled` will be removed in favour of the
property `private_endpoint_network_policies` in version 4.0 of the AzureRM
Provider

(and 11 more similar warnings elsewhere)

Copy link

📖 Terraform Plan ('src/common/prod') - success

Terraform Plan
data.azurerm_linux_function_app.function_profile: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.appservice_continua: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.ipatente_vehicles_app_itn: Still reading... [10s elapsed]
data.azurerm_linux_function_app.function_assets_cdn: Still reading... [10s elapsed]
data.azurerm_linux_web_app.firmaconio_selfcare_web_app: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.session_manager_03: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.fims_op_app: Still reading... [10s elapsed]
data.azurerm_linux_function_app.app_messages_xl[1]: Still reading... [10s elapsed]
data.azurerm_linux_function_app.app_messages_xl[0]: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.cms_backoffice_app_itn: Still reading... [10s elapsed]
data.azurerm_linux_function_app.function_profile: Still reading... [20s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.appservice_continua: Still reading... [20s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.ipatente_vehicles_app_itn: Still reading... [20s elapsed]
data.azurerm_linux_web_app.firmaconio_selfcare_web_app: Still reading... [20s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.session_manager_03: Still reading... [20s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.fims_op_app: Still reading... [20s elapsed]
data.azurerm_linux_function_app.app_messages_xl[0]: Still reading... [20s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.cms_backoffice_app_itn: Still reading... [20s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.ipatente_practices_app_itn: Still reading... [10s elapsed]
data.azurerm_linux_function_app.wallet_user: Still reading... [10s elapsed]
data.azurerm_linux_function_app.io_fims_user: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.session_manager_03: Still reading... [30s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.appservice_devportal_be: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.ipatente_payments_app_itn: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.ipatente_practices_app_itn: Still reading... [20s elapsed]
data.azurerm_subnet.cosmos_api_allowed["fn3slackbot"]: Still reading... [10s elapsed]
data.azurerm_linux_function_app.services_app_backend_function_app: Still reading... [10s elapsed]
data.azurerm_linux_function_app.wallet_user: Still reading... [20s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.ipatente_licences_app_itn: Still reading... [10s elapsed]
data.azurerm_linux_function_app.io_fims_user: Still reading... [20s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.session_manager_03: Still reading... [40s elapsed]
data.azurerm_linux_function_app.lollipop_function: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.appservice_devportal_be: Still reading... [20s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.ipatente_payments_app_itn: Still reading... [20s elapsed]
data.azurerm_subnet.cosmos_api_allowed["fn3slackbot"]: Still reading... [20s elapsed]
data.azurerm_linux_function_app.services_app_backend_function_app: Still reading... [20s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.ipatente_licences_app_itn: Still reading... [20s elapsed]
data.azurerm_linux_function_app.lollipop_function: Still reading... [20s elapsed]
data.azurerm_linux_function_app.eucovidcert: Still reading... [10s elapsed]
data.azurerm_linux_function_app.io_sign_user: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.appservice_selfcare_be: Still reading... [10s elapsed]
module.application_gateway_weu.data.azurerm_linux_web_app.appservice_selfcare_be: Still reading... [20s elapsed]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place
-/+ destroy and then create replacement

Terraform will perform the following actions:

-/+ resource "azurerm_role_assignment" "apim_client_role" {
      ~ id                                     = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-common-rg-01/providers/Microsoft.ApiManagement/service/io-p-itn-apim-01/providers/Microsoft.Authorization/roleAssignments/25d255dc-30ab-4f20-fe95-8723761a4f3f" -> (known after apply)
      ~ name                                   = "25d255dc-30ab-4f20-fe95-8723761a4f3f" -> (known after apply)
      ~ principal_id                           = "23969a45-a6ba-47a4-be43-1207169be299" -> "/servicePrincipals/23969a45-a6ba-47a4-be43-1207169be299" # forces replacement
      ~ principal_type                         = "ServicePrincipal" -> (known after apply)
      ~ role_definition_id                     = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/providers/Microsoft.Authorization/roleDefinitions/71522526-b88f-4d52-b57f-d31fc3546d0d" -> (known after apply)
      + skip_service_principal_aad_check       = (known after apply)
        # (6 unchanged attributes hidden)
    }

  # azurerm_role_assignment.apim_client_role["Contributor"] must be replaced
-/+ resource "azurerm_role_assignment" "apim_client_role" {
      ~ id                                     = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-common-rg-01/providers/Microsoft.ApiManagement/service/io-p-itn-apim-01/providers/Microsoft.Authorization/roleAssignments/bb2b27b7-4388-de4f-7558-17ca26d44677" -> (known after apply)
      ~ name                                   = "bb2b27b7-4388-de4f-7558-17ca26d44677" -> (known after apply)
      ~ principal_id                           = "23969a45-a6ba-47a4-be43-1207169be299" -> "/servicePrincipals/23969a45-a6ba-47a4-be43-1207169be299" # forces replacement
      ~ principal_type                         = "ServicePrincipal" -> (known after apply)
      ~ role_definition_id                     = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c" -> (known after apply)
      + skip_service_principal_aad_check       = (known after apply)
        # (6 unchanged attributes hidden)
    }

-/+ resource "azurerm_role_assignment" "apim_client_role" {
      ~ id                                     = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-common-rg-01/providers/Microsoft.ApiManagement/service/io-p-itn-apim-01/providers/Microsoft.Authorization/roleAssignments/a59f2e3d-0014-3078-3cc4-7c1ab47eb8f4" -> (known after apply)
      ~ name                                   = "a59f2e3d-0014-3078-3cc4-7c1ab47eb8f4" -> (known after apply)
      ~ principal_id                           = "23969a45-a6ba-47a4-be43-1207169be299" -> "/servicePrincipals/23969a45-a6ba-47a4-be43-1207169be299" # forces replacement
      ~ principal_type                         = "ServicePrincipal" -> (known after apply)
      ~ role_definition_id                     = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7" -> (known after apply)
      + skip_service_principal_aad_check       = (known after apply)
        # (6 unchanged attributes hidden)
    }

-/+ resource "azurerm_role_assignment" "dev_portal_role" {
      ~ id                                     = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-common-rg-01/providers/Microsoft.ApiManagement/service/io-p-itn-apim-01/providers/Microsoft.Authorization/roleAssignments/e33c82aa-a3ff-618d-d122-b10e5f97bb6c" -> (known after apply)
      ~ name                                   = "e33c82aa-a3ff-618d-d122-b10e5f97bb6c" -> (known after apply)
      ~ principal_id                           = "57159fcf-4cde-4cd3-b42f-4f778448e125" -> "/servicePrincipals/57159fcf-4cde-4cd3-b42f-4f778448e125" # forces replacement
      ~ principal_type                         = "ServicePrincipal" -> (known after apply)
      ~ role_definition_id                     = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/providers/Microsoft.Authorization/roleDefinitions/71522526-b88f-4d52-b57f-d31fc3546d0d" -> (known after apply)
      + skip_service_principal_aad_check       = (known after apply)
        # (6 unchanged attributes hidden)
    }

  # azurerm_role_assignment.dev_portal_role["Contributor"] must be replaced
-/+ resource "azurerm_role_assignment" "dev_portal_role" {
      ~ id                                     = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-common-rg-01/providers/Microsoft.ApiManagement/service/io-p-itn-apim-01/providers/Microsoft.Authorization/roleAssignments/a7ae30ff-8ad1-9233-bcea-319dfbf9a2fb" -> (known after apply)
      ~ name                                   = "a7ae30ff-8ad1-9233-bcea-319dfbf9a2fb" -> (known after apply)
      ~ principal_id                           = "57159fcf-4cde-4cd3-b42f-4f778448e125" -> "/servicePrincipals/57159fcf-4cde-4cd3-b42f-4f778448e125" # forces replacement
      ~ principal_type                         = "ServicePrincipal" -> (known after apply)
      ~ role_definition_id                     = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c" -> (known after apply)
      + skip_service_principal_aad_check       = (known after apply)
        # (6 unchanged attributes hidden)
    }

-/+ resource "azurerm_role_assignment" "dev_portal_role" {
      ~ id                                     = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-common-rg-01/providers/Microsoft.ApiManagement/service/io-p-itn-apim-01/providers/Microsoft.Authorization/roleAssignments/780e9e7f-541a-4c18-67e1-593d5b66e3fd" -> (known after apply)
      ~ name                                   = "780e9e7f-541a-4c18-67e1-593d5b66e3fd" -> (known after apply)
      ~ principal_id                           = "57159fcf-4cde-4cd3-b42f-4f778448e125" -> "/servicePrincipals/57159fcf-4cde-4cd3-b42f-4f778448e125" # forces replacement
      ~ principal_type                         = "ServicePrincipal" -> (known after apply)
      ~ role_definition_id                     = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7" -> (known after apply)
      + skip_service_principal_aad_check       = (known after apply)
        # (6 unchanged attributes hidden)
    }

  # module.application_gateway_weu.azurerm_web_application_firewall_policy.api_app will be updated in-place
  ~ resource "azurerm_web_application_firewall_policy" "api_app" {
        id                  = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-external/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/io-p-waf-appgateway-api-app-policy"
        name                = "io-p-waf-appgateway-api-app-policy"
        tags                = {
            "BusinessUnit"   = "App IO"
            "CostCenter"     = "TS000 - Tecnologia e Servizi"
            "CreatedBy"      = "Terraform"
            "Environment"    = "Prod"
            "ManagementTeam" = "IO Platform"
            "Source"         = "https://github.com/pagopa/io-infra/blob/main/src/common/prod"
        }
        # (4 unchanged attributes hidden)

      ~ policy_settings {
          ~ request_body_inspect_limit_in_kb          = 0 -> 128
            # (6 unchanged attributes hidden)
        }

        # (1 unchanged block hidden)
    }

Plan: 6 to add, 1 to change, 6 to destroy.

Warning: Argument is deprecated

  with module.application_gateway_weu.azurerm_web_application_firewall_policy.api_app,
  on ../_modules/application_gateway/firewall.tf line 62, in resource "azurerm_web_application_firewall_policy" "api_app":
  62:         disabled_rules = [
  63:           "942100",
  64:           "942120",
  65:           "942190",
  66:           "942200",
  67:           "942210",
  68:           "942240",
  69:           "942250",
  70:           "942260",
  71:           "942330",
  72:           "942340",
  73:           "942370",
  74:           "942380",
  75:           "942430",
  76:           "942440",
  77:           "942450",
  78:         ]

`disabled_rules` will be removed in favour of the `rule` property in version
4.0 of the AzureRM Provider.

(and 53 more similar warnings elsewhere)

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

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant