-
-
Notifications
You must be signed in to change notification settings - Fork 111
/
outputs.tf
79 lines (65 loc) · 1.84 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
output "instance_id" {
value = join("", aws_instance.default[*].id)
description = "Instance ID"
}
output "ssh_user" {
value = var.ssh_user
description = "SSH user"
}
output "security_group_ids" {
description = "IDs on the AWS Security Groups associated with the instance"
value = compact(
concat(
formatlist("%s", module.security_group.id),
var.security_groups
)
)
}
output "role" {
value = join("", aws_iam_role.default[*].name)
description = "Name of AWS IAM Role associated with the instance"
}
output "public_ip" {
value = concat(aws_eip.default[*].public_ip, aws_instance.default[*].public_ip, [""])[0]
description = "Public IP of the instance (or EIP)"
}
output "private_ip" {
value = join("", aws_instance.default[*].private_ip)
description = "Private IP of the instance"
}
output "private_dns" {
description = "Private DNS of instance"
value = join("", aws_instance.default[*].private_dns)
}
output "public_dns" {
description = "Public DNS of instance (or DNS of EIP)"
value = local.public_dns
}
output "hostname" {
value = module.dns.hostname
description = "DNS hostname"
}
output "id" {
description = "Disambiguated ID of the instance"
value = join("", aws_instance.default[*].id)
}
output "arn" {
description = "ARN of the instance"
value = join("", aws_instance.default[*].arn)
}
output "name" {
description = "Instance name"
value = module.this.id
}
output "security_group_id" {
value = module.security_group.id
description = "Bastion host Security Group ID"
}
output "security_group_arn" {
value = module.security_group.arn
description = "Bastion host Security Group ARN"
}
output "security_group_name" {
value = module.security_group.name
description = "Bastion host Security Group name"
}