Expand on an error case with more descriptive error

This commit is contained in:
Clint Shryock 2015-08-21 09:58:56 -05:00
parent e0bb04b822
commit 03aac9f42b
3 changed files with 17 additions and 15 deletions

View File

@ -171,7 +171,9 @@ func resourceAwsSecurityGroupRuleRead(d *schema.ResourceData, meta interface{})
p := expandIPPerm(d, sg)
if len(rules) == 0 {
return fmt.Errorf("No IPPerms")
return fmt.Errorf(
"[WARN] No %s rules were found for Security Group (%s) looking for Security Group Rule (%s)",
ruleType, *sg.GroupName, d.Id())
}
for _, r := range rules {

View File

@ -257,7 +257,7 @@ func TestAccAWSSecurityGroupRule_SelfReference(t *testing.T) {
}
// testing partial match implementation
func TestAccAWSSecurityGroupRule_PartialMatching_Basic(t *testing.T) {
func TestAccAWSSecurityGroupRule_PartialMatching_basic(t *testing.T) {
var group ec2.SecurityGroup
p := ec2.IpPermission{