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

aws_workspaces_workspace can't apply with "ALWAYS_ON" running_mode #13558

Closed
philbal611 opened this issue May 30, 2020 · 4 comments · Fixed by #13976
Closed

aws_workspaces_workspace can't apply with "ALWAYS_ON" running_mode #13558

philbal611 opened this issue May 30, 2020 · 4 comments · Fixed by #13976
Assignees
Labels
bug Addresses a defect in current functionality. service/workspaces Issues and PRs that pertain to the workspaces service.
Milestone

Comments

@philbal611
Copy link
Contributor

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue 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 issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.12.13

  • provider.aws v2.63.0

Affected Resource(s)

  • aws_workspaces_workspace

Terraform Configuration Files

data "aws_workspaces_directory" "directory" {}

resource "aws_workspaces_workspace" "workspace" {
  directory_id = data.aws_workspaces_directory.directory.id
  bundle_id    = "wsb-bh8rsxt14" # Value with Windows 10 (English)
  user_name    = "test.user"

  root_volume_encryption_enabled = true
  user_volume_encryption_enabled = true
  volume_encryption_key          = "aws/workspaces"

  workspace_properties {
    compute_type_name                         = "VALUE"
    root_volume_size_gib                      = 80
    user_volume_size_gib                      = 175
    running_mode                              = "ALWAYS_ON"
    // running_mode_auto_stop_timeout_in_minutes NOT set
  }
}

Debug Output

Panic Output

Expected Behavior

Workspace is deployed with ALWAYS_ON running mode.

Actual Behavior

Workspace fails apply because running_mode_auto_stop_timeout_in_minutes is always computed, even when not configured.

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_workspaces_workspace.workspace will be created
  + resource "aws_workspaces_workspace" "workspace" {
      + bundle_id                      = "wsb-bh8rsxt14"
      + computer_name                  = (known after apply)
      + directory_id                   = "<directory_id>"
      + id                             = (known after apply)
      + ip_address                     = (known after apply)
      + root_volume_encryption_enabled = true
      + state                          = (known after apply)
      + user_name                      = "test.user"
      + user_volume_encryption_enabled = true
      + volume_encryption_key          = "aws/workspaces"

      + workspace_properties {
          + compute_type_name                         = "VALUE"
          + root_volume_size_gib                      = 80
          + running_mode                              = "ALWAYS_ON"
   ---->  + running_mode_auto_stop_timeout_in_minutes = (known after apply) <----
          + user_volume_size_gib                      = 175
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

aws_workspaces_workspace.workspace: Creating...

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

  on main.tf line 32, in resource "aws_workspaces_workspace" "workspace":
  32: resource "aws_workspaces_workspace" "workspace" {

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@ghost ghost added the service/workspaces Issues and PRs that pertain to the workspaces service. label May 30, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label May 30, 2020
@cwebster2
Copy link
Contributor

I can replicate this bug.

Using the resource:

resource "aws_workspaces_workspace" "example_workspace" {
  directory_id = data.aws_workspaces_directory.example.id
  bundle_id    = data.aws_workspaces_bundle.bundle.id
  user_name    = var.username

  root_volume_encryption_enabled = true
  user_volume_encryption_enabled = true

  workspace_properties {
    compute_type_name                         = var.compute_type
    user_volume_size_gib                      = 50
    root_volume_size_gib                      = 80
    running_mode                              = "ALWAYS_ON"
  }
}

Results in the error
Error: workspace creation failed: RunningModeAutoStopTimeoutInMinutes is not applicable for WorkSpace with running mode set to ALWAYS_ON during apply after the plan decides to add running_mode_auto_stop_timeout_in_minutes to my resource in error.

@anGie44 anGie44 added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 12, 2020
@anGie44 anGie44 self-assigned this Aug 12, 2020
@anGie44 anGie44 added this to the v3.5.0 milestone Sep 1, 2020
@anGie44
Copy link
Contributor

anGie44 commented Sep 1, 2020

The fix for this bug has been merged and will release with v3.5.0 of the Terraform AWS Provider, likely out this Thursday.

@ghost
Copy link

ghost commented Sep 3, 2020

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!

@ghost
Copy link

ghost commented Oct 1, 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 as resolved and limited conversation to collaborators Oct 1, 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/workspaces Issues and PRs that pertain to the workspaces service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants