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

r/workspaces_directory - add attributes + fix tags #13089

Merged
merged 6 commits into from
May 5, 2020

Conversation

DrFaust92
Copy link
Collaborator

@DrFaust92 DrFaust92 commented Apr 29, 2020

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

Closes #13070

Release note for CHANGELOG:

resource_aws_workspaces_directory: add attributes for `workspace_security_group_id`, `iam_role_id`, `registration_code`, `directory_name`, `directory_type`, `customer_user_name`, `alias`, `ip_group_ids` and `dns_ip_addresses`
resource_aws_workspaces_directory: fix tagging

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAwsWorkspacesDirectory'
    --- PASS: TestAccAwsWorkspacesDirectory/basic (837.91s)
    --- PASS: TestAccAwsWorkspacesDirectory/disappears (673.38s)
    --- PASS: TestAccAwsWorkspacesDirectory/subnetIds (682.54s)
    --- PASS: TestAccAwsWorkspacesDirectory/tags (837.28s)

@DrFaust92 DrFaust92 requested a review from a team April 29, 2020 21:01
@ghost ghost added size/L 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. documentation Introduces or discusses updates to documentation. labels Apr 29, 2020
@DrFaust92
Copy link
Collaborator Author

@ewbankkit , i've created a separate tags test case and noticed that tags aren't removed properly only added.
i think it has got to do with the code here: https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/internal/keyvaluetags/workspaces_tags.go#L35

i think its missing some diff logic and actually remove those tags.

thoughts?

@ewbankkit
Copy link
Contributor

@DrFaust92 I think you're correct, if my comment

// https://docs.aws.amazon.com/workspaces/latest/api/API_CreateTags.html
// "If you want to add new tags to a set of existing tags, you must submit all of the existing tags along with the new ones."
// This doesn't in fact seem to be correct..

is right.
There is discussion in #11645 that may be relevant, and maybe do some testing with #13039?

@DrFaust92 DrFaust92 changed the title [WIP]r/workspaces_directory - add attributes [WIP]r/workspaces_directory - add attributes + fix tags Apr 30, 2020
@DrFaust92 DrFaust92 changed the title [WIP]r/workspaces_directory - add attributes + fix tags r/workspaces_directory - add attributes + fix tags Apr 30, 2020
@DrFaust92
Copy link
Collaborator Author

generating the workspaces tagging func with the internal keyvalues package seems to have fixed it.

i'll open a follow up to amend tests for other workspaces resources (spoiler, I tested it for the other ones first because it took less time to run an validate)

@ewbankkit
Copy link
Contributor

Verified acceptance tests:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsWorkspacesDirectory'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAwsWorkspacesDirectory -timeout 120m
=== RUN   TestAccAwsWorkspacesDirectory
=== RUN   TestAccAwsWorkspacesDirectory/subnetIds
=== RUN   TestAccAwsWorkspacesDirectory/tags
=== RUN   TestAccAwsWorkspacesDirectory/basic
=== RUN   TestAccAwsWorkspacesDirectory/disappears
--- PASS: TestAccAwsWorkspacesDirectory (2571.63s)
    --- PASS: TestAccAwsWorkspacesDirectory/subnetIds (630.31s)
    --- PASS: TestAccAwsWorkspacesDirectory/tags (663.52s)
    --- PASS: TestAccAwsWorkspacesDirectory/basic (670.33s)
    --- PASS: TestAccAwsWorkspacesDirectory/disappears (607.46s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	2571.667s

@gdavison gdavison self-assigned this May 5, 2020
@gdavison gdavison added technical-debt Addresses areas of the codebase that need refactoring or redesign. 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 May 5, 2020
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

--- PASS: TestExpandSelfServicePermissions (0.00s)
--- PASS: TestFlattenSelfServicePermissions (0.00s)
--- PASS: TestAccAwsWorkspacesDirectory (2456.83s)
--- PASS: TestAccAwsWorkspacesDirectory/tags (586.99s)
--- PASS: TestAccAwsWorkspacesDirectory/basic (705.10s)
--- PASS: TestAccAwsWorkspacesDirectory/disappears (572.86s)
--- PASS: TestAccAwsWorkspacesDirectory/subnetIds (591.88s)

@gdavison gdavison added this to the v2.61.0 milestone May 5, 2020
@gdavison gdavison merged commit 53f2060 into hashicorp:master May 5, 2020
gdavison added a commit that referenced this pull request May 6, 2020
@ghost
Copy link

ghost commented May 8, 2020

This has been released in version 2.61.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 Jun 5, 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 and limited conversation to collaborators Jun 5, 2020
@DrFaust92 DrFaust92 deleted the r/workspaces_directory branch June 23, 2020 11:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/workspaces Issues and PRs that pertain to the workspaces service. size/L Managed by automation to categorize the size of a PR. technical-debt Addresses areas of the codebase that need refactoring or redesign. 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.

resource aws_workspaces_directory should return IDs of security groups created
3 participants