From fd5d36ab57d25f93c5b09d986d46e5f1127e9afa Mon Sep 17 00:00:00 2001 From: Manuel Rafeli Date: Wed, 20 Nov 2024 10:31:17 +0100 Subject: [PATCH] [SELC-5509] ops: Set private ip address to Namirial SWS Container (#609) --- .../namirial-sign/container_group.tf | 22 +++++-------------- infra/container_apps/namirial-sign/data.tf | 5 +++++ .../namirial-sign/env/prod/terraform.tfvars | 2 +- infra/container_apps/namirial-sign/subnet.tf | 16 ++++++++++++++ .../container_apps/namirial-sign/variables.tf | 6 +++++ .../env/dev/terraform.tfvars | 2 +- .../env/prod/terraform.tfvars | 2 +- .../env/uat/terraform.tfvars | 2 +- 8 files changed, 37 insertions(+), 20 deletions(-) create mode 100644 infra/container_apps/namirial-sign/subnet.tf diff --git a/infra/container_apps/namirial-sign/container_group.tf b/infra/container_apps/namirial-sign/container_group.tf index e924534b6..7cd2bab24 100644 --- a/infra/container_apps/namirial-sign/container_group.tf +++ b/infra/container_apps/namirial-sign/container_group.tf @@ -1,12 +1,16 @@ + +# when create a new one container, you should put ./custom.properties file inside selcdnamirialswsst/selc-d-namirial-sws-share +# pay attention to set this file only when you want to reset Namirial config properties + resource "azurerm_container_group" "namirial_sws_cg" { count = var.enable_sws ? 1 : 0 name = "${local.project}-namirial-sws-cg" location = data.azurerm_resource_group.rg_contracts_storage.location resource_group_name = data.azurerm_resource_group.rg_contracts_storage.name - ip_address_type = "Public" - dns_name_label = "${local.project}-namirial-sws-cg" + ip_address_type = "Private" os_type = "Linux" + subnet_ids = [azurerm_subnet.namirial_sws_snet.id] image_registry_credential { server = "index.docker.io" @@ -66,19 +70,5 @@ resource "azurerm_container_group" "namirial_sws_cg" { } } - provisioner "local-exec" { - command = <