Skip to content

Feature/teams#118

Open
isivaselvan wants to merge 7 commits intonext-1.0.0from
feature/teams
Open

Feature/teams#118
isivaselvan wants to merge 7 commits intonext-1.0.0from
feature/teams

Conversation

@isivaselvan
Copy link
Collaborator

@isivaselvan isivaselvan commented Mar 20, 2026

Description

Implemented Teams API Specs
https://developer.hashicorp.com/terraform/cloud-docs/api-docs/teams

Feature contains:

  • list() --> Listing all teams
  • create() --> Creating new team with options
  • read() --> Show the required team
  • update() --> update the team
  • delete() --> Delete the team
  • _team_from( --> Helper method to return the teams api response
  • Unit test cases added at tests/units/test_teams.py
  • examples added at examples/teams.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 tests

image

Examples

> python examples/team.py --org=sandbox02

================================================================================
Listing teams for organization: sandbox02
================================================================================
Options:
- page_size=20
- query=None
- names=None
- include=None

[1] Team ID: team-BU5y4b
Name: feat-team-test
Visibility: secret
Is Unified: False
User Count: 0
Allow Member Token Management: False
Organization Access:
  - manage_workspaces=False
  - read_workspaces=False
  - manage_projects=False
Permissions:
  - can_update_membership=True
  - can_destroy=True
Users included: 1
Organization memberships included: 1

[2] Team ID: team-KN6WZ
Name: owners
Visibility: secret
Is Unified: False
User Count: 0
Allow Member Token Management: True
Organization Access:
  - manage_workspaces=True
  - read_workspaces=True
  - manage_projects=True
Permissions:
  - can_update_membership=True
  - can_destroy=False
Users included: 5
Organization memberships included: 5


> python examples/team.py --org=sandbox02 --create --name=test-teams

================================================================================
Creating team in organization: prab-sandbox02
================================================================================
Created Team ID: team-vq5Zz
Name: test-teams
Visibility: secret
Allow Member Token Management: False


> python examples/team.py --org=sandbox02 --update --team-id=team-vq5Zz --visibility=organization

================================================================================
Updating team: team-vq5Zz
================================================================================
Updated Team ID: team-vq5Zz
Name: test-teams
Visibility: organization
Allow Member Token Management: False


> python examples/team.py --org=sandbox02 --read --team-id=team-vq5Zz                      

================================================================================
Reading team: team-vq5Zz
================================================================================
Team ID: team-vq5Zz
Name: test-teams
Visibility: organization
Is Unified: False
User Count: 0
Allow Member Token Management: False
Organization Access:
  - manage_workspaces=False
  - read_workspaces=False
  - manage_projects=False
Permissions:
  - can_update_membership=True
  - can_destroy=True
Users included: 0
Organization memberships included: 0


> python examples/team.py --org=prab-sandbox02 --delete --team-id=team-vqJ5Zz

================================================================================
Deleting team: team-vq5Zz
================================================================================
Deleted Team ID: team-vq5Zz

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 March 20, 2026 09:22
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