-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add nil checks for route table association state #22806
Add nil checks for route table association state #22806
Conversation
In aws-iso region the AssociationState isn't set in the Associations for route tables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome @blafrisch 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc PKG_NAME=internal/service/ec2 TESTARGS='-run=TestAccEC2RouteTableAssociation_\|TestAccEC2MainRouteTableAssociation_' ACCTEST_PARALLELISM=4
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 4 -run=TestAccEC2RouteTableAssociation_\|TestAccEC2MainRouteTableAssociation_ -timeout 180m
=== RUN TestAccEC2MainRouteTableAssociation_basic
=== PAUSE TestAccEC2MainRouteTableAssociation_basic
=== RUN TestAccEC2RouteTableAssociation_Subnet_basic
=== PAUSE TestAccEC2RouteTableAssociation_Subnet_basic
=== RUN TestAccEC2RouteTableAssociation_Subnet_changeRouteTable
=== PAUSE TestAccEC2RouteTableAssociation_Subnet_changeRouteTable
=== RUN TestAccEC2RouteTableAssociation_Gateway_basic
=== PAUSE TestAccEC2RouteTableAssociation_Gateway_basic
=== RUN TestAccEC2RouteTableAssociation_Gateway_changeRouteTable
=== PAUSE TestAccEC2RouteTableAssociation_Gateway_changeRouteTable
=== RUN TestAccEC2RouteTableAssociation_disappears
=== PAUSE TestAccEC2RouteTableAssociation_disappears
=== CONT TestAccEC2MainRouteTableAssociation_basic
=== CONT TestAccEC2RouteTableAssociation_Subnet_changeRouteTable
=== CONT TestAccEC2RouteTableAssociation_Gateway_basic
=== CONT TestAccEC2RouteTableAssociation_disappears
--- PASS: TestAccEC2RouteTableAssociation_disappears (35.52s)
=== CONT TestAccEC2RouteTableAssociation_Gateway_changeRouteTable
--- PASS: TestAccEC2RouteTableAssociation_Gateway_basic (43.95s)
=== CONT TestAccEC2RouteTableAssociation_Subnet_basic
--- PASS: TestAccEC2RouteTableAssociation_Subnet_changeRouteTable (63.39s)
--- PASS: TestAccEC2MainRouteTableAssociation_basic (63.73s)
--- PASS: TestAccEC2RouteTableAssociation_Subnet_basic (36.79s)
--- PASS: TestAccEC2RouteTableAssociation_Gateway_changeRouteTable (66.05s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 108.221s
@blafrisch Thanks for the contribution 🎉 👏. |
This functionality has been released in v4.0.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
In aws-iso region the AssociationState isn't set in the Associations for route tables. This caused a nil pointer dereference and an RPC error when refreshing state on an
aws_route_table_association
resource.For reference the output from the AWS CLI command
aws ec2 describe-route-tables
looks like this in AWS us-west-2:And looks like this in an AWS ISO region:
Community Note
Output from acceptance testing (chosen because of this PR #21710):
This is my first PR for this project, let me know if there's anything else I should add/update/change. Thank you!
cc: @YakDriver @ewbankkit because of other recent ISO region related changes and context.