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_batch_compute_environment: Propose resource recreation when updating compute_resources configuration block tags argument #10937

Merged

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Nov 19, 2019

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" comments, they generate extra noise for pull request followers and do not help prioritize the request

Closes #2696
Reference: https://docs.aws.amazon.com/batch/latest/APIReference/API_UpdateComputeEnvironment.html

Release note for CHANGELOG:

* resource/aws_batch_compute_environment: Propose resource recreation when updating `compute_resources` configuration block `tags` argument

The upstream API does not support updating compute resource tags, therefore we update Terraform to propose resource recreation when they are modified instead of perpetually showing a difference.

Output from acceptance testing:

--- PASS: TestAccAWSBatchComputeEnvironment_createEc2WithoutComputeResources (20.68s)
--- PASS: TestAccAWSBatchComputeEnvironment_createSpotWithoutBidPercentage (23.28s)
--- PASS: TestAccAWSBatchComputeEnvironment_createUnmanaged (44.92s)
--- PASS: TestAccAWSBatchComputeEnvironment_createEc2 (45.81s)
--- PASS: TestAccAWSBatchComputeEnvironment_createUnmanagedWithComputeResources (55.24s)
--- PASS: TestAccAWSBatchComputeEnvironment_launchTemplate (57.90s)
--- PASS: TestAccAWSBatchComputeEnvironment_createSpot (58.45s)
--- PASS: TestAccAWSBatchComputeEnvironment_createEc2WithTags (60.50s)
--- PASS: TestAccAWSBatchComputeEnvironment_updateMaxvCpus (76.98s)
--- PASS: TestAccAWSBatchComputeEnvironment_updateState (77.05s)
--- PASS: TestAccAWSBatchComputeEnvironment_updateInstanceType (84.66s)
--- PASS: TestAccAWSBatchComputeEnvironment_updateComputeEnvironmentName (91.90s)

…ing compute_resources configuration block tags argument

Reference: #2696
Reference: https://docs.aws.amazon.com/batch/latest/APIReference/API_UpdateComputeEnvironment.html

The upstream API does not support updating compute resource tags, therefore we update Terraform to propose resource recreation when they are modified instead of perpetually showing a difference.

Output from acceptance testing:

```
--- PASS: TestAccAWSBatchComputeEnvironment_createEc2WithoutComputeResources (20.68s)
--- PASS: TestAccAWSBatchComputeEnvironment_createSpotWithoutBidPercentage (23.28s)
--- PASS: TestAccAWSBatchComputeEnvironment_createUnmanaged (44.92s)
--- PASS: TestAccAWSBatchComputeEnvironment_createEc2 (45.81s)
--- PASS: TestAccAWSBatchComputeEnvironment_createUnmanagedWithComputeResources (55.24s)
--- PASS: TestAccAWSBatchComputeEnvironment_launchTemplate (57.90s)
--- PASS: TestAccAWSBatchComputeEnvironment_createSpot (58.45s)
--- PASS: TestAccAWSBatchComputeEnvironment_createEc2WithTags (60.50s)
--- PASS: TestAccAWSBatchComputeEnvironment_updateMaxvCpus (76.98s)
--- PASS: TestAccAWSBatchComputeEnvironment_updateState (77.05s)
--- PASS: TestAccAWSBatchComputeEnvironment_updateInstanceType (84.66s)
--- PASS: TestAccAWSBatchComputeEnvironment_updateComputeEnvironmentName (91.90s)
```
@bflad bflad added bug Addresses a defect in current functionality. service/batch Issues and PRs that pertain to the batch service. labels Nov 19, 2019
@bflad bflad requested a review from a team November 19, 2019 20:18
@ghost ghost added needs-triage Waiting for first response or review from a maintainer. size/XS Managed by automation to categorize the size of a PR. labels Nov 19, 2019
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

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

LGTM

@bflad bflad added this to the v2.39.0 milestone Nov 21, 2019
@bflad bflad merged commit 07b17bc into master Nov 21, 2019
@bflad bflad deleted the b-aws_batch_compute_environment-compute_resources-tags-ForceNew branch November 21, 2019 13:56
bflad added a commit that referenced this pull request Nov 21, 2019
@ghost
Copy link

ghost commented Nov 21, 2019

This has been released in version 2.39.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!

pixelpogo pushed a commit to babbel/terraform-provider-aws that referenced this pull request Nov 22, 2019
…ing compute_resources configuration block tags argument (hashicorp#10937)

Reference: hashicorp#2696
Reference: https://docs.aws.amazon.com/batch/latest/APIReference/API_UpdateComputeEnvironment.html

The upstream API does not support updating compute resource tags, therefore we update Terraform to propose resource recreation when they are modified instead of perpetually showing a difference.

Output from acceptance testing:

```
--- PASS: TestAccAWSBatchComputeEnvironment_createEc2WithoutComputeResources (20.68s)
--- PASS: TestAccAWSBatchComputeEnvironment_createSpotWithoutBidPercentage (23.28s)
--- PASS: TestAccAWSBatchComputeEnvironment_createUnmanaged (44.92s)
--- PASS: TestAccAWSBatchComputeEnvironment_createEc2 (45.81s)
--- PASS: TestAccAWSBatchComputeEnvironment_createUnmanagedWithComputeResources (55.24s)
--- PASS: TestAccAWSBatchComputeEnvironment_launchTemplate (57.90s)
--- PASS: TestAccAWSBatchComputeEnvironment_createSpot (58.45s)
--- PASS: TestAccAWSBatchComputeEnvironment_createEc2WithTags (60.50s)
--- PASS: TestAccAWSBatchComputeEnvironment_updateMaxvCpus (76.98s)
--- PASS: TestAccAWSBatchComputeEnvironment_updateState (77.05s)
--- PASS: TestAccAWSBatchComputeEnvironment_updateInstanceType (84.66s)
--- PASS: TestAccAWSBatchComputeEnvironment_updateComputeEnvironmentName (91.90s)
```
pixelpogo pushed a commit to babbel/terraform-provider-aws that referenced this pull request Nov 22, 2019
@ghost
Copy link

ghost commented Mar 29, 2020

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!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
@breathingdust breathingdust removed the needs-triage Waiting for first response or review from a maintainer. label Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/batch Issues and PRs that pertain to the batch service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_batch_compute_environment: problems updating/changing tags
3 participants