Skip to content

Commit 28dd093

Browse files
wip
1 parent 4ad7edc commit 28dd093

16 files changed

Lines changed: 94 additions & 34 deletions

File tree

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ include scripts/terraform/terraform.mk
44
.DEFAULT_GOAL := help
55

66
.PHONY: clean config dependencies githooks-config githooks-run help test test-lint test-unit _install-uv \
7-
up down restart logs build rebuild run-pacs run-mwl run-listener run-upload ps shell docker-clean
7+
up down restart logs build rebuild run-pacs run-mwl run-listener run-upload ps shell docker-clean \
8+
review dev preprod prod
89
.SILENT: help
910

1011
# ---------------------------------------------------------------------------
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ENV_CONFIG=dev
2+
ENVIRONMENT=dev
3+
AZURE_SUBSCRIPTION="Breast Screening - Manage Breast Screening - Dev"
4+
HUB_SUBSCRIPTION="Digital Screening DToS - DevOps"
5+
HUB=dev
6+
TERRAFORM_MODULES_REF=main
7+
ENABLE_SOFT_DELETE=false
8+
ADO_MANAGEMENT_POOL=private-pool-dev-uks
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
vnet_address_space = "10.130.0.0/16"
2+
enable_gateway_test_vm = true
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ENV_CONFIG=preprod
2+
ENVIRONMENT=preprod
3+
AZURE_SUBSCRIPTION="Breast Screening - Manage Breast Screening - PreProd"
4+
HUB_SUBSCRIPTION="Digital Screening DToS - Core Services Prod Hub"
5+
HUB=preprod
6+
TERRAFORM_MODULES_REF=main
7+
ENABLE_SOFT_DELETE=true
8+
ADO_MANAGEMENT_POOL=private-pool-prod-uks
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# All values use defaults: enable_gateway_test_vm = false, enable_arc_servers = true
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ENV_CONFIG=prod
2+
ENVIRONMENT=prod
3+
AZURE_SUBSCRIPTION="Breast Screening - Manage Breast Screening - Prod"
4+
HUB_SUBSCRIPTION="Digital Screening DToS - Core Services Prod Hub"
5+
HUB=prod
6+
TERRAFORM_MODULES_REF=main
7+
ENABLE_SOFT_DELETE=true
8+
ADO_MANAGEMENT_POOL=private-pool-prod-uks
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# All values use defaults: enable_gateway_test_vm = false, enable_arc_servers = true
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
vnet_address_space = "10.131.0.0/16"
2-
enable_arc_servers = true
3-
bastion_sku = "Standard"
1+
vnet_address_space = "10.131.0.0/16"
2+
enable_gateway_test_vm = true
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
module "bastion" {
2+
count = var.enable_gateway_test_vm ? 1 : 0
23
source = "../dtos-devops-templates/infrastructure/modules/bastion"
34

45
name = "bas-${var.app_short_name}-${var.env_config}-uks"
56
public_ip_name = "pip-bastion-${var.app_short_name}-${var.env_config}-uks"
6-
resource_group_name = azurerm_resource_group.main.name
7+
resource_group_name = azurerm_resource_group.main[0].name
78
location = var.region
89
sku = var.bastion_sku
9-
subnet_id = module.subnet_bastion.id
10+
subnet_id = module.subnet_bastion[0].id
1011

11-
log_analytics_workspace_id = module.log_analytics_workspace.id
12+
log_analytics_workspace_id = module.log_analytics_workspace[0].id
1213
monitor_diagnostic_setting_bastion_enabled_logs = ["BastionAuditLogs"]
1314
monitor_diagnostic_setting_bastion_metrics = ["AllMetrics"]
1415
}

infrastructure/modules/arc-infra/main.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
# Main resource group for the Arc infrastructure foundation
22
resource "azurerm_resource_group" "main" {
3+
count = var.enable_gateway_test_vm ? 1 : 0
4+
35
name = var.resource_group_name
46
location = var.region
57
}
68

79
# Log Analytics workspace for monitoring Arc-enabled servers
810
module "log_analytics_workspace" {
11+
count = var.enable_gateway_test_vm ? 1 : 0
912
source = "../dtos-devops-templates/infrastructure/modules/log-analytics-workspace"
1013

1114
name = "log-${var.app_short_name}-${var.env_config}-uks"
1215
location = var.region
13-
resource_group_name = azurerm_resource_group.main.name
16+
resource_group_name = azurerm_resource_group.main[0].name
1417
law_sku = "PerGB2018"
1518
retention_days = 30
1619

0 commit comments

Comments
 (0)