-
Notifications
You must be signed in to change notification settings - Fork 0
/
outputs.tf
49 lines (40 loc) · 1.58 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
output "relay_auth_key" {
value = "${tailscale_tailnet_key.relay_auth.id} | expires: ${jsondecode(data.http.relay_auth_key_response.response_body).expires}"
description = "tailscale relay auth key"
}
output "forwarded_routes" {
value = join(", ", local.tailscale_routes)
description = "forwarded routes"
}
output "forwarded_nameservers" {
value = join(", ", local.tailscale_nameservers)
description = "forwarded nameservers"
}
output "vpc_detail" {
value = "${var.vpc_id}%{for k, v in data.aws_vpc.selected.tags}%{if k == "Name"} | ${v}%{endif}%{endfor}"
description = "selected vpc"
}
output "subnet_detail" {
value = "${var.subnet_id}%{for k, v in data.aws_subnet.selected.tags}%{if k == "Name"} | ${v}%{endif}%{endfor} | ${data.aws_subnet.selected.cidr_block}"
description = "selected subnet"
}
output "security_group_detail" {
value = "${aws_security_group.tailscale.id} | ${aws_security_group.tailscale.name}"
description = "security group"
}
output "ami_detail" {
value = "${data.aws_ami.selected.id} | ${data.aws_ami.selected.name}"
description = "selected ami"
}
output "ec2_detail" {
value = "${aws_instance.tailscale.id} | ${var.relay_instance_type}"
description = "tailscale relay id"
}
output "ec2_ip" {
value = "${aws_instance.tailscale.private_ip}%{if aws_instance.tailscale.public_ip != ""}, ${aws_instance.tailscale.public_ip}%{endif}"
description = "tailscale relay ip"
}
output "ec2_ssh" {
value = var.relay_key_name == null ? "" : var.relay_key_name
description = "tailscale relay ssh"
}