Skip to content

Conversation

gautambaghel
Copy link
Member

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.

  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.

  • If applicable, I've documented the impact of any changes to security controls.

    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

@gautambaghel gautambaghel requested a review from a team as a code owner September 16, 2025 00:36
@gautambaghel
Copy link
Member Author

list_workspace_variables

request

{
"terraform_org_name": "<<tf_org_name>>",
"workspace_name": "<<tf_workspace_name>>",
"page": "",
"pageSize": ""
}

response

{
  "data": [
    {
      "type": "vars",
      "id": "var-5HMT3yZgKt8zXyKm",
      "attributes": {
        "category": "terraform",
        "description": "",
        "hcl": false,
        "key": "public_ssh_key",
        "sensitive": true,
        "value": "",
        "version-id": "58b040512cfc5e82430a06f93962a410bf11fd3125da71f7a4e6060636a29217"
      },
      "relationships": {
        "configurable": {
          "data": {
            "type": "workspaces",
            "id": "ws-RyzSD5gWoLGZP9Ek"
          }
        }
      }
    }
  ],
  "included": [
    {
      "type": "workspaces",
      "id": "ws-RyzSD5gWoLGZP9Ek",
      "attributes": {
        "actions": null,
        "allow-destroy-plan": false,
        "apply-duration-average": 0,
        "assessments-enabled": false,
        "auto-apply": false,
        "auto-apply-run-trigger": false,
        "can-queue-destroy-plan": false,
        "description": "",
        "environment": "",
        "execution-mode": "",
        "file-triggers-enabled": false,
        "global-remote-state": false,
        "inherits-project-auto-destroy": false,
        "locked": false,
        "migration-environment": "",
        "name": "",
        "no-code-upgrade-available": false,
        "operations": false,
        "permissions": null,
        "plan-duration-average": 0,
        "policy-check-failures": 0,
        "queue-all-runs": false,
        "resource-count": 0,
        "run-failures": 0,
        "setting-overwrites": null,
        "source": "",
        "source-name": "",
        "source-url": "",
        "speculative-enabled": false,
        "structured-run-output-enabled": false,
        "tag-names": null,
        "terraform-version": "",
        "trigger-patterns": null,
        "trigger-prefixes": null,
        "vcs-repo": null,
        "working-directory": "",
        "workspace-kpis-runs-count": 0
      },
      "relationships": {
        "agent-pool": {
          "data": null
        },
        "current-run": {
          "data": null
        },
        "current-state-version": {
          "data": null
        },
        "effective-tag-bindings": {
          "data": []
        },
        "organization": {
          "data": null
        },
        "outputs": {
          "data": []
        },
        "project": {
          "data": null
        },
        "ssh-key": {
          "data": null
        },
        "tag-bindings": {
          "data": []
        },
        "tags": {
          "data": []
        },
        "vars": {
          "data": []
        }
      }
    }
  ]
}

@gautambaghel
Copy link
Member Author

create_workspace_variable

request

{
  "category": "terraform",
  "description": "var description",
  "hcl": true,
  "key": "<<key_name>>",
  "sensitive": false,
  "terraform_org_name": "<<tf_org_name>>",
  "value": "<<var_value>>",
  "workspace_name": "<<tf_workspace_name>>"
}

response

Created variable az_region with ID var-2ZmihDE41fSuE5jz

@gautambaghel
Copy link
Member Author

update_workspace_variable

request

{
  "description": "new description",
  "hcl": true,
  "key": "new asd",
  "sensitive": false,
  "terraform_org_name": "tfc-integration-sandbox",
  "value": "new zxc",
  "variable_id": "var-3vgzTAbbHqPLZJNC",
  "workspace_name": "azure-workspace01"
}

response

Updated variable new_asd with ID var-3vgzTAbbHqPLZJNC

@gautambaghel gautambaghel changed the title Feature/VariableSet Variables Feature/Variables Sep 19, 2025
@gautambaghel gautambaghel merged commit fc03634 into main Sep 19, 2025
32 checks passed
@gautambaghel gautambaghel deleted the workspace_variables branch September 19, 2025 10:44
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