diff --git a/README.md b/README.md index 1869754c..88f31539 100644 --- a/README.md +++ b/README.md @@ -164,7 +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) | +| 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) | diff --git a/docs/api-coverage.md b/docs/api-coverage.md new file mode 100644 index 00000000..ca61d9b7 --- /dev/null +++ b/docs/api-coverage.md @@ -0,0 +1,115 @@ +# 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.`. 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 + +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 + +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 | +|---|---| +| Site-admin | TFE site-admin endpoints (admin organizations, users, runs, workspaces, Terraform / OPA / Sentinel versions). Not part of the public HCP Terraform API. |