Skip to content
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 Manage Membership to team organization access #801

Merged
merged 1 commit into from
Apr 24, 2023

Conversation

JarrettSpiker
Copy link
Collaborator

@JarrettSpiker JarrettSpiker commented Feb 15, 2023

Description

Allow the manage membership organization access setting to be set on teams by the provider

Testing plan

  1. New teams should have manage_membership as false
  2. If manage membership is omitted, it is set to false
  3. Manage membership can be set or unset via the provider

External links

Output from acceptance tests

TF_ACC=1 go test github.com/hashicorp/terraform-provider-tfe/tfe  -run TestAccTFETeam_ -tags=integration -v
=== RUN   TestAccTFETeam_basic
--- PASS: TestAccTFETeam_basic (6.43s)
=== RUN   TestAccTFETeam_full
--- PASS: TestAccTFETeam_full (6.27s)
=== RUN   TestAccTFETeam_full_update
--- PASS: TestAccTFETeam_full_update (13.47s)
=== RUN   TestAccTFETeam_import_byId
--- PASS: TestAccTFETeam_import_byId (6.82s)
=== RUN   TestAccTFETeam_import_byId_doesNotExist
--- PASS: TestAccTFETeam_import_byId_doesNotExist (6.74s)
=== RUN   TestAccTFETeam_import_byName
--- PASS: TestAccTFETeam_import_byName (6.87s)
=== RUN   TestAccTFETeam_import_missingOrg
--- PASS: TestAccTFETeam_import_missingOrg (6.50s)
=== RUN   TestAccTFETeam_import_missingTeam
--- PASS: TestAccTFETeam_import_missingTeam (6.58s)
=== RUN   TestAccTFETeam_import_teamNameWithSpaces
--- PASS: TestAccTFETeam_import_teamNameWithSpaces (6.88s)
=== RUN   TestAccTFETeam_import_teamNameWithSlashes
--- PASS: TestAccTFETeam_import_teamNameWithSlashes (6.97s)
=== RUN   TestAccTFETeam_import_teamNameWhichLooksLikeID
--- PASS: TestAccTFETeam_import_teamNameWhichLooksLikeID (6.95s)
PASS
ok  	github.com/hashicorp/terraform-provider-tfe/tfe	80.687s

@JarrettSpiker JarrettSpiker requested a review from a team as a code owner February 15, 2023 17:35
@JarrettSpiker JarrettSpiker marked this pull request as draft February 15, 2023 17:35
JarrettSpiker added a commit that referenced this pull request Feb 15, 2023
@JarrettSpiker JarrettSpiker force-pushed the jspiker/manage-membership-permission branch from a61ce8d to 33edd65 Compare April 12, 2023 14:18
@JarrettSpiker JarrettSpiker marked this pull request as ready for review April 12, 2023 15:00
@JarrettSpiker JarrettSpiker force-pushed the jspiker/manage-membership-permission branch from 33edd65 to 573a1d0 Compare April 20, 2023 18:16
Copy link
Member

@nfagerlund nfagerlund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All right, this looks great, and it worked fine when I tested it manually. 👍🏼 One docs typo to fix... and you'll also need a passing CI run, which is complicated by a new flaky test.

I've got a PR up to fix that, or you could just pull in the commit to this PR; I'm fine either way. Fix is merged so just rebase onto main!

Once the typo's fixed and tests are green, that's an easy ✅ from me.

@@ -54,6 +54,7 @@ The `organization_access` block supports:
* `manage_modules` - (Optional) Allow members to publish and delete modules in the organization's private registry.
* `manage_run_tasks` - (Optional) Allow members to create, edit, and delete the organization's run tasks.
* `manage_projects` - (Optional) Allow members to create and administrate all projects within the organization. Requires `manage_workspaces` to be set to `true`.
* `manage_membership` - (Optional) Allow members to add /remove users from the organization, and to add/remove users from visible teams.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* `manage_membership` - (Optional) Allow members to add /remove users from the organization, and to add/remove users from visible teams.
* `manage_membership` - (Optional) Allow members to add/remove users from the organization, and to add/remove users from visible teams.

CHANGELOG.md Outdated
@@ -5,6 +5,7 @@ BREAKING CHANGES:
FEATURES:

ENHANCEMENTS:
* `r/tfe_team`: Add attribute `manage_membership` to `organization_access` on `tfe_team` by @JarrettSpiker ([#801](https://github.com/hashicorp/terraform-provider-tfe/pull/801))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd call that a feature!

@JarrettSpiker JarrettSpiker force-pushed the jspiker/manage-membership-permission branch from 573a1d0 to 54554aa Compare April 21, 2023 13:59
Copy link
Member

@nfagerlund nfagerlund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@nfagerlund nfagerlund merged commit a7deb6f into main Apr 24, 2023
@nfagerlund nfagerlund deleted the jspiker/manage-membership-permission branch April 24, 2023 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants