-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
resource/aws_emr_instance_group: add autoscaling_policy and bid_price arguments, along with resource importing support #8078
Conversation
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.
Hey @nywilken 👋 Looking pretty good! Please reach out with any questions.
"bid_price": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
ForceNew: true, |
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.
Not necessarily for this pull request, but if interested, we could potentially make this field optionally ForceNew
via CustomizeDiff
, e.g.
CustomizeDiff: customdiff.Sequence(
customdiff.ForceNewIfChange("bid_price", func(old, new, meta interface{}) bool {
return old == "" || new == ""
}),
),
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.
Thanks for providing this snippet. I will try to implement in this pull request. I am writing test against it now so I should have something new for you to review.
return "", fmt.Errorf("Not found: %s", resourceName) | ||
} | ||
|
||
log.Println(fmt.Sprintf("%s/%s", rs.Primary.Attributes["cluster_id"], rs.Primary.ID)) |
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.
Extraneous log line can be removed 👍
eebadae
to
b2e7c25
Compare
@bflad thanks for the thorough review. I went ahead and implemented the changes and suggestions you called out; making a bit of a refactor to consolidate logic into smaller non shared functions (speaking abut cluster and instance_group) and move things out of structure.go to start. I'll add a few more test and remove the WIP label from the title shortly. |
b2e7c25
to
afa5085
Compare
afa5085
to
2af9859
Compare
@nywilken I just merged the |
* Add resource import functionality * Add ability to update AutoScalingPolicy * Drop support for non TASK instance groups ``` === RUN TestAccAWSEMRInstanceGroup_basic === PAUSE TestAccAWSEMRInstanceGroup_basic === CONT TestAccAWSEMRInstanceGroup_basic === RUN TestAccAWSEMRInstanceGroup_updateAutoScalingPolicy === PAUSE TestAccAWSEMRInstanceGroup_updateAutoScalingPolicy === RUN TestAccAWSEMRInstanceGroup_updateInstanceCount === PAUSE TestAccAWSEMRInstanceGroup_updateInstanceCount === CONT TestAccAWSEMRInstanceGroup_updateAutoScalingPolicy === CONT TestAccAWSEMRInstanceGroup_updateInstanceCount --- PASS: TestAccAWSEMRInstanceGroup_basic (600.47s) --- PASS: TestAccAWSEMRInstanceGroup_updateAutoScalingPolicy (634.61s) --- PASS: TestAccAWSEMRInstanceGroup_updateInstanceCount (648.22s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 648.229s ```
2af9859
to
942a6bc
Compare
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.
Looks good! 🚀 Ready to ship with some very minor adjustments noted below.
Output from AWS Standard acceptance testing:
--- PASS: TestAccAWSEMRInstanceGroup_AutoScalingPolicy (556.16s)
--- PASS: TestAccAWSEMRInstanceGroup_updateAutoScalingPolicy (576.55s)
--- PASS: TestAccAWSEMRInstanceGroup_EbsConfig_EbsOptimized (582.51s)
--- PASS: TestAccAWSEMRInstanceGroup_updateInstanceCount (590.52s)
--- PASS: TestAccAWSEMRInstanceGroup_basic (591.16s)
--- PASS: TestAccAWSEMRInstanceGroup_BidPrice (598.07s)
b16c669
to
be8a7d6
Compare
This has been released in version 2.11.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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 change updates
aws_emr_instance_group
resource so that it has full parity with the deprecatedinstance_group
configuration block in theaws_emr_cluster
resource.