Complete the code to output the module's instance ID.
output "instance_id" { value = module.web_server.[1] }
The module's output value is accessed by its name. Here, the correct output attribute is id.
Complete the code to define an output that shows the module's public IP.
output "public_ip" { value = module.network.[1] }
The module must have an output named public_ip to expose the public IP address.
Fix the error in the output block to correctly reference the module's subnet ID.
output "subnet_id" { value = module.vpc.[1] }
Terraform output names are case-sensitive and usually use snake_case. The correct attribute is subnet_id.
Fill both blanks to output the module's database endpoint and port.
output "db_connection" { value = "${module.database.[1]:${module.database.[2]" }
The database endpoint is usually named endpoint and the port is port in module outputs.
Fill all three blanks to output a formatted string with module's name, instance ID, and availability zone.
output "instance_info" { value = "Name: ${module.app.[1], ID: ${module.app.[2], AZ: ${module.app.[3]" }
The module outputs the instance name as name, the instance ID as id, and the availability zone as availability_zone.