Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F/aws emr cluster #17706

Merged
merged 10 commits into from
Oct 5, 2021
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