[Bug]: aws_vpc_security_group_ingress_rule doesn't match the API Schema #29893
Labels
bug
Addresses a defect in current functionality.
service/vpc
Issues and PRs that pertain to the vpc service.
Terraform Core Version
1.4.0
AWS Provider Version
4.57.1
Affected Resource(s)
Expected Behavior
Trying this resource out for the first time, I was surprised by some of my IDE's ideas on what the required and optional fields were. For example, if I try to create an
aws_vpc_security_group_ingress_rule
with no attributes, the only thing I get told I must specify is theip_protocol
.Being an inquisitive sort of chap, I wondered what SG that might actually apply the rule to if I blindly applied its suggestion:
Although that doesn't appear to match the API (and I'm completely unfamiliar at the moment with theNever mind,Framework
approach that this resource uses, so I don't know how it's magically worked out that those attributes are now required), at initial glance it would seem to make sense, so let's plough on!resourcevalidator
looks cool!Oh dear 😄 Now that error is something that AuthorizeSecurityGroupIngress does actually stipulate. As we don't have
security_group_name
in our schema, it would make sense to marksecurity_group_id
asRequired: true
.I'm raising this rather than just a trivial PR because I'm hoping to have more time to dig in and see if there are further issues.
Actual Behavior
Terraform failed to create the SG rule
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
terraform apply
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
Yes
The text was updated successfully, but these errors were encountered: