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-68] Added configuration for APIM migration to itn #246

Merged
merged 3 commits into from
Nov 18, 2024
Merged
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
38 changes: 38 additions & 0 deletions infra/resources/prod/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# prod

<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | <= 4.2.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 3.116.0 |

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_apim_itn"></a> [apim\_itn](#module\_apim\_itn) | ../_modules/apim | n/a |
| <a name="module_apim_weu"></a> [apim\_weu](#module\_apim\_weu) | ../_modules/apim | n/a |

## Resources

| Name | Type |
|------|------|
| [azurerm_api_management.apim](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/api_management) | data source |
| [azurerm_api_management.apim_itn](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/api_management) | data source |
| [azurerm_key_vault.common](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault) | data source |

## Inputs

No inputs.

## Outputs

No outputs.
<!-- END_TF_DOCS -->
5 changes: 5 additions & 0 deletions infra/resources/prod/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ data "azurerm_api_management" "apim" {
resource_group_name = "${local.project_legacy}-rg-internal"
}

data "azurerm_api_management" "apim_itn" {
name = local.apim_itn.name
resource_group_name = local.apim_itn.resource_group_name
}

data "azurerm_key_vault" "common" {
name = "${local.project_legacy}-kv-common"
resource_group_name = "${local.project_legacy}-rg-common"
Expand Down
9 changes: 9 additions & 0 deletions infra/resources/prod/italynorth.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

module "apim_itn" {
source = "../_modules/apim"

apim_name = data.azurerm_api_management.apim_itn.name
apim_resource_group_name = data.azurerm_api_management.apim_itn.resource_group_name

key_vault_common_id = data.azurerm_key_vault.common.id
}
10 changes: 10 additions & 0 deletions infra/resources/prod/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,14 @@ locals {
ManagementTeam = "IO Platform"
Source = "https://github.com/pagopa/io-functions-admin/blob/main/infra/resources/prod"
}

# ITN
location_itn = "italynorth"
location_short_itn = "itn"
project_itn = "${local.prefix}-${local.env_short}-${local.location_short_itn}"

apim_itn = {
name = "${local.project_itn}-apim-01"
resource_group_name = "${local.project_itn}-common-rg-01"
}
}
Loading