2020-08-26 21:00:36 +00:00
|
|
|
output "servers" {
|
|
|
|
value = aws_instance.server.*.public_ip
|
|
|
|
}
|
|
|
|
|
|
|
|
output "linux_clients" {
|
2020-10-28 16:58:00 +00:00
|
|
|
value = aws_instance.client_ubuntu_bionic_amd64.*.public_ip
|
2020-08-26 21:00:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
output "windows_clients" {
|
2020-10-28 16:58:00 +00:00
|
|
|
value = aws_instance.client_windows_2016_amd64.*.public_ip
|
2020-08-26 21:00:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
output "message" {
|
|
|
|
value = <<EOM
|
|
|
|
Your cluster has been provisioned! To prepare your environment, run:
|
|
|
|
|
|
|
|
$(terraform output environment)
|
|
|
|
|
|
|
|
Then you can run tests from the e2e directory with:
|
|
|
|
|
|
|
|
go test -v .
|
|
|
|
|
|
|
|
ssh into servers with:
|
|
|
|
|
2020-10-28 16:58:00 +00:00
|
|
|
%{for ip in aws_instance.server.*.public_ip~}
|
|
|
|
ssh -i keys/${local.random_name}.pem ubuntu@${ip}
|
|
|
|
%{endfor~}
|
2020-08-26 21:00:36 +00:00
|
|
|
|
|
|
|
ssh into clients with:
|
|
|
|
|
2020-10-28 16:58:00 +00:00
|
|
|
%{for ip in aws_instance.client_ubuntu_bionic_amd64.*.public_ip~}
|
2020-08-26 21:00:36 +00:00
|
|
|
ssh -i keys/${local.random_name}.pem ubuntu@${ip}
|
|
|
|
%{endfor~}
|
2020-10-28 16:58:00 +00:00
|
|
|
%{for ip in aws_instance.client_windows_2016_amd64.*.public_ip~}
|
|
|
|
ssh -i keys/${local.random_name}.pem Administrator@${ip}
|
|
|
|
%{endfor~}
|
2020-08-26 21:00:36 +00:00
|
|
|
|
|
|
|
EOM
|
|
|
|
}
|
|
|
|
|
|
|
|
output "environment" {
|
|
|
|
description = "get connection config by running: $(terraform output environment)"
|
2020-09-18 15:27:24 +00:00
|
|
|
value = <<EOM
|
2020-08-26 21:00:36 +00:00
|
|
|
export NOMAD_ADDR=http://${aws_instance.server[0].public_ip}:4646
|
|
|
|
export CONSUL_HTTP_ADDR=http://${aws_instance.server[0].public_ip}:8500
|
2020-10-05 13:28:37 +00:00
|
|
|
export VAULT_ADDR=http://${aws_instance.server[0].public_ip}:8200
|
2020-08-26 21:00:36 +00:00
|
|
|
export NOMAD_E2E=1
|
2020-09-28 13:22:36 +00:00
|
|
|
export NOMAD_TOKEN=${data.local_file.nomad_token.content}
|
2020-10-05 13:28:37 +00:00
|
|
|
export VAULT_TOKEN=${data.local_file.vault_token.content}
|
|
|
|
|
2020-08-26 21:00:36 +00:00
|
|
|
EOM
|
|
|
|
}
|