50 lines
1.1 KiB
HCL
50 lines
1.1 KiB
HCL
# Terraform Outputs
|
|
# Use: terraform output to view all outputs
|
|
|
|
output "vpc_id" {
|
|
description = "VPC ID"
|
|
value = module.vpc.vpc_id
|
|
}
|
|
|
|
output "alb_dns_name" {
|
|
description = "Application Load Balancer DNS"
|
|
value = module.alb.dns_name
|
|
}
|
|
|
|
output "rds_endpoint" {
|
|
description = "RDS endpoint"
|
|
value = module.rds.endpoint
|
|
sensitive = true
|
|
}
|
|
|
|
output "s3_bucket_names" {
|
|
description = "S3 bucket names"
|
|
value = module.s3.bucket_names
|
|
}
|
|
|
|
output "asg_name" {
|
|
description = "Auto Scaling Group name"
|
|
value = module.asg.name
|
|
}
|
|
|
|
output "application_url" {
|
|
description = "Application URL"
|
|
value = "http://${module.alb.dns_name}"
|
|
}
|
|
|
|
output "infrastructure_summary" {
|
|
description = "Infrastructure summary"
|
|
value = {
|
|
environment = var.environment
|
|
region = var.aws_region
|
|
vpc_id = module.vpc.vpc_id
|
|
alb_dns = module.alb.dns_name
|
|
rds_endpoint = module.rds.endpoint
|
|
asg_name = module.asg.name
|
|
}
|
|
}
|
|
|
|
# View all outputs: terraform output
|
|
# View specific: terraform output alb_dns_name
|
|
# JSON format: terraform output -json
|