Merge pull request #9600 from HotelsDotCom/master

AWS EMR resource - Support for Service Access Security Group
This commit is contained in:
Clint 2016-11-08 11:36:03 -06:00 committed by GitHub
commit 81e599e53f
2 changed files with 22 additions and 9 deletions

View File

@ -105,6 +105,10 @@ func resourceAwsEMRCluster() *schema.Resource {
Type: schema.TypeString,
Required: true,
},
"service_access_security_group": &schema.Schema{
Type: schema.TypeString,
Optional: true,
},
},
},
},
@ -215,6 +219,10 @@ func resourceAwsEMRClusterCreate(d *schema.ResourceData, meta interface{}) error
if len(strings.TrimSpace(attributes["instance_profile"].(string))) != 0 {
instanceProfile = strings.TrimSpace(attributes["instance_profile"].(string))
}
if v, ok := attributes["service_access_security_group"]; ok {
instanceConfig.ServiceAccessSecurityGroup = aws.String(v.(string))
}
}
emrApps := expandApplications(applications)
@ -510,6 +518,10 @@ func flattenEc2Attributes(ia *emr.Ec2InstanceAttributes) []map[string]interface{
attrs["additional_slave_security_groups"] = strings.Join(strs, ",")
}
if ia.ServiceAccessSecurityGroup != nil {
attrs["service_access_security_group"] = *ia.ServiceAccessSecurityGroup
}
result = append(result, attrs)
return result

View File

@ -92,6 +92,7 @@ Cannot specify the `cc1.4xlarge` instance type for nodes of a job flow launched
* `additional_slave_security_groups` - (Optional) list of additional Amazon EC2 security group IDs for the slave nodes
* `emr_managed_master_security_group` - (Optional) identifier of the Amazon EC2 security group for the master node
* `emr_managed_slave_security_group` - (Optional) identifier of the Amazon EC2 security group for the slave nodes
* `service_access_security_group` - (Optional) identifier of the Amazon EC2 service-access security group - required when the cluster runs on a private subnet
* `instance_profile` - (Optional) Instance Profile for EC2 instances of the cluster assume this role