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

Add maximum_length to the user_settings set within aws_appstream_stack #39078

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

EricZaporzan
Copy link

@EricZaporzan EricZaporzan commented Aug 29, 2024

Description

Allowing for the setting of maximum_length in user_settings for AppStream stacks.

Relations

N/A

References

https://aws.amazon.com/about-aws/whats-new/2024/02/amazon-appstream-2-0-controls-limiting-clipboard/

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-stack-usersetting.html#aws-properties-appstream-stack-usersetting-properties

Output from Acceptance Testing

terraform-provider-aws git:(f-aws_appstream_stack-clipboard_maximum_length) ✗ make testacc TESTS=TestAccAppStreamStack PKG=appstream
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.0 test ./internal/service/appstream/... -v -count 1 -parallel 20 -run='TestAccAppStreamStack'  -timeout 360m
=== RUN   TestAccAppStreamStack_basic
=== PAUSE TestAccAppStreamStack_basic
=== RUN   TestAccAppStreamStack_disappears
=== PAUSE TestAccAppStreamStack_disappears
=== RUN   TestAccAppStreamStack_complete
=== PAUSE TestAccAppStreamStack_complete
=== RUN   TestAccAppStreamStack_applicationSettings_basic
=== PAUSE TestAccAppStreamStack_applicationSettings_basic
=== RUN   TestAccAppStreamStack_applicationSettings_removeFromEnabled
=== PAUSE TestAccAppStreamStack_applicationSettings_removeFromEnabled
=== RUN   TestAccAppStreamStack_applicationSettings_removeFromDisabled
=== PAUSE TestAccAppStreamStack_applicationSettings_removeFromDisabled
=== RUN   TestAccAppStreamStack_withTags
=== PAUSE TestAccAppStreamStack_withTags
=== RUN   TestAccAppStreamStack_streamingExperienceSettings_basic
=== PAUSE TestAccAppStreamStack_streamingExperienceSettings_basic
=== CONT  TestAccAppStreamStack_basic
=== CONT  TestAccAppStreamStack_applicationSettings_removeFromEnabled
=== CONT  TestAccAppStreamStack_complete
=== CONT  TestAccAppStreamStack_withTags
=== CONT  TestAccAppStreamStack_disappears
=== CONT  TestAccAppStreamStack_streamingExperienceSettings_basic
=== CONT  TestAccAppStreamStack_applicationSettings_removeFromDisabled
=== CONT  TestAccAppStreamStack_applicationSettings_basic
--- PASS: TestAccAppStreamStack_basic (30.94s)
--- PASS: TestAccAppStreamStack_complete (44.58s)
--- PASS: TestAccAppStreamStack_disappears (46.18s)
--- PASS: TestAccAppStreamStack_applicationSettings_removeFromDisabled (48.62s)
--- PASS: TestAccAppStreamStack_streamingExperienceSettings_basic (50.11s)
--- PASS: TestAccAppStreamStack_withTags (66.71s)
--- PASS: TestAccAppStreamStack_applicationSettings_basic (71.05s)
--- PASS: TestAccAppStreamStack_applicationSettings_removeFromEnabled (74.68s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/appstream  79.146s
...

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull 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.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/appstream Issues and PRs that pertain to the appstream service. needs-triage Waiting for first response or review from a maintainer. labels Aug 29, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @EricZaporzan 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@justinretzolk justinretzolk 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 Aug 29, 2024
Comment on lines +200 to +203
Type: nullable.TypeNullableInt,
Optional: true,
Default: "",
ValidateFunc: nullable.ValidateTypeStringNullableIntBetween(1, 20971520),
Copy link
Author

@EricZaporzan EricZaporzan Aug 29, 2024

Choose a reason for hiding this comment

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

I've got some doubt that I approached this schema addition correctly. It appears to work as expected (acceptance tests pass) but I'd appreciate advice on whether this was the right way to implement this. Here's an example of how it looks in the Terraform state

           "user_settings": [
              {
                "action": "CLIPBOARD_COPY_FROM_LOCAL_DEVICE",
                "maximum_length": "10000",
                "permission": "ENABLED"
              },
              {
                "action": "CLIPBOARD_COPY_TO_LOCAL_DEVICE",
                "maximum_length": "1000000",
                "permission": "ENABLED"
              },
              {
                "action": "DOMAIN_PASSWORD_SIGNIN",
                "maximum_length": "",
                "permission": "ENABLED"
              },
              {
                "action": "DOMAIN_SMART_CARD_SIGNIN",
                "maximum_length": "",
                "permission": "DISABLED"
              },
              {
                "action": "FILE_DOWNLOAD",
                "maximum_length": "",
                "permission": "DISABLED"
              },
              {
                "action": "FILE_UPLOAD",
                "maximum_length": "",
                "permission": "ENABLED"
              },
              {
                "action": "PRINTING_TO_LOCAL_DEVICE",
                "maximum_length": "",
                "permission": "DISABLED"
              }
            ]

@EricZaporzan EricZaporzan marked this pull request as ready for review August 29, 2024 17:00
@EricZaporzan EricZaporzan requested a review from a team as a code owner August 29, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/appstream Issues and PRs that pertain to the appstream service. 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.

2 participants