feat(terraform): Add outputs configuration
This commit is contained in:
49
terraform/aws-infrastructure/outputs.tf
Normal file
49
terraform/aws-infrastructure/outputs.tf
Normal file
@@ -0,0 +1,49 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user