github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/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 }