-
Notifications
You must be signed in to change notification settings - Fork 159
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
Add support for the custom project variable set permission #1565
Conversation
f8200e2
to
7d32e18
Compare
7d32e18
to
c484634
Compare
@@ -26,7 +25,7 @@ func TestAccTFETeamProjectAccess(t *testing.T) { | |||
CheckDestroy: testAccCheckTFETeamProjectAccessDestroy, | |||
Steps: []resource.TestStep{ | |||
{ | |||
Config: testAccTFETeamProjectAccess(rInt, access), | |||
Config: testAccTFETeamProjectAccess(rand.New(rand.NewSource(time.Now().UnixNano())).Int(), access), |
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 made this change because it otherwise wasn't passing for me locally. It would fail because the organization name (which is based on this random integer) already exists from the previous test case run.
Not sure why it was failing locally but not in CI, though! The change seemed simple enough that I didn't bother digging any further.
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.
Weird, seems like the cleanup call has time to finish in CI but not locally. In any case this change is fine with me.
@@ -157,7 +157,7 @@ func (r *resourceTFEStack) Create(ctx context.Context, req resource.CreateReques | |||
|
|||
options := tfe.StackCreateOptions{ | |||
Name: plan.Name.ValueString(), | |||
VCSRepo: &tfe.StackVCSRepo{ | |||
VCSRepo: &tfe.StackVCSRepoOptions{ |
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.
This change was required as part of updating go-tfe to 1.74.0.
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.
Changes are looking good! Feel free to merge when GA
workspace_access { | ||
state_versions = "write" | ||
sentinel_mocks = "read" | ||
runs = "apply" |
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.
nit: spacing
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.
Looking good!
c484634
to
c722cb2
Compare
Rebased to fix merge conflict with changelog and fixed a few spacing/formatting issues while I was at it. No changes otherwise. |
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.
Tested it out locally, works great! 👍
c722cb2
to
14a92c6
Compare
Rebased to fix merge conflicts with |
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.
👍
Description
This PR adds
variable_sets
to theproject_access
oftfe_team_project_access
, allowing users to set the project variable set permission of a team when access is set tocustom
.This feature has not been released to GA yet, so I've labeled it as do not merge for now.
Remember to:
Testing plan
variable_sets
.variable_sets
variable_sets
is set to the expected value.Setting the new permission
Output from acceptance tests
Output from Documentation Preview
The doc-preview tool doesn't seem to support markdown tables, which is why the formatting looks off here.
![Screenshot 2025-01-13 at 10 44 46 AM](https://private-user-images.githubusercontent.com/3768460/403093089-26ead118-3100-4d3c-9f6e-cc632cd66ed2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMDAxOTUsIm5iZiI6MTczOTE5OTg5NSwicGF0aCI6Ii8zNzY4NDYwLzQwMzA5MzA4OS0yNmVhZDExOC0zMTAwLTRkM2MtOWY2ZS1jYzYzMmNkNjZlZDIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMTUwNDU1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NmEzNTRkNjcxMzAzZjU3ZDMxY2Q2NzI1MDYwNmI4NjhhNTk2NmVhNzYwYTNmZjhhMTVlNzdjODZkY2ZiYTI5MSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.Zd6I494DCw3feH84sY_PFwLGm7LU_Gy6oslDjcDEYC4)
![Screenshot 2025-01-13 at 10 45 06 AM](https://private-user-images.githubusercontent.com/3768460/403093134-28a649ec-5916-4470-80ce-9688a735835d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMDAxOTUsIm5iZiI6MTczOTE5OTg5NSwicGF0aCI6Ii8zNzY4NDYwLzQwMzA5MzEzNC0yOGE2NDllYy01OTE2LTQ0NzAtODBjZS05Njg4YTczNTgzNWQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMTUwNDU1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODYwZThkMzZlNmI0MTZiMjZlMmRjMDJjYzMzZTI4NGU5NmFiMmY2MDQ0ZDA0YjA4N2Y4ZTc5YWRhY2U2NTY1YyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.abEwZ0THEO1jhCjDGmYG0wN1Z-xJNBENsxBfJve-Byo)