Skip to content

Commit

Permalink
Merge pull request #17706 from nikhil-goenka/f/aws_emr_cluster
Browse files Browse the repository at this point in the history
F/aws emr cluster
  • Loading branch information
YakDriver authored Oct 5, 2021
2 parents bf09414 + 45e76ad commit a3d854a
Show file tree
Hide file tree
Showing 4 changed files with 1,448 additions and 1,326 deletions.
3 changes: 3 additions & 0 deletions .changelog/17706.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/aws_emr_cluster: Add `log_encryption_kms_key_id` argument
```
10 changes: 10 additions & 0 deletions aws/resource_aws_emr_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ func resourceAwsEMRCluster() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"log_encryption_kms_key_id": {
Type: schema.TypeString,
ForceNew: true,
Optional: true,
},
"log_uri": {
Type: schema.TypeString,
ForceNew: true,
Expand Down Expand Up @@ -856,6 +861,10 @@ func resourceAwsEMRClusterCreate(d *schema.ResourceData, meta interface{}) error
params.AdditionalInfo = aws.String(info)
}

if v, ok := d.GetOk("log_encryption_kms_key_id"); ok {
params.LogEncryptionKmsKeyId = aws.String(v.(string))
}

if v, ok := d.GetOk("log_uri"); ok {
params.LogUri = aws.String(v.(string))
}
Expand Down Expand Up @@ -1093,6 +1102,7 @@ func resourceAwsEMRClusterRead(d *schema.ResourceData, meta interface{}) error {
d.Set("security_configuration", cluster.SecurityConfiguration)
d.Set("autoscaling_role", cluster.AutoScalingRole)
d.Set("release_label", cluster.ReleaseLabel)
d.Set("log_encryption_kms_key_id", cluster.LogEncryptionKmsKeyId)
d.Set("log_uri", cluster.LogUri)
d.Set("master_public_dns", cluster.MasterPublicDnsName)
d.Set("visible_to_all_users", cluster.VisibleToAllUsers)
Expand Down
Loading

0 comments on commit a3d854a

Please sign in to comment.