-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputs.tf
30 lines (25 loc) · 852 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
# Output the ID of the VPC
output "vpc_id" {
description = "The ID of the VPC"
value = aws_vpc.kode_vpc.id
}
# Output the ID of the EC2 instances
output "instance_ids" {
description = "The IDs of the EC2 instances"
value = aws_instance.kode_web[*].id
}
# Output the DNS name of the Application Load Balancer
output "alb_dns_name" {
description = "The DNS name of the Application Load Balancer"
value = aws_lb.kode_alb.dns_name
}
# Output the public IP addresses of the EC2 instances
output "instance_public_ips" {
description = "The public IP addresses of the EC2 instances"
value = [for instance in aws_instance.kode_web : instance.public_ip]
}
# Output the ARN of the Target Group
output "target_group_arn" {
description = "The ARN of the Target Group"
value = aws_lb_target_group.kode_tg.arn
}