Skip to content

Commit 45d846b

Browse files
authored
test: fixed test bug on static gw name (#384)
1 parent 8a00638 commit 45d846b

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

examples/default/main.tf

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
### randomising the custom vpe names
2+
locals {
3+
vpe_names = {
4+
for k, v in var.vpe_names :
5+
k => "${var.prefix}-${v}"
6+
}
7+
}
8+
19
##############################################################################
210
# Resource Group
311
##############################################################################
@@ -93,7 +101,7 @@ module "vpes" {
93101
cloud_services = var.cloud_services
94102
cloud_service_by_crn = local.cloud_service_by_crn
95103
service_endpoints = var.service_endpoints
96-
vpe_names = var.vpe_names
104+
vpe_names = local.vpe_names
97105
# See comments below (resource "time_sleep" "sleep_time") for explaination on why this is needed.
98106
depends_on = [time_sleep.sleep_time]
99107
}

examples/default/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ variable "service_endpoints" {
9292
}
9393

9494
variable "vpe_names" {
95-
description = "A Map to specify custom names for endpoint gateways whose keys are services and values are names to use for that service's endpoint gateway."
95+
description = "A Map to specify custom names for endpoint gateways whose keys are services and values are names to use for that service's endpoint gateway. Each name will be prefixed with prefix value for isolated testing purposes."
9696
type = map(string)
9797
default = {}
9898
}

0 commit comments

Comments
 (0)