-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathoutputs.tf
30 lines (25 loc) · 988 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
// This will output the public IP of the web server
output "web_public_ip" {
description = "The public IP address of the web server"
// We are grabbing it from the Elastic IP
value = aws_eip.tutorial_web_eip[0].public_ip
// This output waits for the Elastic IPs to be created and distributed
depends_on = [aws_eip.tutorial_web_eip]
}
// This will output the the public DNS address of the web server
output "web_public_dns" {
description = "The public DNS address of the web server"
// We are grabbing it from the Elastic IP
value = aws_eip.tutorial_web_eip[0].public_dns
depends_on = [aws_eip.tutorial_web_eip]
}
// This will output the database endpoint
output "database_endpoint" {
description = "The endpoint of the database"
value = aws_db_instance.tutorial_database.address
}
// This will output the database port
output "database_port" {
description = "The port of the database"
value = aws_db_instance.tutorial_database.port
}