Skip to content

Commit

Permalink
chore: Migration uat using terraform ca module with suffix (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
manuraf authored Apr 11, 2024
1 parent c1e8658 commit c5616e6
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 28 deletions.
2 changes: 1 addition & 1 deletion helm/pnpg/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ configEnvSpecific:
APPLICATIONINSIGHTS_INSTRUMENTATION_LOGGING_LEVEL: "OFF"
B4F_ONBOARDING_LOG_LEVEL: "DEBUG"
REST_CLIENT_LOGGER_LEVEL: "FULL"
MS_ONBOARDING_URL: "https://selc-u-pnpg-onboarding-ms-ca.calmforest-ffe47bf1.westeurope.azurecontainerapps.io"
MS_ONBOARDING_URL: "https://selc-u-pnpg-onboarding-ms-ca.orangeground-0bd2d4dc.westeurope.azurecontainerapps.io"
2 changes: 1 addition & 1 deletion helm/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ configEnvSpecific:
APPLICATIONINSIGHTS_INSTRUMENTATION_LOGGING_LEVEL: "OFF"
B4F_ONBOARDING_LOG_LEVEL: "DEBUG"
REST_CLIENT_LOGGER_LEVEL: "FULL"
MS_ONBOARDING_URL: "https://selc-u-onboarding-ms-ca.agreeablesky-f71e6306.westeurope.azurecontainerapps.io"
MS_ONBOARDING_URL: "https://selc-u-onboarding-ms-ca.proudglacier-20652b81.westeurope.azurecontainerapps.io"
ONBOARDING_ALLOWED_INSTITUTIONS_PRODUCTS: "{'prod-interop':{'*'},'prod-pn':{'*'},'prod-io':{'*'},'prod-io-premium':{'*'},'prod-pagopa':{'*'},'prod-pn-coll':{'*'},'prod-fd':{'*'},'prod-fd-garantito':{'*'},'prod-io-sign':{'*'},'prod-pn-dev':{'*'},'prod-sendino':{'*'}}"
1 change: 1 addition & 0 deletions infra/container_apps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Deploy container on a Container App instance.
| <a name="input_is_pnpg"></a> [is\_pnpg](#input\_is\_pnpg) | (Optional) True if you want to apply changes to PNPG environment | `bool` | `false` | no |
| <a name="input_private_dns_name"></a> [private\_dns\_name](#input\_private\_dns\_name) | Container Apps private DNS record | `string` | n/a | yes |
| <a name="input_secrets_names"></a> [secrets\_names](#input\_secrets\_names) | KeyVault secrets to get values from | `map(string)` | n/a | yes |
| <a name="input_suffix_increment"></a> [suffix\_increment](#input\_suffix\_increment) | Suffix increment Container App Environment name | `string` | `""` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | n/a | `map(any)` | n/a | yes |
| <a name="input_workload_profile_name"></a> [workload\_profile\_name](#input\_workload\_profile\_name) | Workload Profile name to use | `string` | `null` | no |

Expand Down
28 changes: 14 additions & 14 deletions infra/container_apps/env/uat-pnpg/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
is_pnpg = true
env_short = "u"
private_dns_name = "selc-u-pnpg-onboardingbackend-ca.calmforest-ffe47bf1.westeurope.azurecontainerapps.io"
dns_zone_prefix = "imprese.uat.notifichedigitali"
api_dns_zone_prefix = "api-pnpg.uat.selfcare"
external_domain = "it"
cae_name = "cae"
workload_profile_name = "Consumption"
is_pnpg = true
env_short = "u"
private_dns_name = "selc-u-pnpg-onboardingbackend-ca.orangeground-0bd2d4dc.westeurope.azurecontainerapps.io"
dns_zone_prefix = "imprese.uat.notifichedigitali"
api_dns_zone_prefix = "api-pnpg.uat.selfcare"
external_domain = "it"
suffix_increment = "-001"
cae_name = "cae-001"

tags = {
CreatedBy = "Terraform"
Expand Down Expand Up @@ -46,31 +46,31 @@ app_settings = [
},
{
name = "MS_ONBOARDING_URL"
value = "https://selc-u-pnpg-onboarding-ms-ca.calmforest-ffe47bf1.westeurope.azurecontainerapps.io",
value = "https://selc-u-pnpg-onboarding-ms-ca.orangeground-0bd2d4dc.westeurope.azurecontainerapps.io",
},
{
name = "ONBOARDING_ALLOWED_INSTITUTIONS_PRODUCTS"
value = "{'prod-pn-pg':{'*'}}"
},
{
name = "MS_CORE_URL"
value = "https://selc-u-pnpg-ms-core-ca.calmforest-ffe47bf1.westeurope.azurecontainerapps.io"
value = "https://selc-u-pnpg-ms-core-ca.orangeground-0bd2d4dc.westeurope.azurecontainerapps.io"
},
{
name = "MS_EXTERNAL_INTERCEPTOR_URL"
value = "https://selc-u-pnpg-ext-interceptor-ca.calmforest-ffe47bf1.westeurope.azurecontainerapps.io"
value = "https://selc-u-pnpg-ext-interceptor-ca.orangeground-0bd2d4dc.westeurope.azurecontainerapps.io"
},
{
name = "USERVICE_PARTY_PROCESS_URL"
value = "https://selc-u-pnpg-ms-core-ca.calmforest-ffe47bf1.westeurope.azurecontainerapps.io"
value = "https://selc-u-pnpg-ms-core-ca.orangeground-0bd2d4dc.westeurope.azurecontainerapps.io"
},
{
name = "USERVICE_PARTY_REGISTRY_PROXY_URL"
value = "https://selc-u-pnpg-party-reg-proxy-ca.calmforest-ffe47bf1.westeurope.azurecontainerapps.io"
value = "https://selc-u-pnpg-party-reg-proxy-ca.orangeground-0bd2d4dc.westeurope.azurecontainerapps.io"
},
{
name = "MS_PRODUCT_URL"
value = "https://selc-u-pnpg-product-ca.calmforest-ffe47bf1.westeurope.azurecontainerapps.io"
value = "https://selc-u-pnpg-product-ca.orangeground-0bd2d4dc.westeurope.azurecontainerapps.io"
},
{
name = "USERVICE_USER_REGISTRY_URL"
Expand Down
24 changes: 12 additions & 12 deletions infra/container_apps/env/uat/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
env_short = "u"
private_dns_name = "selc-u-onboardingbackend-ca.agreeablesky-f71e6306.westeurope.azurecontainerapps.io"
dns_zone_prefix = "uat.selfcare"
api_dns_zone_prefix = "api.uat.selfcare"
cae_name = "cae"
workload_profile_name = "Consumption"
env_short = "u"
private_dns_name = "selc-u-onboardingbackend-ca.proudglacier-20652b81.westeurope.azurecontainerapps.io"
dns_zone_prefix = "uat.selfcare"
api_dns_zone_prefix = "api.uat.selfcare"
suffix_increment = "-001"
cae_name = "cae-001"

tags = {
CreatedBy = "Terraform"
Expand Down Expand Up @@ -44,31 +44,31 @@ app_settings = [
},
{
name = "MS_ONBOARDING_URL"
value = "https://selc-u-onboarding-ms-ca.agreeablesky-f71e6306.westeurope.azurecontainerapps.io",
value = "https://selc-u-onboarding-ms-ca.proudglacier-20652b81.westeurope.azurecontainerapps.io",
},
{
name = "ONBOARDING_ALLOWED_INSTITUTIONS_PRODUCTS"
value = "{'prod-interop':{'*'},'prod-pn':{'*'},'prod-io':{'*'},'prod-io-premium':{'*'},'prod-pagopa':{'*'},'prod-fd':{'*'},'prod-fd-garantito':{'*'},'prod-io-sign':{'*'},'prod-sendino':{'*'}}"
},
{
name = "MS_CORE_URL"
value = "https://selc-u-ms-core-ca.agreeablesky-f71e6306.westeurope.azurecontainerapps.io"
value = "https://selc-u-ms-core-ca.proudglacier-20652b81.westeurope.azurecontainerapps.io"
},
{
name = "MS_EXTERNAL_INTERCEPTOR_URL"
value = "https://selc-u-ext-interceptor-ca.agreeablesky-f71e6306.westeurope.azurecontainerapps.io"
value = "http://selc.internal.uat.selfcare.pagopa.it/ms-external-interceptor/v1"
},
{
name = "USERVICE_PARTY_PROCESS_URL"
value = "https://selc-u-ms-core-ca.agreeablesky-f71e6306.westeurope.azurecontainerapps.io"
value = "https://selc-u-ms-core-ca.proudglacier-20652b81.westeurope.azurecontainerapps.io"
},
{
name = "USERVICE_PARTY_REGISTRY_PROXY_URL"
value = "https://selc-u-party-reg-proxy-ca.agreeablesky-f71e6306.westeurope.azurecontainerapps.io"
value = "https://selc-u-party-reg-proxy-ca.proudglacier-20652b81.westeurope.azurecontainerapps.io"
},
{
name = "MS_PRODUCT_URL"
value = "https://selc-u-product-ca.agreeablesky-f71e6306.westeurope.azurecontainerapps.io"
value = "https://selc-u-product-ca.proudglacier-20652b81.westeurope.azurecontainerapps.io"
},
{
name = "USERVICE_USER_REGISTRY_URL"
Expand Down
1 change: 1 addition & 0 deletions infra/container_apps/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ locals {
project = "selc-${var.env_short}"

container_app_environment_name = "${local.project}${local.pnpg_suffix}-${var.cae_name}"
ca_resource_group_name = "${local.project}-container-app${var.suffix_increment}-rg"
}
1 change: 1 addition & 0 deletions infra/container_apps/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module "container_app_onboarding_backend" {
is_pnpg = var.is_pnpg

env_short = var.env_short
resource_group_name = local.ca_resource_group_name
container_app = var.container_app
container_app_name = "onboardingbackend"
container_app_environment_name = local.container_app_environment_name
Expand Down
6 changes: 6 additions & 0 deletions infra/container_apps/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,9 @@ variable "cae_name" {
description = "Container App Environment name"
default = "cae-cp"
}

variable "suffix_increment" {
type = string
description = "Suffix increment Container App Environment name"
default = ""
}

0 comments on commit c5616e6

Please sign in to comment.