Skip to content

Commit

Permalink
fix: precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
umbcoppolabottazzi committed Dec 11, 2023
1 parent 5531fc2 commit 192d8a7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/core/03_apim_0.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ resource "azurerm_resource_group" "rg_api" {

# APIM subnet
module "apim_snet" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet?ref=v7.23.0"
count = var.apim_enabled == true ? 1 : 0
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet?ref=v7.23.0"
count = var.apim_enabled == true ? 1 : 0

name = "${local.project}-apim-snet"
resource_group_name = azurerm_resource_group.rg_vnet.name
Expand All @@ -34,8 +34,8 @@ module "apim_snet" {
}

module "apim_stv2_snet" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet?ref=v7.23.0"
count = var.apim_enabled == true ? 1 : 0
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet?ref=v7.23.0"
count = var.apim_enabled == true ? 1 : 0

name = "${local.project}-apim-stv2-snet"
resource_group_name = azurerm_resource_group.rg_vnet.name
Expand Down Expand Up @@ -68,14 +68,14 @@ resource "azurerm_network_security_rule" "apim_snet_nsg_rules" {
}

resource "azurerm_subnet_network_security_group_association" "apim_stv2_snet" {
count = var.apim_enabled == true ? 1 : 0
count = var.apim_enabled == true ? 1 : 0

subnet_id = module.apim_stv2_snet[0].id
network_security_group_id = azurerm_network_security_group.apim_snet_nsg.id
}

resource "azurerm_subnet_network_security_group_association" "apim_snet" {
count = var.apim_enabled == true ? 1 : 0
count = var.apim_enabled == true ? 1 : 0

subnet_id = module.apim_snet[0].id
network_security_group_id = azurerm_network_security_group.apim_snet_nsg.id
Expand Down Expand Up @@ -138,7 +138,7 @@ resource "azurerm_key_vault_access_policy" "api_management_policy" {
# 🏷 custom domain
#
resource "azurerm_api_management_custom_domain" "api_custom_domain" {
count = var.apim_enabled == true ? 1 : 0
count = var.apim_enabled == true ? 1 : 0

api_management_id = module.apim[0].id

Expand Down
4 changes: 2 additions & 2 deletions src/core/99_variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ locals {

#APIM
# api.internal.*.devopslab.pagopa.it
api_internal_domain = "api.internal.${var.prod_dns_zone_prefix}.${var.external_domain}"
apim_management_public_ip_name = "${local.project}-apim-management-pip"
api_internal_domain = "api.internal.${var.prod_dns_zone_prefix}.${var.external_domain}"
apim_management_public_ip_name = "${local.project}-apim-management-pip"
apim_management_public_ip_name_2 = "${local.project}-apim-management-v2-pip"

#AKS
Expand Down
2 changes: 2 additions & 0 deletions src/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ az network dns zone show \

| Name | Type |
|------|------|
| [azurerm_api_management_custom_domain.api_custom_domain](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_custom_domain) | resource |
| [azurerm_application_insights.application_insights](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/application_insights) | resource |
| [azurerm_dns_a_record.api_devopslab_pagopa_it](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/dns_a_record) | resource |
| [azurerm_dns_a_record.helm_template_ingress_devopslab_pagopa_it](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/dns_a_record) | resource |
Expand All @@ -84,6 +85,7 @@ az network dns zone show \
| [azurerm_private_dns_zone_virtual_network_link.vnet_core](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/private_dns_zone_virtual_network_link) | resource |
| [azurerm_public_ip.aks_outbound](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/public_ip) | resource |
| [azurerm_public_ip.apim_management_public_ip](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/public_ip) | resource |
| [azurerm_public_ip.apim_management_public_ip_2](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/public_ip) | resource |
| [azurerm_public_ip.appgateway_beta_public_ip](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/public_ip) | resource |
| [azurerm_public_ip.appgateway_public_ip](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/public_ip) | resource |
| [azurerm_resource_group.azdo_rg](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group) | resource |
Expand Down

0 comments on commit 192d8a7

Please sign in to comment.