Complete the code to get all instance IDs from the aws_instance resource.
output "instance_ids" { value = aws_instance.example[1].id }
The splat expression aws_instance.example[*].id collects the id attribute from all instances in the resource list.
Complete the code to get all private IP addresses from multiple aws_instance resources.
output "private_ips" { value = aws_instance.web[1].private_ip }
The splat expression aws_instance.web[*].private_ip returns a list of private IPs from all instances named 'web'.
Fix the error in the splat expression to correctly get all subnet IDs.
output "subnet_ids" { value = aws_subnet.example[1].id }
The correct splat expression uses [*] to get all IDs from the aws_subnet resource list.
Fill both blanks to create a list of all security group names from aws_security_group resources.
output "sg_names" { value = aws_security_group.[1][2].name }
Use the resource name web and the splat operator [*] to get all security group names.
Fill all three blanks to output a list of all tags 'Name' values from aws_instance resources.
output "instance_names" { value = aws_instance.[1][2].tags[3] }
Use the resource name app, the splat operator [*], and access the tag ["Name"] to get all instance names.