Skip to content
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

provider/aws: Fix panic on nil route configs #13548

Merged
merged 2 commits into from
Apr 12, 2017
Merged

Conversation

grubernaut
Copy link
Contributor

When creating an aws_route_table, if a route configuration block is left nil, Terraform would previously panic. This allows Terraform to catch a faulty interface conversion during the resource create. The resource will still fail to apply, however, since every item in the route element is Optional we cannot currently catch this error during plan time, via validation.

Fixes: #13545

When creating an `aws_route_table`, if a `route` configuration block is left `nil`, Terraform would previously panic. This allows Terraform to catch a faulty interface conversion during the resource create. The resource will still fail to apply, however, since every item in the `route` element is `Optional` we cannot currently catch this error during plan time, via validation.

Fixes: #13545
@@ -497,3 +513,16 @@ resource "aws_route_table" "foo" {
propagating_vgws = ["${aws_vpn_gateway.foo.id}"]
}
`

const testAccRouteTableConfigPanic = `
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this change fixes the panic, probably worth having a note either here or on the test above to explain that this was added to cover for an earlier bug, or else the name is somewhat confusing.

point to github issue
@grubernaut grubernaut merged commit c5a87af into master Apr 12, 2017
@grubernaut grubernaut deleted the b-fix-route-table-panic branch April 12, 2017 13:25
@ghost
Copy link

ghost commented Apr 14, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attempting to create an aws_route_table with blank route blocks results in a crash
3 participants