Skip to content

Commit

Permalink
revert the required part
Browse files Browse the repository at this point in the history
  • Loading branch information
catsby committed May 5, 2015
1 parent f53721e commit 2325c69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions builtin/providers/aws/resource_aws_security_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,7 @@ func resourceAwsSecurityGroupCreate(d *schema.ResourceData, meta interface{}) er

securityGroupOpts := &ec2.CreateSecurityGroupInput{}

if v, ok := d.GetOk("vpc_id"); ok {
if len(d.Get("egress").(*schema.Set).List()) == 0 {
return fmt.Errorf("Error creating Security Group: Security groups inside a VPC require an egress rule. See http://terraform.io/docs/providers/aws/r/security_group.html for more information.")
}

if v := d.Get("vpc_id"); v != nil {
securityGroupOpts.VPCID = aws.String(v.(string))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The following arguments are supported:
* `description` - (Required) The security group description.
* `ingress` - (Optional) Can be specified multiple times for each
ingress rule. Each ingress block supports fields documented below.
* `egress` - (Required, VPC only) Can be specified multiple times for each
* `egress` - (Optional, VPC only) Can be specified multiple times for each
egress rule. Each egress block supports fields documented below.
* `vpc_id` - (Optional) The VPC ID.
* `tags` - (Optional) A mapping of tags to assign to the resource.
Expand Down

0 comments on commit 2325c69

Please sign in to comment.