-
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
AWS Workspaces fix for issue 13558 #13976
AWS Workspaces fix for issue 13558 #13976
Conversation
expandWorkspaceProperties now leaves out auto stop timeout in minutes if instance should be always on. Updates for running_mode_auto_stop_timeout_in_minutes changes don't apply if running mode is always on.
Any word on when this will be merged? Just ran into this bug and is blocking our use of terraform to manage workspaces. This is 100% a bug, without this code, you cannot make aws workspaces with ALWAYS_ON using terraform. |
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.
Hi @ianbinder, thank you for this contribution! it's off to a great start :) i've added a couple comments for review. also, since the changes affect resource creation behavior, do you mind also adding a new acceptance test to the suite of tests found in aws/resource_aws_workspaces_workspace_test.go
? a good example is covered in the TestAccAwsWorkspacesWorkspace_workspaceProperties
test such that the second step there, defined @ L173, references a test configuration (testAccWorkspacesWorkspaceConfig_WorkspacePropertiesB
) that would illustrate resource creation with the running_mode
set to ALWAYS_ON
. you could re-use that config in a separate test with a structure similar to TestAccAwsWorkspacesWorkspace_basic
. Please let me know if you have any questions regarding testing or if I can assist in any way. also feel free to refer to this guide for more info regarding best practices https://github.com/terraform-providers/terraform-provider-aws/blob/master/docs/contributing/running-and-writing-acceptance-tests.md#resource-acceptance-testing
Hi @ianbinder 👋 thanks again for this PR! Just dropping a note here that I've added a commit to continue the work here, as our general response time from community PRs is 2 weeks, and hope to get these changes into an upcoming release of the provider :) if you have any questions, please let us know! |
Output of new acceptance test:
|
Sorry that I didn't get back to you sooner; a bit busy at work here. Thanks
for taking care of this. I am just excited to start using the feature. I
appreciate all of the work you guys do.
…On Wed, Aug 26, 2020 at 3:34 PM angie pinilla ***@***.***> wrote:
Output of new acceptance test:
--- PASS: TestAccAwsWorkspacesWorkspace_workspaceProperties_runningModeAlwaysOn (1824.24s)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#13976 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEFFTWSTYTBQGJEJSNW67STSCVWTVANCNFSM4OKUGXXQ>
.
|
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 to me 🚀
Output from acceptance testing (test failure unrelated and bounces between tests -- we probably should ensure there's an issue to fix it):
--- FAIL: TestAccAwsWorkspacesWorkspace_workspaceProperties_runningModeAlwaysOn (1881.40s)
TestAccAwsWorkspacesWorkspace_workspaceProperties_runningModeAlwaysOn: testing_new.go:22: WARNING: destroy failed, so remote objects may still exist and be subject to billing
TestAccAwsWorkspacesWorkspace_workspaceProperties_runningModeAlwaysOn: testing_new.go:22: failed to destroy: terraform failed: exit status 1
stderr:
Error: workspace "ws-043rdz79f" was not terminated: couldn't find resource (21 retries)
--- PASS: TestAccAwsWorkspacesWorkspace_validateRootVolumeSize (2.34s)
--- PASS: TestAccAwsWorkspacesWorkspace_validateUserVolumeSize (2.54s)
--- PASS: TestAccAwsWorkspacesWorkspace_basic (1399.75s)
--- PASS: TestAccAwsWorkspacesWorkspace_tags (1963.69s)
--- PASS: TestAccAwsWorkspacesWorkspace_workspaceProperties (1976.76s)
--- FAIL: TestAccAwsWorkspacesWorkspace_workspaceProperties (1726.72s)
TestAccAwsWorkspacesWorkspace_workspaceProperties: testing_new.go:22: WARNING: destroy failed, so remote objects may still exist and be subject to billing
TestAccAwsWorkspacesWorkspace_workspaceProperties: testing_new.go:22: failed to destroy: terraform failed: exit status 1
stderr:
Error: workspace "ws-8zr606r8v" was not terminated: couldn't find resource (21 retries)
--- PASS: TestAccAwsWorkspacesWorkspace_validateRootVolumeSize (2.26s)
--- PASS: TestAccAwsWorkspacesWorkspace_validateUserVolumeSize (2.64s)
--- PASS: TestAccAwsWorkspacesWorkspace_basic (1692.54s)
--- PASS: TestAccAwsWorkspacesWorkspace_workspaceProperties_runningModeAlwaysOn (1729.15s)
--- PASS: TestAccAwsWorkspacesWorkspace_tags (1761.36s)
Related: #14950 |
This has been released in version 3.5.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! |
Community Note
Relates OR Closes #13558
Release note for CHANGELOG:
Test results:
ian@UbuntuNUC:~/development/terraform-providers/terraform-provider-aws$ make testacc TEST=./aws TESTARGS='-run=TestAccAwsWorkspacesWorkspace*'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAwsWorkspacesWorkspace* -timeout 120m
=== RUN TestAccAwsWorkspacesWorkspace_basic
=== PAUSE TestAccAwsWorkspacesWorkspace_basic
=== RUN TestAccAwsWorkspacesWorkspace_tags
=== PAUSE TestAccAwsWorkspacesWorkspace_tags
=== RUN TestAccAwsWorkspacesWorkspace_workspaceProperties
=== PAUSE TestAccAwsWorkspacesWorkspace_workspaceProperties
=== RUN TestAccAwsWorkspacesWorkspace_validateRootVolumeSize
=== PAUSE TestAccAwsWorkspacesWorkspace_validateRootVolumeSize
=== RUN TestAccAwsWorkspacesWorkspace_validateUserVolumeSize
=== PAUSE TestAccAwsWorkspacesWorkspace_validateUserVolumeSize
=== CONT TestAccAwsWorkspacesWorkspace_basic
=== CONT TestAccAwsWorkspacesWorkspace_validateRootVolumeSize
=== CONT TestAccAwsWorkspacesWorkspace_workspaceProperties
=== CONT TestAccAwsWorkspacesWorkspace_validateUserVolumeSize
=== CONT TestAccAwsWorkspacesWorkspace_tags
--- PASS: TestAccAwsWorkspacesWorkspace_validateRootVolumeSize (2.83s)
--- PASS: TestAccAwsWorkspacesWorkspace_validateUserVolumeSize (2.84s)
--- PASS: TestAccAwsWorkspacesWorkspace_tags (1820.33s)
--- PASS: TestAccAwsWorkspacesWorkspace_basic (1833.78s)
--- PASS: TestAccAwsWorkspacesWorkspace_workspaceProperties (1928.77s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 1928.844s