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]: appstream_stack#user_settings - Error on AUTO_TIME_ZONE_REDIRECTION #40362

Closed
thebriankeys opened this issue Nov 29, 2024 · 4 comments
Closed
Labels
bug Addresses a defect in current functionality. service/appstream Issues and PRs that pertain to the appstream service.

Comments

@thebriankeys
Copy link

thebriankeys commented Nov 29, 2024

Terraform Core Version

1.5.7

AWS Provider Version

5.30.0,5.78.0

Affected Resource(s)

aws_appstream_stack

Expected Behavior

Configure AUTO_TIME_ZONE_REDIRECTION user setting action within resource "aws_appstream_stack" "stack"

Actual Behavior

On terraform plan/apply the following is seen:

Error: �[0m�[0m�[1mexpected user_settings.0.action to be one of ["CLIPBOARD_COPY_FROM_LOCAL_DEVICE" "CLIPBOARD_COPY_TO_LOCAL_DEVICE" "FILE_UPLOAD" "FILE_DOWNLOAD" "PRINTING_TO_LOCAL_DEVICE" "DOMAIN_PASSWORD_SIGNIN" "DOMAIN_SMART_CARD_SIGNIN"], got AUTO_TIME_ZONE_REDIRECTION

Relevant Error/Panic Output Snippet

The issue is that although this is a valid option for aws - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-stack-usersetting.html

...it is not yet supported by the hashicorp terraform aws provider - https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/appstream_stack#user_settings

Terraform Configuration Files

resource "aws_appstream_stack" "stack" {
  name         = "example-stack"
  description  = "example stack"
  display_name = "example stack"
  feedback_url = ""
  redirect_url = ""

  storage_connectors {
    connector_type      = "HOMEFOLDERS"
  }

  user_settings {
    action     = "AUTO_TIME_ZONE_REDIRECTION"
    permission = "DISABLED"
  }
  user_settings {
    action     = "CLIPBOARD_COPY_FROM_LOCAL_DEVICE"
    permission = "ENABLED"
  }
  user_settings {
    action     = "CLIPBOARD_COPY_TO_LOCAL_DEVICE"
    permission = "ENABLED"
  }
  user_settings {
    action     = "DOMAIN_PASSWORD_SIGNIN"
    permission = "ENABLED"
  }
  user_settings {
    action     = "DOMAIN_SMART_CARD_SIGNIN"
    permission = "DISABLED"
  }
  user_settings {
    action     = "FILE_DOWNLOAD"
    permission = "ENABLED"
  }
  user_settings {
    action     = "FILE_UPLOAD"
    permission = "ENABLED"
  }
  user_settings {
    action     = "PRINTING_TO_LOCAL_DEVICE"
    permission = "ENABLED"
  }
  application_settings {
    enabled = false
  }
}

Steps to Reproduce

Define terraform iac for an AWS AppStream Stack were the user setting 'AUTO_TIME_ZONE_REDIRECTION' is configured in terraformcode.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@thebriankeys thebriankeys added the bug Addresses a defect in current functionality. label Nov 29, 2024
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added service/appstream Issues and PRs that pertain to the appstream service. needs-triage Waiting for first response or review from a maintainer. labels Nov 29, 2024
@stefanfreitag
Copy link
Contributor

stefanfreitag commented Dec 10, 2024

Good evening @thebriankeys,

thank you for reporting the issue and the detailed steps for reproducing it!

Following your instructions I am also ending up in the error message. I used Terraform v1.5.7 in combination with AWS provider version 5.30.0.

❯ terraform version
Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/hashicorp/aws v5.30.0

Your version of Terraform is out of date! The latest version
is 1.10.1. You can update by downloading from https://www.terraform.io/downloads.html
❯ terraform plan
╷
│ Error: expected user_settings.0.action to be one of ["CLIPBOARD_COPY_FROM_LOCAL_DEVICE" "CLIPBOARD_COPY_TO_LOCAL_DEVICE" "FILE_UPLOAD" "FILE_DOWNLOAD" "PRINTING_TO_LOCAL_DEVICE" "DOMAIN_PASSWORD_SIGNIN" "DOMAIN_SMART_CARD_SIGNIN"], got AUTO_TIME_ZONE_REDIRECTION
│ 
│   with aws_appstream_stack.stack,
│   on main.tf line 1, in resource "aws_appstream_stack" "stack":
│    1: resource "aws_appstream_stack" "stack" {
│ 

I tracked back the issue to missing support in the AWS Go SDKv2 version used as part of AWS provider 5.30.0.

The functionality was added to the AWS Go SDK v2 in October `24 (Release notes) Here the action is defined.

The current release v5.80.0 (and to my current understanding also v5.78.0) use a newer version of the SDK and hence should work for you.

❯ terraform version
Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/hashicorp/aws v5.80.0

Your version of Terraform is out of date! The latest version
is 1.10.1. You can update by downloading from https://www.terraform.io/downloads.html
❯ terraform plan

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_appstream_stack.stack will be created
  + resource "aws_appstream_stack" "stack" {
      + arn                = (known after apply)
      + created_time       = (known after apply)
      + description        = "example stack"
      + display_name       = "example stack"
      + embed_host_domains = (known after apply)
      + feedback_url       = (known after apply)
      + id                 = (known after apply)
      + name               = "example-stack"
      + redirect_url       = (known after apply)
      + tags_all           = (known after apply)

      + application_settings {
          + enabled = false
        }

      + storage_connectors {
          + connector_type      = "HOMEFOLDERS"
          + domains             = (known after apply)
          + resource_identifier = (known after apply)
        }

      + user_settings {
          + action     = "AUTO_TIME_ZONE_REDIRECTION"
          + permission = "DISABLED"
        }
      + user_settings {
          + action     = "CLIPBOARD_COPY_FROM_LOCAL_DEVICE"
          + permission = "ENABLED"
        }
      + user_settings {
          + action     = "CLIPBOARD_COPY_TO_LOCAL_DEVICE"
          + permission = "ENABLED"
        }
      + user_settings {
          + action     = "DOMAIN_PASSWORD_SIGNIN"
          + permission = "ENABLED"
        }
      + user_settings {
          + action     = "DOMAIN_SMART_CARD_SIGNIN"
          + permission = "DISABLED"
        }
      + user_settings {
          + action     = "FILE_DOWNLOAD"
          + permission = "ENABLED"
        }
      + user_settings {
          + action     = "FILE_UPLOAD"
          + permission = "ENABLED"
        }
      + user_settings {
          + action     = "PRINTING_TO_LOCAL_DEVICE"
          + permission = "ENABLED"
        }
    }

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

As you can see, the plan phase succeeds.

@justinretzolk
Copy link
Member

Hey @thebriankeys 👋 Thank you for taking the time to raise this! As mentioned above, it looks like this was resolved in later versions of the AWS Provider, once the AWS Go SDK version was updated. With that in mind, and since we haven't heard back, I'm going to close this issue.

If you experience any further issues, please do let us know!

Copy link

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot removed the needs-triage Waiting for first response or review from a maintainer. label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. service/appstream Issues and PRs that pertain to the appstream service.
Projects
None yet
Development

No branches or pull requests

3 participants