Complete the code to declare an output named "instance_ip".
output "instance_ip" { value = [1] }
The output value should be the public IP of the instance to expose it.
Complete the code to declare an output named "bucket_name" that shows the S3 bucket's name.
output "bucket_name" { value = [1] }
The bucket attribute "bucket" holds the bucket's name, which is what we want to output.
Fix the error in the output declaration to correctly output the instance's ID.
output "instance_id" { value = aws_instance.example.[1] }
The correct attribute to get the instance ID is "id".
Fill both blanks to declare an output named "db_endpoint" that outputs the database endpoint address.
output "db_endpoint" { value = [1].[2] }
The resource is "aws_db_instance.mydb" and the attribute for the endpoint address is "address".
Fill all three blanks to declare an output named "web_url" that outputs the URL combining protocol and instance public IP.
output "web_url" { value = "http://" + [1].[2] + ":[3]" }
The output combines "http://" with the instance's public IP and port 80.