Hi,
I want to get the latest run for my workspace and grab its terraform state file. We are using terraform enterprise.
I did the below and I got get the payload:
https://ptfe-dev.company.com.au/api/v2/organizations/organization-name/workspaces/workspace1
I get output but information of the workspace id etc, but that is what not what I want.
With the above output, I get workspace id and I ran the query below:
However, the above query returns
orry, the page /api/v2/organizations/rganization-name/workspaces/workspace1/states/sv-DKBZ2AFoV5mwY4kP
could not be found.
This error could mean one of two things:
- The resource doesn’t exist
- The resource exists, but you do not have permission to access it
If someone has linked you to this resource, ensure that they have given you proper permissions to access it.
I can, however, access the same resource (workspace1) state file via TFE UI.
Can anyone please advise me what I am doing wrong here?