File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11enable_gateway_test_vm = true
2+ screening_entra_group_id = " 14f915c3-ef0a-471b-b9bf-31187d18f8b6"
3+ enable_relay_sas_keys = true
Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ output "app_insights_connection_string" {
3737output "relay_listen_sas_keys" {
3838 description = " Per-machine relay listen SAS primary keys, keyed by Arc resource name. Populated only for the review environment."
3939 sensitive = true
40- value = var . enable_arc_servers && var . env_config == " review " ? {
40+ value = {
4141 for k , rule in azurerm_relay_hybrid_connection_authorization_rule . per_machine_listen :
4242 k = > rule.primary_key
43- } : {}
43+ }
4444}
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ resource "azurerm_relay_hybrid_connection_authorization_rule" "per_machine_liste
5151 for_each = {
5252 for machine_name , machine_config in local . arc_machines :
5353 machine_name = > machine_config
54- if var . env_config == " review "
54+ if var . enable_relay_sas_keys
5555 }
5656
5757 name = " listen"
Original file line number Diff line number Diff line change @@ -28,3 +28,8 @@ variable "static_arc_machine_names" {
2828 type = list (string )
2929 default = []
3030}
31+
32+ variable "enable_relay_sas_keys" {
33+ description = " Whether to create relay SAS keys for the Arc machines. Only used in the review environment."
34+ type = bool
35+ }
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ module "arc_infra" {
1111 env_config = var. env_config
1212 resource_group_name = local. resource_group_name
1313 enable_arc_servers = var. enable_arc_servers
14+ enable_relay_sas_keys = var. enable_relay_sas_keys
1415
1516 # Create the HC for the test VM in the same run as VM creation.
1617 # The Arc data source won't see a machine registered in the same apply.
Original file line number Diff line number Diff line change @@ -50,7 +50,13 @@ variable "gateway_test_vm_size" {
5050 default = " Standard_B2s"
5151}
5252
53+ variable "enable_relay_sas_keys" {
54+ description = " Whether to create relay SAS keys for the Arc machines"
55+ default = false
56+ type = bool
57+ }
58+
5359locals {
5460 region = " uksouth"
5561 resource_group_name = " rg-${ var . app_short_name } -${ var . environment } -uks"
56- }
62+ }
Original file line number Diff line number Diff line change @@ -100,7 +100,8 @@ LOG_LEVEL=INFO
100100SAMPLE_IMAGES_PATH=${BASE_PATH} /current/sample_images"
101101
102102 if [[ -n " ${RELAY_AUTH_BLOCK} " ]]; then
103- ENV_CONTENT=" ${ENV_CONTENT}${RELAY_AUTH_BLOCK} "
103+ ENV_CONTENT=" ${ENV_CONTENT}
104+ ${RELAY_AUTH_BLOCK} "
104105 fi
105106
106107 # Cross-platform base64 encoding (works on macOS and Linux)
You can’t perform that action at this time.
0 commit comments