{"id":15176598,"url":"https://github.com/ahmadnassri/action-terraform-cloud-api","last_synced_at":"2026-02-16T15:03:31.859Z","repository":{"id":191987817,"uuid":"686100573","full_name":"ahmadnassri/action-terraform-cloud-api","owner":"ahmadnassri","description":"fetch data from the Terraform Cloud API, make it available as outputs","archived":false,"fork":false,"pushed_at":"2025-02-19T21:47:19.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-11T17:44:00.033Z","etag":null,"topics":["actions","api","terraform"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahmadnassri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["ahmadnassri"]}},"created_at":"2023-09-01T18:39:47.000Z","updated_at":"2025-02-19T21:47:23.000Z","dependencies_parsed_at":"2025-10-05T18:34:46.916Z","dependency_job_id":null,"html_url":"https://github.com/ahmadnassri/action-terraform-cloud-api","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"4604a103e4c851a05f9b33b7f9d1b38b61bd2ab2"},"previous_names":["ahmadnassri/action-terraform-cloud-api"],"tags_count":11,"template":false,"template_full_name":"ahmadnassri/template-action-composite","purl":"pkg:github/ahmadnassri/action-terraform-cloud-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadnassri%2Faction-terraform-cloud-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadnassri%2Faction-terraform-cloud-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadnassri%2Faction-terraform-cloud-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadnassri%2Faction-terraform-cloud-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmadnassri","download_url":"https://codeload.github.com/ahmadnassri/action-terraform-cloud-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadnassri%2Faction-terraform-cloud-api/sbom","scorecard":{"id":172005,"data":{"date":"2025-08-11","repo":{"name":"github.com/ahmadnassri/action-terraform-cloud-api","commit":"9fecadddead75110150a0a2569b2d5998d703fa0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/14 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/pull_request_target.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/ahmadnassri/action-terraform-cloud-api/pull_request_target.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/push.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/ahmadnassri/action-terraform-cloud-api/push.yml/master?enable=pin","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/push.yml:18","Warn: jobLevel 'statuses' permission set to 'write': .github/workflows/push.yml:19","Warn: jobLevel 'packages' permission set to 'write': .github/workflows/push.yml:20","Info: topLevel permissions set to 'read-all': .github/workflows/pull_request_target.yml:9","Info: topLevel permissions set to 'read-all': .github/workflows/push.yml:11"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}}]},"last_synced_at":"2025-08-16T16:48:07.658Z","repository_id":191987817,"created_at":"2025-08-16T16:48:07.658Z","updated_at":"2025-08-16T16:48:07.658Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29510525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","api","terraform"],"created_at":"2024-09-27T13:21:39.434Z","updated_at":"2026-02-16T15:03:31.836Z","avatar_url":"https://github.com/ahmadnassri.png","language":"Shell","funding_links":["https://github.com/sponsors/ahmadnassri"],"categories":[],"sub_categories":[],"readme":"# Action: Terraform Cloud API\n\nFetch data from the Terraform Cloud API, make it available as outputs\n\n[![license][license-img]][license-url]\n[![release][release-img]][release-url]\n\n## Why\n\n## Usage\n\n``` yaml\njobs:\n  job:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v3\n\n      # read workspace information from .terraform/terraform.tfstate file\n      - id: terraform\n        uses: ahmadnassri/action-terraform-cloud-api@v1\n        with:\n          token: ${{ secrets.TERRAFORM_TOKEN }}\n\n      # specify organization and workspace\n      - id: terraform\n        uses: ahmadnassri/action-terraform-cloud-api@v1\n        with:\n          token: ${{ secrets.TERRAFORM_TOKEN }}\n          organization: foobar\n          workspace: my-project\n\n      # check if workspace is locked before attempting a run\n      - if: steps.terraform.outputs.workspace_locked == 'true'\n        run: echo \"workspace is locked!\"\n\n      # fetch information\n      - run: |\n        echo ${{ steps.terraform.outputs.workspace_locked }}\n        echo ${{ steps.terraform.outputs.workspace_run_failures }}\n        echo ${{ steps.terraform.outputs.workspace_terraform_version }}\n        echo ${{ steps.terraform.outputs.organization_is_in_degraded_mode }}\n        echo ${{ steps.terraform.outputs.organization_managed_resource_count }}\n\n      # advanced usage example:\n      - run: |\n        echo ${{ steps.terraform.outputs.organization_json }}\" | jq '.external-id, .name, .created-at'\n```\n\n## Inputs\n\n| Input          | Required | Default                        | Description                   |\n|----------------|----------|--------------------------------|-------------------------------|\n| `token`        | ✔️       | `N/A`                          | the Terraform Cloud API Token |\n| `state`        | ❌       | `.terraform/terraform.tfstate` | Path to terraform state file  |\n| `organization` | ❌       | `github.repository_owner`      | Terraform Cloud Org name      |\n| `workspace`    | ❌       | `-`                            | Workspace name                |\n\n\u003e **NOTE**  \n\u003e if `organization` \u0026 `workspace` are not provided, the action will attempt to read the info from the terraform state file\n\n## Outputs\n\n| Property                                         | Description                                    |\n|--------------------------------------------------|------------------------------------------------|\n| **`workspace_json`**                             | `{ ... }` full JSON object of the workspace    |\n| **`workspace_allow_destroy_plan`**               | `true`                                         |\n| **`workspace_auto_apply`**                       | `false`                                        |\n| **`workspace_auto_destroy_at`**                  | `null`                                         |\n| **`workspace_auto_destroy_status`**              | `null`                                         |\n| **`workspace_environment`**                      | `default`                                      |\n| **`workspace_locked`**                           | `false`                                        |\n| **`workspace_name`**                             | `github`                                       |\n| **`workspace_queue_all_runs`**                   | `false`                                        |\n| **`workspace_speculative_enabled`**              | `true`                                         |\n| **`workspace_structured_run_output_enabled`**    | `false`                                        |\n| **`workspace_terraform_version`**                | `1.3.6`                                        |\n| **`workspace_working_directory`**                | ` `                                            |\n| **`workspace_global_remote_state`**              | `false`                                        |\n| **`workspace_updated_at`**                       | `2023-09-01T18:40:06.586Z`                     |\n| **`workspace_resource_count`**                   | `428`                                          |\n| **`workspace_apply_duration_average`**           | `null`                                         |\n| **`workspace_plan_duration_average`**            | `null`                                         |\n| **`workspace_policy_check_failures`**            | `null`                                         |\n| **`workspace_run_failures`**                     | `null`                                         |\n| **`workspace_workspace_kpis_runs_count`**        | `null`                                         |\n| **`workspace_latest_change_at`**                 | `2023-09-01T18:40:06.108Z`                     |\n| **`workspace_operations`**                       | `false`                                        |\n| **`workspace_execution_mode`**                   | `local`                                        |\n| **`workspace_vcs_repo`**                         | `null`                                         |\n| **`workspace_vcs_repo_identifier`**              | `null`                                         |\n| **`workspace_description`**                      | `null`                                         |\n| **`workspace_file_triggers_enabled`**            | `false`                                        |\n| **`workspace_assessments_enabled`**              | `false`                                        |\n| **`workspace_last_assessment_result_at`**        | `null`                                         |\n| **`workspace_source`**                           | `tfe-ui`                                       |\n| **`workspace_source_name`**                      | `null`                                         |\n| **`workspace_source_url`**                       | `null`                                         |\n| **`organization_json`**                          | `{ ... }` full JSON object of the organization |\n| **`organization_external_id`**                   | `org-va2BrNsb8Q3ap2CP`                         |\n| **`organization_created_at`**                    | `2020-07-02T15:56:55.593Z`                     |\n| **`organization_email`**                         | `foo@bar.com`                                  |\n| **`organization_session_timeout`**               | `null`                                         |\n| **`organization_session_remember`**              | `null`                                         |\n| **`organization_collaborator_auth_policy`**      | `password`                                     |\n| **`organization_plan_expired`**                  | `false`                                        |\n| **`organization_plan_expires_at`**               | `null`                                         |\n| **`organization_plan_is_trial`**                 | `false`                                        |\n| **`organization_plan_is_enterprise`**            | `false`                                        |\n| **`organization_plan_identifier`**               | `free_standard`                                |\n| **`organization_cost_estimation_enabled`**       | `false`                                        |\n| **`organization_managed_resource_count`**        | `690`                                          |\n| **`organization_allow_force_delete_workspaces`** | `true`                                         |\n| **`organization_assessments_enforced`**          | `false`                                        |\n| **`organization_is_in_degraded_mode`**           | `true`                                         |\n| **`organization_name`**                          | `foobar`                                       |\n| **`organization_saml_enabled`**                  | `false`                                        |\n| **`organization_fair_run_queuing_enabled`**      | `false`                                        |\n| **`organization_owners_team_saml_role_id`**      | `null`                                         |\n| **`organization_two_factor_conformant`**         | `true`                                         |\n\n----\n\u003e Author: [Ahmad Nassri](https://www.ahmadnassri.com/) \u0026bull;\n\u003e Twitter: [@AhmadNassri](https://twitter.com/AhmadNassri)\n\n[license-url]: LICENSE\n[license-img]: https://badgen.net/github/license/ahmadnassri/action-terraform-cloud-api\n\n[release-url]: https://github.com/ahmadnassri/action-terraform-cloud-api/releases\n[release-img]: https://badgen.net/github/release/ahmadnassri/action-terraform-cloud-api\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmadnassri%2Faction-terraform-cloud-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmadnassri%2Faction-terraform-cloud-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmadnassri%2Faction-terraform-cloud-api/lists"}