Closed darren-reddick closed 2 years ago
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Community Note
Terraform CLI and Terraform AWS Provider Version
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
Panic Output
Expected Behavior
Terraform should have produced a permissions error when tagging the load-balancer
Actual Behavior
Terraform apply fails after creating the load-balancer to create the listener with error:
No listener is created
Steps to Reproduce
terraform apply
Important Factoids
This issue was noticed when we tried to create the load-balancer with a role that was missing the
elasticloadbalancing:AddTags
permissions. We fixed the permissions and the problem was resolved but the original error message threw us. Looking at the source for the load balancer resource shows that there is a conditional block based on a tagging error. This results in an erroneous call to theresourceListenerRead
function using the load balancer ARN: https://github.com/hashicorp/terraform-provider-aws/blob/f45acbb107421e24a6778bd6d2867258cce7a85e/internal/service/elbv2/load_balancer.go#L617I can raise a PR for this to call the correct function:
resourceLoadBalancerRead
There is also a question if the
CheckISOErrorTagsUnsupported
function should be returningtrue
for genuine unauthorized errors?References