-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildtests.tf
30 lines (24 loc) · 932 Bytes
/
buildtests.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Set the return values from Terraform to be used for test scripts
locals {
variables = <<-EOT
#!/bin/zsh
##
## variables for the ZSH shell scripts
##
REMOTE_USER="${module.vnet-hub.vm_username}"
PRIVATE_KEY_FILE="private_key.pem"
HUB_VM="${module.vnet-hub.vm_public_ip_address}"
SPOKE_VM="${module.vnet-spoke-application.vm_public_ip_address}"
ONPREMISE_VM="${module.vnet-spoke-onpremise.vm_public_ip_address}"
# Used by nslookup lookup for testing
L0="junk.bep.hhs.gov"
L1="${module.vnet-hub.vm_computer_name}.bep.hhs.gov"
L2="${module.vnet-spoke-application.vm_computer_name}.bep.hhs.gov"
L3="${module.vnet-spoke-onpremise.vm_computer_name}.onpremise.hhs.gov"
L4="${module.vnet-spoke-application.private_endpoint_table_fqdn}"
EOT
}
resource "local_file" "output_variables" {
content = local.variables
filename = "${path.module}/scripts/variables.zsh"
}