Skip to content

Commit

Permalink
Merge pull request #179 from yussufsh/release-4.5
Browse files Browse the repository at this point in the history
Use external VIP for bastion_ssh_command and add dns_entries output variable
  • Loading branch information
ltccci authored Dec 15, 2020
2 parents 6612bb1 + a5a27c6 commit 529dae7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ output "bastion_public_ip" {
}

output "bastion_ssh_command" {
value = join(", ", formatlist("ssh -i ${var.private_key_file} ${var.rhel_username}@%s", module.prepare.bastion_public_ip))
value = "ssh -i ${var.private_key_file} ${var.rhel_username}@${module.install.bastion_external_vip == "" ? module.prepare.bastion_public_ip[0] : module.install.bastion_external_vip}"
}

output "bootstrap_ip" {
Expand All @@ -54,6 +54,14 @@ output "worker_ips" {
value = module.nodes.worker_ips
}

output "dns_entries" {
value = var.cluster_domain == "nip.io" || var.cluster_domain == "xip.io" || var.cluster_domain == "sslip.io" ? "" : <<-EOF
api.${local.cluster_id}.${var.cluster_domain}. IN A ${module.install.bastion_external_vip == "" ? module.prepare.bastion_public_ip[0] : module.install.bastion_external_vip}
*.apps.${local.cluster_id}.${var.cluster_domain}. IN A ${module.install.bastion_external_vip == "" ? module.prepare.bastion_public_ip[0] : module.install.bastion_external_vip}
EOF
}

output "etc_hosts_entries" {
value = var.cluster_domain == "nip.io" || var.cluster_domain == "xip.io" || var.cluster_domain == "sslip.io" ? "" : <<-EOF
Expand Down

0 comments on commit 529dae7

Please sign in to comment.