forked from cloudposse/terraform-aws-ec2-instance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputs.tf
64 lines (52 loc) · 1.98 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
output "public_ip" {
description = "Public IP of instance (or EIP)"
value = "${coalesce(join("", aws_eip.default.*.public_ip), join("", aws_instance.default.*.public_ip))}"
}
output "private_ip" {
description = "Private IP of instance"
value = "${join("", aws_instance.default.*.private_ip)}"
}
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 "id" {
description = "Disambiguated ID of the instance"
value = "${join("", aws_instance.default.*.id)}"
}
output "ssh_key_pair" {
description = "Name of the SSH key pair provisioned on the instance"
value = "${var.ssh_key_pair}"
}
output "security_group_ids" {
description = "IDs on the AWS Security Groups associated with the instance"
value = "${compact(concat(list(var.create_default_security_group == "true" ? join("", aws_security_group.default.*.id) : ""), var.security_groups))}"
}
output "role" {
description = "Name of AWS IAM Role associated with the instance"
value = "${join("", aws_iam_role.default.*.name)}"
}
output "alarm" {
description = "CloudWatch Alarm ID"
value = "${join("", aws_cloudwatch_metric_alarm.default.*.id)}"
}
output "additional_eni_ids" {
description = "Map of ENI to EIP"
value = "${zipmap(aws_network_interface.additional.*.id, aws_eip.additional.*.public_ip)}"
}
output "ebs_ids" {
description = "IDs of EBSs"
value = "${aws_ebs_volume.default.*.id}"
}
output "primary_network_interface_id" {
description = "ID of the instance's primary network interface"
value = "${join("", aws_instance.default.*.primary_network_interface_id)}"
}
output "network_interface_id" {
description = "ID of the network interface that was created with the instance"
value = "${join("", aws_instance.default.*.network_interface_id)}"
}