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

Bug fix for issue 3268 #3508

Merged
merged 5 commits into from
Mar 7, 2018
Merged

Bug fix for issue 3268 #3508

merged 5 commits into from
Mar 7, 2018

Conversation

wattdave
Copy link
Contributor

#3268

This seems to arise via explicit use of the 'state' variable.

#3268

This seems to arise via explicit use of the 'state' variable.
@ghost ghost added the size/XS Managed by automation to categorize the size of a PR. label Feb 24, 2018
@bflad bflad added bug Addresses a defect in current functionality. service/batch Issues and PRs that pertain to the batch service. labels Feb 24, 2018
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Hi @wattdave, thanks for this fix! While the fix looks correct, would you have time to create a proper acceptance test for updating the state rather than modifying these two existing test configurations? If not, that's okay too. 👍

Basically, you should be able to copy one of the existing acceptance tests like TestAccAWSBatchComputeEnvironment_updateInstanceType and create a new configuration that changes only the state. We can explicitly look for the attribute to be set correctly in the state with something like resource.TestCheckResourceAttr("aws_batch_compute_environment.ec2", "state", "DISABLED"),

@bflad bflad added the waiting-response Maintainers are waiting on response from community or contributor. label Feb 25, 2018
@ghost ghost added size/M Managed by automation to categorize the size of a PR. and removed size/XS Managed by automation to categorize the size of a PR. labels Feb 25, 2018
@wattdave
Copy link
Contributor Author

wattdave commented Feb 25, 2018

@bflad Here you go; it includes a test that illustrates the explicit overwrite of the service role that causes grief when trying to change an existing compute environment.

Actually on re-reading your suggestion I realize I didn't do what you asked. Sec...

@ghost ghost added the size/M Managed by automation to categorize the size of a PR. label Feb 26, 2018
@wattdave
Copy link
Contributor Author

wattdave commented Mar 6, 2018

@bflad This seems gtg now - are these tests what you want?

@bflad bflad removed the waiting-response Maintainers are waiting on response from community or contributor. label Mar 7, 2018
@bflad bflad added this to the v1.11.0 milestone Mar 7, 2018
@bflad bflad self-requested a review March 7, 2018 13:09
@bflad
Copy link
Contributor

bflad commented Mar 7, 2018

The acceptance test is failing currently, but I'll fix it on merge.

=== RUN   TestAccAWSBatchComputeEnvironment_updateState
--- FAIL: TestAccAWSBatchComputeEnvironment_updateState (96.32s)
    testing.go:513: Step 1 error: Check failed: Check 3/3 error: aws_batch_compute_environment.ec2: Attribute 'service_role' expected "tf_acc_test_batch_svc_role_7867757812779672119", got "arn:aws:iam::*******:role/tf_acc_test_batch_svc_role_7867757812779672119"
FAIL

@bflad bflad merged commit f867f89 into hashicorp:master Mar 7, 2018
@bflad
Copy link
Contributor

bflad commented Mar 7, 2018

Merged into master and will release with v1.11.0 of the AWS provider. Thanks so much!

bflad added a commit that referenced this pull request Mar 7, 2018
@bflad
Copy link
Contributor

bflad commented Mar 9, 2018

This has been released in version 1.11.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 7, 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 Apr 7, 2020
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/M Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants