github.com/recobe182/terraform@v0.8.5-0.20170117231232-49ab22a935b7/builtin/providers/aws/awserr.go (about) 1 package aws 2 3 import ( 4 "strings" 5 6 "github.com/aws/aws-sdk-go/aws/awserr" 7 ) 8 9 func isAWSErr(err error, code string, message string) bool { 10 if err, ok := err.(awserr.Error); ok { 11 return err.Code() == code && strings.Contains(err.Message(), message) 12 } 13 return false 14 }