Error
output "instance_public_ip" {
value = aws_instance.web.public_ip
value = aws_instance.web.private_ip
}
C:\Users\Rajesh Kumar\Desktop\Terarform\proj1>terraform validate
╷
│ Error: Attribute redefined
│
│ on aws.tf line 13, in output "instance_public_ip":
│ 13: value = aws_instance.web.private_ip
│
│ The argument "value" was already set at aws.tf:12,3-8. Each argument may be set only once.
╵
Solution
output "instance_public_ip" {
value = aws_instance.web.public_ip
value = aws_instance.web.private_ip
}
INTO
output "instance_public_ip" {
value = aws_instance.web.public_ip
}
output "instance_public_ip" {
value = aws_instance.web.private_ip
}
Latest posts by rajeshkumar (see all)
- Sonarqube: java.lang.IllegalStateException: Error status returned by url 401 - September 9, 2024
- SonarQube Error: Error status returned by url [https://api.sonarcloud.io - September 5, 2024
- AWS SES Errors and Solution - September 2, 2024