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

Only pass Workspace AutoStopTimeout when running mode is AutoStop #13776

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mikepilat
Copy link

@mikepilat mikepilat commented Jun 16, 2020

When specifying RunningMode as RunningModeAlwaysOn, aws-sdk-go throws an error when the property RunningModeAutoStopTimeoutInMinutes is passed, causing "terraform apply" to fail, passing up the error from aws-sdk-go:

workspace creation failed: RunningModeAutoStopTimeoutInMinutes is not applicable for WorkSpace with running mode set to ALWAYS_ON

This happens even if you have not explicitly specified the timeout property in Terraform config.

While aws-sdk-go could arguably ignore the irrelevant property, this change simply omits it from the properties struct unless the running mode is AutoStop.

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

Release note for CHANGELOG:

resource/aws_workspaces_workspace: Do not specify auto-stop timeout when creating always-on Workspace

Output from acceptance testing:

I did not add any acceptance tests as Workspaces are quite expensive to spin up. 😐

When specifying RunningMode as RunningModeAlwaysOn, aws-sdk-go throws an
error when the property RunningModeAutoStopTimeoutInMinutes is passed,
causing "terraform apply" to fail, passing up the error from aws-sdk-go:

"workspace creation failed: RunningModeAutoStopTimeoutInMinutes is not
applicable for WorkSpace with running mode set to ALWAYS_ON"

This happens even if you have not explicitly specified the timeout
property in Terraform config.

While aws-sdk-go could arguably ignore the irrelevant property, this
change simply omits it from the properties struct unless the running
mode is AutoStop.
@mikepilat mikepilat requested a review from a team June 16, 2020 15:00
@ghost ghost added size/M Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/workspaces Issues and PRs that pertain to the workspaces service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jun 16, 2020
@mikepilat mikepilat changed the title Only pass Workspace AutoStopTimeout for AutoStop Only pass Workspace AutoStopTimeout when running mode is AutoStop Jun 16, 2020
Base automatically changed from master to main January 23, 2021 00:58
@breathingdust breathingdust requested a review from a team as a code owner January 23, 2021 00:58
@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 21, 2021
@zhelding
Copy link
Contributor

Pull request #21306 has significantly refactored the AWS Provider codebase. As a result, most PRs opened prior to the refactor now have merge conflicts that must be resolved before proceeding.

Specifically, PR #21306 relocated the code for all AWS resources and data sources from a single aws directory to a large number of separate directories in internal/service, each corresponding to a particular AWS service. This separation of code has also allowed for us to simplify the names of underlying functions -- while still avoiding namespace collisions.

We recognize that many pull requests have been open for some time without yet being addressed by our maintainers. Therefore, we want to make it clear that resolving these conflicts in no way affects the prioritization of a particular pull request. Once a pull request has been prioritized for review, the necessary changes will be made by a maintainer -- either directly or in collaboration with the pull request author.

For a more complete description of this refactor, including examples of how old filepaths and function names correspond to their new counterparts: please refer to issue #20000.

For a quick guide on how to amend your pull request to resolve the merge conflicts resulting from this refactor and bring it in line with our new code patterns: please refer to our Service Package Refactor Pull Request Guide.

Copy link

Marking this pull request as stale due to inactivity. This helps our maintainers find and focus on the active pull requests. If this pull request receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this pull request was automatically closed and you feel this pull request should be reopened, we encourage creating a new pull request linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/workspaces Issues and PRs that pertain to the workspaces service. size/M Managed by automation to categorize the size of a PR. stale Old or inactive issues managed by automation, if no further action taken these will get closed. 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.

None yet

3 participants