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

resource/aws_placement_group: add support for the attribute partition count #15360

Merged
merged 10 commits into from
Oct 13, 2021

Conversation

sean-
Copy link
Contributor

@sean- sean- commented Sep 25, 2020

Setting partition_count changes the number of internal partitions AWS uses to distribute resources within a particular AZ. Only applicable for the partition strategy. API docs: https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#CreatePlacementGroupInput

Fixes: #7754

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #7754

Release note for CHANGELOG:

resource/aws_placement_group: Add support for partition_count to specify the number of partitions within an AZ ([#7754](https://github.com/terraform-providers/terraform-provider-aws/issues/7754))

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSPlacementGroup_partition'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSPlacementGroup_partition -timeout 120m
=== RUN   TestAccAWSPlacementGroup_partition
=== PAUSE TestAccAWSPlacementGroup_partition
=== CONT  TestAccAWSPlacementGroup_partition
--- PASS: TestAccAWSPlacementGroup_partition (35.83s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	39.289s

@sean- sean- requested a review from a team September 25, 2020 18:12
@ghost ghost added size/M Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Sep 25, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Sep 25, 2020
@ziggythehamster
Copy link
Contributor

This seems to be a different version of #7649, but which currently merges. I notice the docs say it defaults to 2, but I don't see that tested nor implemented (I also don't see what happens if you leave it out).

I wonder if Hashicorp hates partitioning or something, there are a ton of PRs bringing in this functionality that never make it :(.

Base automatically changed from master to main January 23, 2021 00:59
@breathingdust breathingdust requested a review from a team as a code owner January 23, 2021 00:59
@sean- sean- force-pushed the gh-7754 branch 4 times, most recently from 22df73a to 39c601c Compare May 7, 2021 01:34
@hansh0801
Copy link

@sean- Can we get an update on this?

@sean-
Copy link
Contributor Author

sean- commented Sep 7, 2021

@hansh0801 I'm waiting for this, too, just like you are. Having only two placement groups in some AZs for some workloads is a problem for me. It would be great if someone from HashiCorp could merge this PR.

@breathingdust breathingdust added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Sep 16, 2021
@ewbankkit ewbankkit self-assigned this Oct 11, 2021
@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Oct 13, 2021
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀.

Commercial
% make testacc TESTARGS='-run=TestAccAWSPlacementGroup_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSPlacementGroup_ -timeout 180m
=== RUN   TestAccAWSPlacementGroup_basic
=== PAUSE TestAccAWSPlacementGroup_basic
=== RUN   TestAccAWSPlacementGroup_disappears
=== PAUSE TestAccAWSPlacementGroup_disappears
=== RUN   TestAccAWSPlacementGroup_Tags
=== PAUSE TestAccAWSPlacementGroup_Tags
=== RUN   TestAccAWSPlacementGroup_PartitionCount
=== PAUSE TestAccAWSPlacementGroup_PartitionCount
=== CONT  TestAccAWSPlacementGroup_basic
=== CONT  TestAccAWSPlacementGroup_PartitionCount
=== CONT  TestAccAWSPlacementGroup_disappears
=== CONT  TestAccAWSPlacementGroup_Tags
--- PASS: TestAccAWSPlacementGroup_disappears (15.26s)
--- PASS: TestAccAWSPlacementGroup_PartitionCount (19.42s)
--- PASS: TestAccAWSPlacementGroup_basic (19.42s)
--- PASS: TestAccAWSPlacementGroup_Tags (38.50s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	41.731s
% make testacc TESTARGS='-run=TestAccAWSInstanceDataSource_basic\|TestAccAWSInstance_placementGroup\|TestAccAWSInstance_placementPartitionNumber\|TestAccAWSInstance_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSInstanceDataSource_basic\|TestAccAWSInstance_placementGroup\|TestAccAWSInstance_placementPartitionNumber\|TestAccAWSInstance_basic -timeout 180m
=== RUN   TestAccAWSInstanceDataSource_basic
=== PAUSE TestAccAWSInstanceDataSource_basic
=== RUN   TestAccAWSInstance_basic
=== PAUSE TestAccAWSInstance_basic
=== RUN   TestAccAWSInstance_placementGroup
=== PAUSE TestAccAWSInstance_placementGroup
=== RUN   TestAccAWSInstance_placementPartitionNumber
=== PAUSE TestAccAWSInstance_placementPartitionNumber
=== CONT  TestAccAWSInstanceDataSource_basic
=== CONT  TestAccAWSInstance_placementPartitionNumber
=== CONT  TestAccAWSInstance_placementGroup
=== CONT  TestAccAWSInstance_basic
--- PASS: TestAccAWSInstance_basic (100.89s)
--- PASS: TestAccAWSInstance_placementGroup (115.92s)
--- PASS: TestAccAWSInstanceDataSource_basic (121.01s)
--- PASS: TestAccAWSInstance_placementPartitionNumber (122.68s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	126.291s
GovCloud
% make testacc TESTARGS='-run=TestAccAWSPlacementGroup_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSPlacementGroup_ -timeout 180m
=== RUN   TestAccAWSPlacementGroup_basic
=== PAUSE TestAccAWSPlacementGroup_basic
=== RUN   TestAccAWSPlacementGroup_disappears
=== PAUSE TestAccAWSPlacementGroup_disappears
=== RUN   TestAccAWSPlacementGroup_Tags
=== PAUSE TestAccAWSPlacementGroup_Tags
=== RUN   TestAccAWSPlacementGroup_PartitionCount
=== PAUSE TestAccAWSPlacementGroup_PartitionCount
=== CONT  TestAccAWSPlacementGroup_basic
=== CONT  TestAccAWSPlacementGroup_PartitionCount
=== CONT  TestAccAWSPlacementGroup_Tags
=== CONT  TestAccAWSPlacementGroup_disappears
--- PASS: TestAccAWSPlacementGroup_disappears (16.13s)
--- PASS: TestAccAWSPlacementGroup_basic (21.47s)
--- PASS: TestAccAWSPlacementGroup_PartitionCount (21.50s)
--- PASS: TestAccAWSPlacementGroup_Tags (45.86s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	49.135s
% make testacc TESTARGS='-run=TestAccAWSInstanceDataSource_basic\|TestAccAWSInstance_placementGroup\|TestAccAWSInstance_placementPartitionNumber\|TestAccAWSInstance_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSInstanceDataSource_basic\|TestAccAWSInstance_placementGroup\|TestAccAWSInstance_placementPartitionNumber\|TestAccAWSInstance_basic -timeout 180m
=== RUN   TestAccAWSInstanceDataSource_basic
=== PAUSE TestAccAWSInstanceDataSource_basic
=== RUN   TestAccAWSInstance_basic
=== PAUSE TestAccAWSInstance_basic
=== RUN   TestAccAWSInstance_placementGroup
=== PAUSE TestAccAWSInstance_placementGroup
=== RUN   TestAccAWSInstance_placementPartitionNumber
=== PAUSE TestAccAWSInstance_placementPartitionNumber
=== CONT  TestAccAWSInstanceDataSource_basic
=== CONT  TestAccAWSInstance_placementPartitionNumber
=== CONT  TestAccAWSInstance_placementGroup
=== CONT  TestAccAWSInstance_basic
--- PASS: TestAccAWSInstance_placementPartitionNumber (95.41s)
--- PASS: TestAccAWSInstanceDataSource_basic (102.07s)
--- PASS: TestAccAWSInstance_basic (107.74s)
--- PASS: TestAccAWSInstance_placementGroup (126.75s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	130.003s

@ewbankkit
Copy link
Contributor

@sean- Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit a4b2dea into hashicorp:main Oct 13, 2021
@github-actions github-actions bot added this to the v3.63.0 milestone Oct 13, 2021
@sean- sean- deleted the gh-7754 branch October 13, 2021 17:35
@sean-
Copy link
Contributor Author

sean- commented Oct 13, 2021

@sean- Thanks for the contribution 🎉 👏.

Thank you for merging it!!! I'm going to ping you with a few more PRs in the future (waiting sucks).

@github-actions
Copy link

This functionality has been released in v3.63.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. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support EC2 Partition Placement Groups
6 participants