This commit is contained in:
Clint Shryock 2015-03-11 15:18:42 -05:00
parent bd591877fe
commit 8a5eadedd1
1 changed files with 0 additions and 6 deletions

View File

@ -184,7 +184,6 @@ func TestAccAWSNetworkAcl_SubnetChange(t *testing.T) {
} }
func testAccCheckAWSNetworkAclDestroy(s *terraform.State) error { func testAccCheckAWSNetworkAclDestroy(s *terraform.State) error {
// log.Printf("\n@@@\nEnter Destroy func\n@@@\n")
conn := testAccProvider.Meta().(*AWSClient).awsEC2conn conn := testAccProvider.Meta().(*AWSClient).awsEC2conn
for _, rs := range s.RootModule().Resources { for _, rs := range s.RootModule().Resources {
@ -198,26 +197,21 @@ func testAccCheckAWSNetworkAclDestroy(s *terraform.State) error {
}) })
if err == nil { if err == nil {
if len(resp.NetworkACLs) > 0 && *resp.NetworkACLs[0].NetworkACLID == rs.Primary.ID { if len(resp.NetworkACLs) > 0 && *resp.NetworkACLs[0].NetworkACLID == rs.Primary.ID {
// log.Printf("\n@@@\nDestroy func err: still exists\n@@@\n")
return fmt.Errorf("Network Acl (%s) still exists.", rs.Primary.ID) return fmt.Errorf("Network Acl (%s) still exists.", rs.Primary.ID)
} }
// log.Printf("\n@@@\nDestroy func err: found something, but returning nil\n@@@\n")
return nil return nil
} }
ec2err, ok := err.(aws.APIError) ec2err, ok := err.(aws.APIError)
if !ok { if !ok {
// log.Printf("\n@@@\nDestroy func err: aws err:%#v\n@@@\n", err)
return err return err
} }
// Confirm error code is what we want // Confirm error code is what we want
if ec2err.Code != "InvalidNetworkAclID.NotFound" { if ec2err.Code != "InvalidNetworkAclID.NotFound" {
// log.Printf("\n@@@\nDestroy func err: not found aws err:%#v\n@@@\n", err)
return err return err
} }
} }
// log.Printf("\n@@@\nDestroy func err: end return\n@@@\n")
return nil return nil
} }