terraform/builtin
Emil Hessman c738bf0477 builtin/providers/aws: remove unreachable code and skip unnecessary remote call
When DeleteInternetGateway is successful it returns a nil error value.
However, for a nil error value, the RetryFunc returns an error yielding a
unnecessary second call to DeleteInternetGateway in the retry logic.

The logic works because DeleteInternetGateway eventually returns an ec2.Error
with error code InvalidInternetGatewayID.NotFound since the internet gateway
has been deleted in the previous call. The return value of nil breaks the
retry logic and the deletion is deemed successful.

Fix the unnecessary second call to DeleteInternetGateway by short circuiting
with a nil error value when deletion of the internet gateway is successful on
the first try.

Add an acceptance test for internet gateway deletion and remove unreachable
code while here.
2015-01-03 21:56:44 +01:00
..
bins Merge pull request #645 from svanharmelen/f-cloudstack-provider 2014-12-10 22:33:09 +01:00
providers builtin/providers/aws: remove unreachable code and skip unnecessary remote call 2015-01-03 21:56:44 +01:00
provisioners Fix failing tests 2014-10-09 21:29:21 -07:00