Skip to content

Commit

Permalink
add role
Browse files Browse the repository at this point in the history
  • Loading branch information
Krusty93 committed Jan 27, 2025
1 parent e4d89ae commit 3517f5d
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 16 deletions.
9 changes: 8 additions & 1 deletion src/common/_modules/apim/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,11 @@ data "azurerm_private_dns_zone" "scm_azure_api_net" {

name = "scm.azure-api.net"
resource_group_name = "io-p-rg-common"
}
}

data "azurerm_linux_web_app" "cgn_pe_backend_app_01" {
provider = azurerm.prod-cgn

name = "io-p-itn-cgn-pe-backend-app-01"
resource_group_name = "io-p-itn-cgn-pe-rg-01"
}
6 changes: 6 additions & 0 deletions src/common/_modules/apim/provider.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
provider "azurerm" {
alias = "prod-cgn"
subscription_id = "74da48a3-b0e7-489d-8172-da79801086ed"

features {}
}
14 changes: 14 additions & 0 deletions src/common/_modules/apim/rbac.tf
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,17 @@ module "iam_adgroup_bonus_admins" {
}
]
}

module "iam_cgn_pe_backend_app_01" {
source = "github.com/pagopa/dx//infra/modules/azure_role_assignments?ref=main"

principal_id = data.azurerm_linux_web_app.cgn_pe_backend_app_01.identity[0].principal_id

apim = [
{
name = module.apim_v2.name
resource_group_name = module.apim_v2.resource_group_name
role = "owner"
}
]
}
7 changes: 0 additions & 7 deletions src/common/_modules/private_endpoint/data.tf

This file was deleted.

7 changes: 0 additions & 7 deletions src/common/_modules/private_endpoint/locals.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
locals {
private_endpoints = {
"cgn-psql" = {
"01" = {
resource_id = data.azurerm_postgresql_server.cgn_psql.id
subresource_names = ["postgresqlServer"]
private_dns_zone_id = var.dns_zones.postgres.id
}
}
"selc-evhns" = {
"01" = {
resource_id = "/subscriptions/813119d7-0943-46ed-8ebe-cebe24f9106c/resourceGroups/selc-p-event-rg/providers/Microsoft.EventHub/namespaces/selc-p-eventhub-ns"
Expand Down
1 change: 0 additions & 1 deletion src/common/prod/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,3 @@ data "azurerm_subnet" "itn_msgs_sending_func_snet" {
resource_group_name = local.core.networking.itn.vnet_common.resource_group_name
virtual_network_name = local.core.networking.itn.vnet_common.name
}

0 comments on commit 3517f5d

Please sign in to comment.