-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Refactor WorkSpaces resources to use keyvaluetags package #11645
Conversation
This comment has been minimized.
This comment has been minimized.
557f22a
to
917715d
Compare
c309487
to
17df7dd
Compare
Tested with Acceptance tests: $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsWorkspacesIpGroup_ignoreTags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAwsWorkspacesIpGroup_ignoreTags -timeout 120m
=== RUN TestAccAwsWorkspacesIpGroup_ignoreTags
=== PAUSE TestAccAwsWorkspacesIpGroup_ignoreTags
=== CONT TestAccAwsWorkspacesIpGroup_ignoreTags
--- PASS: TestAccAwsWorkspacesIpGroup_ignoreTags (37.95s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 38.002s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsWorkspacesDirectory/ignoreTags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAwsWorkspacesDirectory/ignoreTags -timeout 120m
=== RUN TestAccAwsWorkspacesDirectory
=== RUN TestAccAwsWorkspacesDirectory/ignoreTags
--- PASS: TestAccAwsWorkspacesDirectory (947.18s)
--- PASS: TestAccAwsWorkspacesDirectory/ignoreTags (947.18s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 947.249s |
@@ -140,6 +140,8 @@ func resourceAwsWorkspacesDirectoryCreate(d *schema.ResourceData, meta interface | |||
|
|||
func resourceAwsWorkspacesDirectoryRead(d *schema.ResourceData, meta interface{}) error { | |||
conn := meta.(*AWSClient).workspacesconn | |||
ignoreTags := meta.(*AWSClient).ignoreTags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ewbankkit 👋 We would prefer to not add resources/logic to the ignore_tags
preview at this time. We are finishing up a round of feedback on the functionality, so the implementation may change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bflad I was using the ignore_tags
functionality to test the claim of the CreateTags
API:
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.
by having tags that are not managed by Terraform and seeing if they get removed when updating tags via Terraform (it turns out they don't, so the API in fact doesn't overwrite any existing tags).
I'll change this PR to WIP and remove the ignore_tags
stuff.
I'll use the same approach to test the S3 object tagging functionality in #11964 but again not leave the changes in the final PR.
53546eb
to
628e34b
Compare
OK, removed the $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsWorkspacesIpGroup_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAwsWorkspacesIpGroup_ -timeout 120m
=== RUN TestAccAwsWorkspacesIpGroup_basic
=== PAUSE TestAccAwsWorkspacesIpGroup_basic
=== CONT TestAccAwsWorkspacesIpGroup_basic
--- PASS: TestAccAwsWorkspacesIpGroup_basic (44.64s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 44.684s
$ 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/basic
=== RUN TestAccAwsWorkspacesDirectory/subnetIds
--- PASS: TestAccAwsWorkspacesDirectory (1398.14s)
--- PASS: TestAccAwsWorkspacesDirectory/basic (788.30s)
--- PASS: TestAccAwsWorkspacesDirectory/subnetIds (609.84s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 1398.189s Removing WIP. |
628e34b
to
c3db6f9
Compare
c3db6f9
to
08b7d14
Compare
Rebased to remove merge conflicts. $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsWorkspacesIpGroup_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAwsWorkspacesIpGroup_ -timeout 120m
=== RUN TestAccAwsWorkspacesIpGroup_basic
=== PAUSE TestAccAwsWorkspacesIpGroup_basic
=== CONT TestAccAwsWorkspacesIpGroup_basic
--- PASS: TestAccAwsWorkspacesIpGroup_basic (45.06s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 45.101s
$ 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/basic
=== RUN TestAccAwsWorkspacesDirectory/disappears
=== RUN TestAccAwsWorkspacesDirectory/subnetIds
--- PASS: TestAccAwsWorkspacesDirectory (1847.66s)
--- PASS: TestAccAwsWorkspacesDirectory/basic (651.98s)
--- PASS: TestAccAwsWorkspacesDirectory/disappears (596.50s)
--- PASS: TestAccAwsWorkspacesDirectory/subnetIds (599.17s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 1847.706s |
… that doesn't change across update. $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsWorkspacesIpGroup_basic' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAwsWorkspacesIpGroup_basic -timeout 120m === RUN TestAccAwsWorkspacesIpGroup_basic === PAUSE TestAccAwsWorkspacesIpGroup_basic === CONT TestAccAwsWorkspacesIpGroup_basic --- PASS: TestAccAwsWorkspacesIpGroup_basic (45.42s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 45.454s
…sion. Acceptance test output: $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsWorkspacesDirectory/basic' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAwsWorkspacesDirectory/basic -timeout 120m === RUN TestAccAwsWorkspacesDirectory === RUN TestAccAwsWorkspacesDirectory/basic --- PASS: TestAccAwsWorkspacesDirectory (661.39s) --- PASS: TestAccAwsWorkspacesDirectory/basic (661.39s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 661.429s
08b7d14
to
ebfceef
Compare
Rebased to include ef098db and pass linting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks @ewbankkit 🚀
Output from acceptance testing:
--- PASS: TestAccAwsWorkspacesIpGroup_basic (14.01s)
--- PASS: TestAccAwsWorkspacesDirectory (1809.78s)
--- PASS: TestAccAwsWorkspacesDirectory/disappears (662.61s)
--- PASS: TestAccAwsWorkspacesDirectory/subnetIds (561.97s)
--- PASS: TestAccAwsWorkspacesDirectory/basic (585.20s)
This has been released in version 2.53.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! |
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! |
Community Note
Relates #10688.
Release note for CHANGELOG:
Output from acceptance testing:
WorkspacesUpdateTags
as it leads to the removal of existing tags that are unchanged* Move the custom version ofWorkspacesUpdateTags
to thekeyvaluetags/custom
directory* Includes commit from Move custom service-specific tagging functions to own namespace #11638