-
Notifications
You must be signed in to change notification settings - Fork 160
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
feat: Data source for workspace tags in an organization #773
feat: Data source for workspace tags in an organization #773
Conversation
@rhughes1 Hi Ryan! Thank you for your valuable contribution. I have try out your changes, and so far they look good. One of my colleagues was suggesting that you rename one of the tag attributes. What do you think of changing |
I kept it to |
@uturunku1 I updated the |
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.
I smoke tested this and it worked as expected. Let me know what you think! Thanks again
…hes1/terraform-provider-tfe into rhughes1-data-source-workspace-tags
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.
Hey, sorry for not getting feedback the last couple of days. We had some issues with our test infrastructure due to some internal tooling upgrades.
When I run your new test, I get the following error. Can you replicate this?
$ TESTARGS="-run TestAccTFEOrganizationTagsDataSource_basic" make testacc
TF_ACC=1 TF_LOG_SDK_PROTO=OFF go test $(go list ./... |grep -v 'vendor') -v -run TestAccTFEOrganizationTagsDataSource_basic -timeout 15m
? github.com/hashicorp/terraform-provider-tfe [no test files]
=== RUN TestAccTFEOrganizationTagsDataSource_basic
data_source_organization_tags_test.go:16: Step 1/1 error: Check failed: 1 error occurred:
* Check 2/2 error: data.tfe_organization_tags.foobar: list or set attribute 'tags' must be checked by element count key (tags.#) or element value keys (e.g. tags.0). Set element value checks should use TestCheckTypeSet functions instead.
--- FAIL: TestAccTFEOrganizationTagsDataSource_basic (26.97s)
FAIL
FAIL github.com/hashicorp/terraform-provider-tfe/tfe 27.304s
? github.com/hashicorp/terraform-provider-tfe/version [no test files]
FAIL
make: *** [testacc] Error 1
@brandonc I modified the tests so that it's specifically looking at the attributes being set within the |
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.
Nice! Thanks!
Description
This is a new data source is meant to retrieve all the workspace tags for a given organization. With this new data source, we can get the ID, name, and instance count for the organization.
Testing plan
foo
andbar
)foo
andtest
)tags
attribute, we should see something likeDoc Preview:
External links