-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathoutputs.tf
38 lines (32 loc) · 971 Bytes
/
outputs.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
31
32
33
34
35
36
37
38
output "external_ip" {
value = local.external_ip
}
output "outgoing_ip" {
value = openstack_networking_router_v2.router.external_fixed_ip[0].ip_address
}
output "network_id" {
value = openstack_networking_network_v2.net.id
}
output "lb_subnet_id" {
value = openstack_networking_subnet_v2.lb.id
}
output "restore_cmd" {
value = "sudo rke2 server --cluster-reset --etcd-s3 --etcd-s3-bucket=${local.s3.bucket} --etcd-s3-access-key=${local.s3.access_key} --etcd-s3-secret-key=${local.s3.access_secret} --cluster-reset-restore-path=[filename]"
sensitive = true
}
output "ssh_cmd" {
value = "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=accept-new -o ForwardAgent=yes ubuntu@${local.external_ip}"
sensitive = true
}
output "ssh_config" {
value = <<EOF
Host ${var.name}
HostName ${local.external_ip}
Port 22
User ubuntu
ForwardAgent yes
UserKnownHostsFile /dev/null
StrictHostKeyChecking accept-new
EOF
sensitive = true
}