Created
November 3, 2017 16:16
-
-
Save andywirv/d61ebaaef0aa99d1370899d6138616be to your computer and use it in GitHub Desktop.
Multi-line Output for Terraform
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
output "SSH Config" { | |
value = <<SSHCONFIG | |
### START Auto-gen SSH Config for ${random_pet.cluster_id.id} ### | |
Host ${random_pet.cluster_id.id}-bastion | |
User core | |
Hostname ${aws_instance.bastion.public_ip} | |
IdentityFile ~/.ssh/${random_pet.cluster_id.id}.key | |
Host ${random_pet.cluster_id.id}-agent | |
User core | |
Hostname ${aws_instance.mesos_private_agent.0.private_ip} | |
ProxyCommand ssh ${random_pet.cluster_id.id}-bastion -W %h:%p 2> /dev/null | |
IdentityFile ~/.ssh/${random_pet.cluster_id.id}.key | |
Host ${random_pet.cluster_id.id}-master | |
User core | |
Hostname ${aws_instance.mesos_master.0.private_ip} | |
ProxyCommand ssh ${random_pet.cluster_id.id}-bastion -W %h:%p 2> /dev/null | |
IdentityFile ~/.ssh/${random_pet.cluster_id.id}.key | |
### END Auto-gen SSH Config for ${random_pet.cluster_id.id} ### | |
SSHCONFIG | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for sharing 💪🏻