Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Variables to the Workspace relations #872

Merged
merged 3 commits into from
Mar 21, 2024

Conversation

arybolovlev
Copy link
Contributor

Description

This PR adds Variables to the Workspace relations.

$ curl -s \
  --header "Authorization: Bearer $TFE_TOKEN" \
  --header "Content-Type: application/vnd.api+json" \
  --request GET \
"https://app.terraform.io/api/v2/workspaces/ws-XXX" | jq
    "relationships": {
      ...
      "vars": {
        "data": [
          {
            "id": "var-xh8w2W4bZJ3X4HH9",
            "type": "vars"
          },
          {
            "id": "var-PStyaxTNYWszMBoy",
            "type": "vars"
          }
        ]
      }
      ...
    }

Testing plan

N/A.

External links

Relations are purely documented in the API doc, however, vars are mentioned there one.

Output from tests

Including output from tests may require access to a TFE instance. Ignore this section if you have no environment to test against.

$ TFE_ADDRESS="https://app.terraform.io/" TFE_TOKEN="X.atlasv1.X" go test ./... -v -run TestVariablesCreate$

PASS
ok  	github.com/hashicorp/go-tfe	5.293s

@arybolovlev arybolovlev requested a review from a team as a code owner March 19, 2024 09:33
Copy link
Contributor

@Maed223 Maed223 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good 👍– only thing missing is the Changelog entry.

@arybolovlev
Copy link
Contributor Author

Code looks good 👍– only thing missing is the Changelog entry.

Added a changelog. Thank you!

@arybolovlev arybolovlev merged commit 660355c into main Mar 21, 2024
10 checks passed
@arybolovlev arybolovlev deleted the add-workspace-variables-relation branch March 21, 2024 15:08
Copy link

Reminder to the contributor that merged this PR: if your changes have added important functionality or fixed a relevant bug, open a follow-up PR to update CHANGELOG.md with a note on your changes.

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.

None yet

3 participants