-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputs.tf
108 lines (82 loc) · 3.33 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
output "instance_0" {
description = "A summary of created resources."
value = "Any output that ends with ${var.output_suffix} is not an added resource. It is simply a resource tag."
}
output "instance_id" {
description = "AWS-assigned ID for the EC2 instance."
value = aws_instance.web_server.id
}
output "instance_name" {
description = "Human-readable name for the EC2 instance."
value = "${aws_instance.web_server.tags["Name"]} ${var.output_suffix}"
}
output "instance_p_elastic_ip" {
description = "AWS-assigned ID Elastic IP address for the EC2 instance."
value = aws_eip.eip.public_ip
}
output "instance_p_elastic_ip__dns" {
description = "Human-readable DNS name for the allocated elastic IP."
value = "${aws_eip.eip.public_dns} ${var.output_suffix}"
}
output "instance_p_elastic_ip_allocation_id" {
description = "AWS-assigned ID for the Elastic IP-to-EC2 instance association."
value = aws_eip.eip.allocation_id
}
output "instance_p_elastic_ip_allocation_name" {
description = "Human-readable name for the allocated elastic IP."
value = "${aws_eip.eip.tags["Name"]} ${var.output_suffix}"
}
output "instance_security_group_id" {
description = "AWS-assigned ID for the security group."
value = aws_security_group.ghost_security_group.id
}
output "instance_security_group_id_name" {
description = "Human-readable name for the security group."
value = "${aws_security_group.ghost_security_group.name} ${var.output_suffix}"
}
output "instance_sg_rule1_id" {
description = "AWS-assigned ID for rule #1 in the security group."
value = aws_security_group_rule.ingress80.id
}
output "instance_sg_rule2_id" {
description = "AWS-assigned ID for rule #2 in the security group."
value = aws_security_group_rule.ingress443.id
}
output "instance_sg_rule3_id" {
description = "AWS-assigned ID for rule #3 in the security group."
value = aws_security_group_rule.ingress22.id
}
output "instance_sg_rule4_id" {
description = "AWS-assigned ID for rule #4 in the security group."
value = aws_security_group_rule.egressAny.id
}
output "instance_sg_rule1_name" {
description = "Human-readable name for rule #1 in the security group."
value = aws_ec2_tag.ghost_security_group_rule_tag1.value
}
output "instance_sg_rule2_name" {
description = "Human-readable name for rule #2 in the security group."
value = aws_ec2_tag.ghost_security_group_rule_tag2.value
}
output "instance_sg_rule3_name" {
description = "Human-readable name for rule #3 in the security group."
value = aws_ec2_tag.ghost_security_group_rule_tag3.value
}
output "instance_sg_rule4_name" {
description = "Human-readable name for rule #4 in the security group."
value = aws_ec2_tag.ghost_security_group_rule_tag4.value
}
output "instance_ghost_mysql_password" {
description = "Terraform-generated MySQL password for Ghost on the EC2 instance."
value = random_id.ghost_mysql_password.id
sensitive = true
}
output "instance_ghost_admin_password" {
description = "Terraform-generated password for the Ghost Admin on the EC2 instance."
value = random_id.ghost_admin_password.id
sensitive = true
}
# output "instance_public_ip" {
# description = "Public IP address of the EC2 instance."
# value = aws_instance.web_server.public_ip
# }