Skip to content

Feature/team project access#127

Open
isivaselvan wants to merge 7 commits intonext-1.0.0from
feature/team-project-access
Open

Feature/team project access#127
isivaselvan wants to merge 7 commits intonext-1.0.0from
feature/team-project-access

Conversation

@isivaselvan
Copy link
Copy Markdown
Collaborator

@isivaselvan isivaselvan commented Apr 14, 2026

Description

Implemented Team Project Access API Specs
https://developer.hashicorp.com/terraform/cloud-docs/api-docs/project-team-access

Feature contains:

  • add() --> Add Team Access to a Project
  • read() --> Show the specific registry provider version
  • remove() --> Remove Team Access from a Project
  • list() --> List Team Access to a Project
  • update() --> Update Team Access to a Project
  • Unit test cases added at tests/units/test_team_project_access.py
  • examples added at examples/team_project_access.py

Testing plan

External links

Output from tests

Including output from tests may require access to a TFE instance. Ignore this section if you have no environment to test against.

Unit testcases

image

Output from Examples

> python examples/team_project_access.py  --operation list  --project-id prj-vhp5sKUrvy    

================================================================================
Listing team project access
================================================================================
Retrieved team project access
- id: tprj-Bzgc4AyAGwHQVqn9
- access: read
- team_id: team-Jj12dyZunir7y3We
- project_id: prj-vhp5szCtbu9KUrvy
- project_access:
  settings=read
  teams=none
  variable_sets=none
- workspace_access:
  runs=read
  sentinel_mocks=none
  state_versions=read
  variables=read
  create=False
  delete=False
  locking=False
  move=False
  run_tasks=False


> python examples/team_project_access.py --operation read --team-project-access-id tprj-Bzgc4Ayn9     

================================================================================
Reading team project access
================================================================================
Retrieved team project access
- id: tprj-Bzgc4QVqn9
- access: read
- team_id: team-Jj12ir7y3We
- project_id: prj-vhpKUrvy
- project_access:
  settings=read
  teams=none
  variable_sets=none
- workspace_access:
  runs=read
  sentinel_mocks=none
  state_versions=read
  variables=read
  create=False
  delete=False
  locking=False
  move=False
  run_tasks=False


> python examples/team_project_access.py --operation add \
  --team-id team-BUjY5y4b \
  --project-id prj-b6bLjXb \
  --access custom \
  --project-settings update \
  --project-teams manage \
  --workspace-runs plan

================================================================================
Adding team project access
================================================================================
Created team project access
- id: tprj-ZYagpoE2As3
- access: custom
- team_id: team-BUjYHX5y4b
- project_id: prj-b6besNXLjXb
- project_access:
  settings=update
  teams=manage
  variable_sets=none
- workspace_access:
  runs=plan
  sentinel_mocks=none
  state_versions=none
  variables=none
  create=False
  delete=False
  locking=False
  move=False
  run_tasks=False


> python examples/team_project_access.py --operation update --team-project-access-id tprj-ZYaoE2As3  --access custom  --workspace-run-tasks

================================================================================
Updating team project access
================================================================================
Updated team project access
- id: tprj-ZYZYoE2As3
- access: custom
- team_id: team-BUjYy4b
- project_id: prj-b6bXLjXb
- project_access:
  settings=update
  teams=manage
  variable_sets=none
- workspace_access:
  runs=plan
  sentinel_mocks=none
  state_versions=none
  variables=none
  create=False
  delete=False
  locking=False
  move=False
  run_tasks=True

> python examples/team_project_access.py --operation remove --team-project-access-id tprj-ZYaE2As3

================================================================================
Removing team project access
================================================================================
Removed team project access: tprj-ZYagpE2As3

Rollback Plan

Changes to Security Controls

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.

  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.

  • If applicable, I've documented the impact of any changes to security controls.

    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

If you have any questions, please contact your direct supervisor, GRC (#team-grc), or the PCI working group (#proj-pci-reboot). You can also find more information at PCI Compliance.

@isivaselvan isivaselvan requested a review from a team as a code owner April 14, 2026 14:34
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.

1 participant