-
Notifications
You must be signed in to change notification settings - Fork 161
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
Adding support for the resource_count attribute on tfe_workspace #712
Conversation
605ad37
to
432dd15
Compare
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.
Sorry if I missed this information, but what was the reason not to the use the original PR opened by the external contributor, and push your commit there? If we are merging this PR instead, would it be possible to @ the contributor to the changelog to thank him for these changes? 🙏
This PR looks good to me, thanks for adding the test!
Good questions! For go-tfe, we have a script that rebases forks and opens a new PR so we can run the tests. I wanted to make sure the test issues with the original PR were unrelated to auth problems, so I manually followed a similar process to what we're doing in go-tfe. I forgot to add the contributor to the changelog entry - I'll do that. Oh - interestingly the TFE provider changelog doesn't indicate who added PRs - do we want to start doing that? I've referenced their PR though, so perhaps that's sufficient? I added comments to the original PR to rebase and update the changelog. We had added a comment to the PR indicating that we would help with the tests, and I prefer to either give a diff suggestion or to have a separate branch instead of committing to someone else's branch (unless they explicitly OK me committing to their branch). |
CHANGELOG.md
Outdated
@@ -1,6 +1,7 @@ | |||
## Unreleased | |||
|
|||
FEATURES: | |||
* r/tfe_workspace: Add attribute `resource_count` to `tfe_workspace` ([#682](https://github.com/hashicorp/terraform-provider-tfe/pull/682)) |
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.
About your comment interestingly the TFE provider changelog doesn't indicate who added PRs - do we want to start doing that?
, yes, I think it would be nice to add the name of the external contributor, if this doesn't get added automatically 😊
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 agree with you! I'll add that.
432dd15
to
e89a2ad
Compare
Description
This PR exposes the
resource_count
attribute on thetfe_workspace
resource. This is to make it easier for users writing a Sentinel policy to prevent workspaces from being deleted prior to deleting all of the resources that belong to the given workspace. This attribute is already exposed as part of the data source call.Below is a screenshot of the documentation update on the
tfe_workspace
resource:Testing plan
This should yield a result like this:
my-workspace-name
), use the following configuration (or similar) to add resources under the control of the workspace:terraform refresh
so we can now see that theresource_count
has changed from0
to1
:External links
Output from acceptance tests