GitLab API icon

GitLab API

Gitlab

Actions1062

Terraform_state → getApiV4ProjectsIdTerraformStateName

AI-generated

Summary

Get a Terraform state file for a GitLab project

Inputs

  • projectId (required) — The ID or URL-encoded path of the GitLab project
  • stateName (required) — The name of the Terraform state to retrieve
  • lockId — Optional Terraform state lock ID

Output shape

any

Returns the Terraform state JSON from GitLab API

Examples

Example 1: Fetch state for project 123 named 'prod'

Set projectId to '123', stateName to 'prod'

Links

Discussion