-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Add configuration support for EMR Instance Groups #10426
Add configuration support for EMR Instance Groups #10426
Conversation
This adds a configurations_json property for the aws_emr_instance_group resource similar to the configurations_json property for the aws_emr_cluster resource as they are processed the same by AWS. Fixes hashicorp#9342
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @joelthompson 🚀
--- PASS: TestAccAWSEMRInstanceGroup_basic (545.24s)
--- PASS: TestAccAWSEMRInstanceGroup_InstanceCount (572.37s)
--- PASS: TestAccAWSEMRInstanceGroup_EbsConfig_EbsOptimized (591.95s)
--- PASS: TestAccAWSEMRInstanceGroup_BidPrice (605.60s)
--- PASS: TestAccAWSEMRInstanceGroup_AutoScalingPolicy (611.06s)
--- PASS: TestAccAWSEMRInstanceGroup_ConfigurationsJson (769.64s)
"configurations_json": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
ForceNew: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: ForceNew: false
is extraneous 😉
@@ -177,6 +200,19 @@ func resourceAwsEMRInstanceGroupRead(d *schema.ResourceData, meta interface{}) e | |||
return fmt.Errorf("error reading EMR Instance Group (%s): %s", d.Id(), err) | |||
} | |||
|
|||
switch { | |||
case len(ig.Configurations) > 0: | |||
configOut, err := flattenConfigurationJson(ig.Configurations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally not for this pull request, but seems like it would be nice if flattenConfigurationJson
just did
if len(config) == 0 {
return "", nil
}
so we didn't need the surrounding conditional logic. 👍
Thanks @bflad ! |
This has been released in version 2.32.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
This adds a configurations_json property for the aws_emr_instance_group
resource similar to the configurations_json property for the
aws_emr_cluster resource as they are processed the same by AWS.
Community Note
Closes #9342
Release note for CHANGELOG:
Output from acceptance testing:
Note that two tests failed the first time -- one due to resource limits in my test AWS account and the other looks to have been due to a flaky test due to a race condition with AWS's EMR cluster provisioning process. Rerunning both of them individually succeeded.