Hello everyone,
I’m new to TF and I’m trying to learn about working with APIs - I have a few .json files for setting up some variables and I want to apply a run in the end.
The error I’m getting is a 404: {“errors”:[“Not found”],“success”:false}
I cannot seem to see why that is.
I referred to the following TF documentation:
And here’s an example of my attempt to create a variable:
curl
–header “Authorization: Bearer $TOKEN”
–header “Content-Type: application/vnd.api+json”
–request POST
–data @var-placeholder.json
“https://app.terraform.io/api/v2/organizations/$ORG/workspaces/hashicat-aws”
According to the documentation the parameter for my POST should be /workspaces/:workspace_id/vars so I tried addint “/vars” too.
The value of $ORG is correct but I also tried using the value directly in the curl.
All my attempts fail with the same error.
If needed I can also paste the curl verbose output.
I’m sure the issue here must be a silly one yet I cannot seem to fix it.
I really appreciate your help.
Thank you and cheers!
Radu