-
Notifications
You must be signed in to change notification settings - Fork 156
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
TF-5569 add support for custom project permissions #983
TF-5569 add support for custom project permissions #983
Conversation
0c74055
to
ef04961
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.
First off awesome work @rberecka -- This code has my approval ✅ , but I have not yet smoke tested. I'd like to test how this resource responds to drift.
Can't approve nor merge until go.mod
points to a go-tfe release.
* Add customizable project level permissions in dataSourceTFETeamProjectAccess * Add customizable project level permission in resourceTFETeamProjectAccess Custom project access permissions allow setting various customizable permissions at the project level and permissions that are applied to all workspaces in a project.
04de038
to
75e20f5
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.
🚀 We can always clean up the changelog upon release. Can you squash the commits when you merge?
Co-authored-by: Sebastian Rivera <[email protected]>
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.
Double 🚀
Description
With the release of customizable project permissions in TFC, we want people to be able to do use the new permissions in their terraform configs as well. There are two types of customizable permissions that can be set on team_projects,
project_access
which control access to certain abilities on the project itself as well asworkspace_access
permissions which effect all workspaces inside of the project.This pr:
workspace_access
andproject_access
permissions.workspace_access
andproject_access
permissions. This is done by using a CustomizeDiff Function: checkForCustomPermissions. Due to some limitations to GetChange and GetOk (if it doesn't exist in the config, but still exists in state -- the permission attributes didn't show up as empty) I had to also use the RawConfig function which returns acty.Value
that I could scoop the actual value of the attribute from the actual config being processed for update.Update the Change Log_
Update the Documentation_
Testing plan
Example main.tf
access: "custom"
and custom permissions set.access
toread
with theproject_access
andworkspace_access
sets that you get an erroraccess
toread
, remove theproject_access
andworkspace_access
sections, that you can successfully apply the update. The values of the permissions in the state file should also be updated to match the implied permissions (easiest way to see that working is to update again toadmin
access -- you should then see permissions to do ALL the things v.s. what you see for read, but you can also check the docs for those)External links
Output from acceptance tests
Example outputs from plans/applies
Here's the output of a create plan & apply
Example state of from team_project_access data_source:
Docs update Preview