From 4148b5a0ae0f62da17917c9ddbb35b50afaeb6a9 Mon Sep 17 00:00:00 2001 From: Prabuddha Chakraborty Date: Mon, 15 Jun 2026 19:27:15 +0530 Subject: [PATCH 1/4] add api coverage completeness doc --- docs/api-coverage.md | 103 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 docs/api-coverage.md diff --git a/docs/api-coverage.md b/docs/api-coverage.md new file mode 100644 index 00000000..e69709f1 --- /dev/null +++ b/docs/api-coverage.md @@ -0,0 +1,103 @@ +# pytfe API Coverage + +This document tracks which HCP Terraform / Terraform Enterprise API resources are +implemented in pytfe. Each implemented resource is exposed on the client as +`client.`. + +**Legend:** โœ… Covered  ยท  ๐ŸŸก Partial  ยท  โŒ Not yet implemented + +pytfe implements **61 resource namespaces**. The resources still missing or +partially covered are listed at the bottom of this page. + +## Covered resources + +| Domain | Resource | Client namespace | Status | +|---|---|---|---| +| Organizations & access | Organizations | `client.organizations` | โœ… | +| | Organization memberships | `client.organization_memberships` | โœ… | +| | Organization tags | `client.organization_tags` | โœ… | +| | Organization tokens | `client.organization_tokens` | โœ… | +| | Organization token TTL policies | `client.organization_token_ttl_policies` | โœ… | +| | Organization audit configuration | `client.organization_audit_configurations` | โœ… | +| | Teams | `client.teams` | โœ… | +| | Team tokens | `client.team_tokens` | โœ… | +| | Team project access | `client.team_project_accesses` | โœ… | +| | Team workspace access | `client.team_workspace_accesses` | โœ… | +| | Users | `client.users` | โœ… | +| | SSH keys | `client.ssh_keys` | โœ… | +| Workspaces & config | Workspaces | `client.workspaces` | โœ… | +| | Workspace resources | `client.workspace_resources` | โœ… | +| | Projects | `client.projects` | โœ… | +| | Variables | `client.variables` | โœ… | +| | Variable sets | `client.variable_sets` | โœ… | +| | Variable set variables | `client.variable_set_variables` | โœ… | +| | Configuration versions | `client.configuration_versions` | โœ… | +| | Reserved tag keys | `client.reserved_tag_key` | โœ… | +| Runs & lifecycle | Runs | `client.runs` | โœ… | +| | Run events | `client.run_events` | โœ… | +| | Run triggers | `client.run_triggers` | โœ… | +| | Plans | `client.plans` | โœ… | +| | Applies | `client.applies` | โœ… | +| | Comments | `client.comments` | โœ… | +| | Query runs | `client.query_runs` | โœ… | +| | State versions | `client.state_versions` | โœ… | +| | State version outputs | `client.state_version_outputs` | โœ… | +| Policy | Policies | `client.policies` | โœ… | +| | Policy checks | `client.policy_checks` | โœ… | +| | Policy sets | `client.policy_sets` | โœ… | +| | Policy set parameters | `client.policy_set_parameters` | โœ… | +| | Policy set versions | `client.policy_set_versions` | โœ… | +| | Policy set outcomes | `client.policy_set_outcomes` | โœ… | +| | Policy evaluations | `client.policy_evaluations` | โœ… | +| Run tasks | Run tasks | `client.run_tasks` | โœ… | +| | Run task integrations | `client.run_task_integrations` | โœ… | +| | Workspace run tasks | `client.workspace_run_tasks` | โœ… | +| | Task stages | `client.task_stages` | โœ… | +| | Task results | `client.task_results` | โœ… | +| Registry & modules | Registry modules | `client.registry_modules` | โœ… | +| | Registry providers | `client.registry_providers` | โœ… | +| | Registry provider platforms | `client.registry_provider_platforms` | โœ… | +| | Registry provider versions | `client.registry_provider_versions` | โœ… | +| | No-code modules | `client.no_code_modules` | โœ… | +| Agents | Agent pools | `client.agent_pools` | โœ… | +| | Agents | `client.agents` | โœ… | +| | Agent tokens | `client.agent_tokens` | โœ… | +| VCS & integrations | OAuth clients | `client.oauth_clients` | โœ… | +| | OAuth tokens | `client.oauth_tokens` | โœ… | +| | GitHub App installations | `client.github_app_installations` | โœ… | +| Notifications | Notification configurations | `client.notification_configurations` | โœ… | +| Stacks | Stacks | `client.stacks` | โœ… | +| | Stack configurations | `client.stack_configurations` | โœ… | +| Explorer | Explorer | `client.explorer` | โœ… | +| HYOK OIDC | AWS OIDC configurations | `client.aws_oidc_configurations` | โœ… | +| | Azure OIDC configurations | `client.azure_oidc_configurations` | โœ… | +| | GCP OIDC configurations | `client.gcp_oidc_configurations` | โœ… | +| | Vault OIDC configurations | `client.vault_oidc_configurations` | โœ… | +| Admin | SAML / SCIM / SMTP / token-TTL settings | `client.admin` | โœ… | + +## Partial coverage + +| Resource | What's covered | What's missing | +|---|---|---| +| Account | ๐ŸŸก `client.users.read_current()` returns the authenticated account | Dedicated account-details / update endpoints | +| VCS | ๐ŸŸก VCS connections via `client.oauth_clients` / `client.oauth_tokens` | VCS events | +| Audit trails | ๐ŸŸก Audit streaming **configuration** via `client.organization_audit_configurations` | Reading audit-trail log entries | + +## Not yet implemented + +| Resource | Notes | +|---|---| +| Assessment results | Health-assessment reads. Model exists (`models/assessment_result.py`); no resource yet. Surfaced indirectly via `workspace.current_assessment_result`. | +| Plan exports | Sentinel mock / plan export download. Model exists (`models/plan_export.py`); no resource yet. | +| Cost estimates | Run cost-estimation reads. Model exists (`models/cost_estimate.py`); no resource yet. | +| Change requests | โŒ | +| Workspace transfers | Relocating a workspace between organizations. โŒ | +| Recoverable items | Trash / restore of soft-deleted resources. โŒ | +| Subscriptions | Organization subscription management. โŒ | +| Feature sets | โŒ | +| Billing invoices | โŒ | +| Email recipient statuses | Notification email delivery statuses. โŒ | +| VCS events | โŒ | +| TFE site-admin | Site-admin API for self-hosted TFE (admin organizations, users, runs, workspaces, Terraform versions). โŒ | +| GPG keys | Registry provider signing keys. โŒ | +| IP ranges | `/api/meta/ip-ranges`. โŒ | From e0f5ab8524f7b593a998b2697804749434d949a0 Mon Sep 17 00:00:00 2001 From: Prabuddha Chakraborty Date: Mon, 15 Jun 2026 20:35:57 +0530 Subject: [PATCH 2/4] add api coverage doc --- docs/api-coverage.md | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/docs/api-coverage.md b/docs/api-coverage.md index e69709f1..ca61d9b7 100644 --- a/docs/api-coverage.md +++ b/docs/api-coverage.md @@ -2,7 +2,9 @@ This document tracks which HCP Terraform / Terraform Enterprise API resources are implemented in pytfe. Each implemented resource is exposed on the client as -`client.`. +`client.`. This doc is updated in contrast to v1.1.0 release, and the +resource list is reconciled against the public +[HCP Terraform API documentation](https://developer.hashicorp.com/terraform/cloud-docs/api-docs). **Legend:** โœ… Covered  ยท  ๐ŸŸก Partial  ยท  โŒ Not yet implemented @@ -85,19 +87,29 @@ partially covered are listed at the bottom of this page. ## Not yet implemented +Public HCP Terraform API resources that do not yet have a pytfe client namespace: + +| Resource | Notes | +|---|---| +| Assessment results | Health-assessment reads. Model exists (`models/assessment_result.py`); surfaced indirectly via `workspace.current_assessment_result`. | +| Audit trails tokens | Auth tokens for the audit-trail streaming API. | +| Change requests | โ€” | +| Cost estimates | Run cost-estimation reads. Model exists (`models/cost_estimate.py`). | +| Feature sets | Organization feature sets. | +| GPG keys | Private Registry provider signing keys. | +| Group member roles | Team member role assignments. | +| Invoices | Organization billing invoices. | +| IP allowlists | Organization IP allowlist. | +| IP ranges | `/api/meta/ip-ranges`. | +| Metrics service tokens | Metrics endpoint service tokens. | +| Plan exports | Sentinel mock / plan-export download. Model exists (`models/plan_export.py`). | +| Subscriptions | Organization subscription management. | +| Terraform actions | Only the Run `invoke_action_addrs` field today; no dedicated resource. | +| User tokens | Personal (user) API tokens. | +| VCS events | โ€” | + +### Terraform Enterprise only (separate admin API) + | Resource | Notes | |---|---| -| Assessment results | Health-assessment reads. Model exists (`models/assessment_result.py`); no resource yet. Surfaced indirectly via `workspace.current_assessment_result`. | -| Plan exports | Sentinel mock / plan export download. Model exists (`models/plan_export.py`); no resource yet. | -| Cost estimates | Run cost-estimation reads. Model exists (`models/cost_estimate.py`); no resource yet. | -| Change requests | โŒ | -| Workspace transfers | Relocating a workspace between organizations. โŒ | -| Recoverable items | Trash / restore of soft-deleted resources. โŒ | -| Subscriptions | Organization subscription management. โŒ | -| Feature sets | โŒ | -| Billing invoices | โŒ | -| Email recipient statuses | Notification email delivery statuses. โŒ | -| VCS events | โŒ | -| TFE site-admin | Site-admin API for self-hosted TFE (admin organizations, users, runs, workspaces, Terraform versions). โŒ | -| GPG keys | Registry provider signing keys. โŒ | -| IP ranges | `/api/meta/ip-ranges`. โŒ | +| Site-admin | TFE site-admin endpoints (admin organizations, users, runs, workspaces, Terraform / OPA / Sentinel versions). Not part of the public HCP Terraform API. | From 786f9cecaaaf8c8e2eff93b0d1107803e50280ba Mon Sep 17 00:00:00 2001 From: Prabuddha Chakraborty Date: Mon, 15 Jun 2026 20:52:06 +0530 Subject: [PATCH 3/4] add to readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1869754c..88c2cbd1 100644 --- a/README.md +++ b/README.md @@ -165,6 +165,7 @@ and upstream HCP Terraform API docs. |---|---| | Configure the SDK | [Authentication](./docs/authentication.md), [Pagination](./docs/pagination.md), [Logging](./docs/LOGGING.md) | | API guides | [API index](./docs/api/index.md), [Workspaces](./docs/api/workspaces.md), [Runs/plans/applies](./docs/api/runs-plans-applies.md), [State versions](./docs/api/state-versions.md) | +| Check API coverage | [API coverage](./docs/api-coverage.md) โ€” which resources are implemented vs. the public HCP Terraform API | | Scenario guides | [API-driven run](./docs/scenarios/api-driven-run.md), [State management](./docs/scenarios/state-management.md), [Migrate workspaces and state](./docs/scenarios/migrate-workspaces-and-state.md), [Team access onboarding](./docs/scenarios/team-access-onboarding.md), [No-code provisioning](./docs/scenarios/no-code-provisioning.md), [TFE identity bootstrap](./docs/scenarios/tfe-identity-bootstrap.md), [TFE admin bootstrap](./docs/scenarios/tfe-admin-bootstrap.md), [OIDC dynamic credentials](./docs/scenarios/oidc-dynamic-credentials.md) | | Operations guides | [Troubleshooting](./docs/troubleshooting.md), [Errors](./docs/errors.md), [Terraform Enterprise](./docs/terraform-enterprise.md) | | Contribute to the SDK | [CONTRIBUTING](./docs/CONTRIBUTING.md), [ITERATORS](./docs/ITERATORS.md), [MODELS](./docs/MODELS.md), [RESOURCE](./docs/RESOURCE.md) | From 58351a3136bad8a7ee8c513fc4ea0e7d5bd9ab7e Mon Sep 17 00:00:00 2001 From: Prabuddha Chakraborty Date: Mon, 15 Jun 2026 20:54:06 +0530 Subject: [PATCH 4/4] add to readme --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 88c2cbd1..88f31539 100644 --- a/README.md +++ b/README.md @@ -164,8 +164,7 @@ and upstream HCP Terraform API docs. | Need | Start here | |---|---| | Configure the SDK | [Authentication](./docs/authentication.md), [Pagination](./docs/pagination.md), [Logging](./docs/LOGGING.md) | -| API guides | [API index](./docs/api/index.md), [Workspaces](./docs/api/workspaces.md), [Runs/plans/applies](./docs/api/runs-plans-applies.md), [State versions](./docs/api/state-versions.md) | -| Check API coverage | [API coverage](./docs/api-coverage.md) โ€” which resources are implemented vs. the public HCP Terraform API | +| API guides | [API index](./docs/api/index.md), [API coverage](./docs/api-coverage.md), [Workspaces](./docs/api/workspaces.md), [Runs/plans/applies](./docs/api/runs-plans-applies.md), [State versions](./docs/api/state-versions.md) | | Scenario guides | [API-driven run](./docs/scenarios/api-driven-run.md), [State management](./docs/scenarios/state-management.md), [Migrate workspaces and state](./docs/scenarios/migrate-workspaces-and-state.md), [Team access onboarding](./docs/scenarios/team-access-onboarding.md), [No-code provisioning](./docs/scenarios/no-code-provisioning.md), [TFE identity bootstrap](./docs/scenarios/tfe-identity-bootstrap.md), [TFE admin bootstrap](./docs/scenarios/tfe-admin-bootstrap.md), [OIDC dynamic credentials](./docs/scenarios/oidc-dynamic-credentials.md) | | Operations guides | [Troubleshooting](./docs/troubleshooting.md), [Errors](./docs/errors.md), [Terraform Enterprise](./docs/terraform-enterprise.md) | | Contribute to the SDK | [CONTRIBUTING](./docs/CONTRIBUTING.md), [ITERATORS](./docs/ITERATORS.md), [MODELS](./docs/MODELS.md), [RESOURCE](./docs/RESOURCE.md) |