Skip to content

feat: add organization tags API (list, add_workspaces, delete) with m…#146

Merged
isivaselvan merged 11 commits into
hashicorp:next-1.0.0from
NimishaShrivastava-dev:feature/org-tags-api-specs
May 21, 2026
Merged

feat: add organization tags API (list, add_workspaces, delete) with m…#146
isivaselvan merged 11 commits into
hashicorp:next-1.0.0from
NimishaShrivastava-dev:feature/org-tags-api-specs

Conversation

@NimishaShrivastava-dev

Copy link
Copy Markdown
Contributor

Summary

This PR adds support for Organization Tags APIs, aligned with the go-tfe implementation.

Changes

  • Implemented OrganizationTags resource with the following methods:

    • list() – List all tags within an organization
    • add_workspaces() – Associate a workspace with a tag
    • delete() – Delete tags from an organization
  • Added corresponding models:

    • OrganizationTag
    • OrganizationTagsList
    • OrganizationTagsListOptions
    • OrganizationTagsDeleteOptions
    • AddWorkspacesToTagOptions
  • Updated client to include organization_tags service

  • Added example (examples/organization_tags.py) demonstrating:

    • Listing organization tags
    • Associating a workspace with a tag
    • Deleting a tag

Testing

  • Verified functionality using existing tags in prab-sandbox01
  • Successfully tested:
    • Listing organization tags
    • Associating a workspace to a tag
    • Deleting a tag

Example output:
image
image
image

@NimishaShrivastava-dev NimishaShrivastava-dev requested a review from a team as a code owner May 7, 2026 07:40
Comment thread src/pytfe/client.py
Comment thread src/pytfe/resources/organization_tags.py Outdated
Comment thread src/pytfe/models/organization_tags.py Outdated
Comment thread src/pytfe/resources/organization_tags.py Outdated

@isivaselvan isivaselvan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@isivaselvan isivaselvan merged commit d38d548 into hashicorp:next-1.0.0 May 21, 2026
11 checks passed
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