providers/aws: style
This commit is contained in:
parent
e33739209b
commit
bdc2a53c9d
|
@ -122,10 +122,11 @@ func IGStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc {
|
||||||
return func() (interface{}, string, error) {
|
return func() (interface{}, string, error) {
|
||||||
resp, err := conn.DescribeInternetGateways([]string{id}, ec2.NewFilter())
|
resp, err := conn.DescribeInternetGateways([]string{id}, ec2.NewFilter())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if ec2err, ok := err.(*ec2.Error); ok && ec2err.Code == "InvalidInternetGatewayID.NotFound" {
|
ec2err, ok := err.(*ec2.Error)
|
||||||
|
if ok && ec2err.Code == "InvalidInternetGatewayID.NotFound" {
|
||||||
resp = nil
|
resp = nil
|
||||||
} else {
|
} else {
|
||||||
log.Printf("Error on IGStateRefresh: %s", err)
|
log.Printf("[ERROR] Error on IGStateRefresh: %s", err)
|
||||||
return nil, "", err
|
return nil, "", err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue