github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/e2e/terraform/outputs.tf (about) 1 output "servers" { 2 value = aws_instance.server.*.public_ip 3 } 4 5 output "linux_clients" { 6 value = aws_instance.client_ubuntu_jammy_amd64.*.public_ip 7 } 8 9 output "windows_clients" { 10 value = aws_instance.client_windows_2016_amd64.*.public_ip 11 } 12 13 output "message" { 14 value = <<EOM 15 Your cluster has been provisioned! To prepare your environment, run: 16 17 $(terraform output --raw environment) 18 19 Then you can run tests from the e2e directory with: 20 21 go test -v . 22 23 ssh into servers with: 24 25 %{for ip in aws_instance.server.*.public_ip~} 26 ssh -i keys/${local.random_name}.pem ubuntu@${ip} 27 %{endfor~} 28 29 ssh into clients with: 30 31 %{for ip in aws_instance.client_ubuntu_jammy_amd64.*.public_ip~} 32 ssh -i keys/${local.random_name}.pem ubuntu@${ip} 33 %{endfor~} 34 %{for ip in aws_instance.client_windows_2016_amd64.*.public_ip~} 35 ssh -i keys/${local.random_name}.pem Administrator@${ip} 36 %{endfor~} 37 38 EOM 39 } 40 41 # Note: Consul and Vault environment needs to be set in test 42 # environment before the Terraform run, so we don't have that output 43 # here 44 output "environment" { 45 description = "get connection config by running: $(terraform output environment)" 46 sensitive = true 47 value = <<EOM 48 export NOMAD_ADDR=https://${aws_instance.server[0].public_ip}:4646 49 export NOMAD_CACERT=${abspath(path.root)}/keys/tls_ca.crt 50 export NOMAD_CLIENT_CERT=${abspath(path.root)}/keys/tls_api_client.crt 51 export NOMAD_CLIENT_KEY=${abspath(path.root)}/keys/tls_api_client.key 52 export NOMAD_TOKEN=${data.local_file.nomad_token.content} 53 export NOMAD_E2E=1 54 55 EOM 56 }