Error
│ Error: Duplicate output definition
│
│ on aws.tf line 14:
│ 14: output "instance_public_ip" {
│
│ An output named "instance_public_ip" was already defined at aws.tf:10,1-28. Output names must be unique within a
│ module.
output "instance_public_ip" {
value = aws_instance.web.public_ip
}
output "instance_public_ip" {
value = aws_instance.web.security_groups[0]
}
Solution
to
output "instance_public_ip" {
value = aws_instance.web.public_ip
}
output "instance_public_sg" {
value = aws_instance.web.security_groups[0]
}
Latest posts by rajeshkumar (see all)
- The Changing Shape of Technology: From Tools to Thinking Partners - March 9, 2026
- Omnisend vs. Klaviyo: Which Is Best for Agencies - February 19, 2026
- The Cloud Resilience Standard: Synchronizing AWS Migration with Continuous Vulnerability Management - January 21, 2026