It may be necessary or helpful to download a current workspace configuration version. As of Terraform Enterprise Version 202110-01, this feature is not available via the API. This feature is being explored for possible addition to the product.
A workaround is available via the RAILS console by following the steps below.
- Access the Rails console by following the steps located in this link: https://support.hashicorp.com/hc/en-us/articles/360022105574-How-To-Access-the-Terraform-Enterprise-Rails-Console
- Run the code below, replacing
<external_id>with the applicable Run ID
r = Run.find_by_external_id("run-<external_id>") slug = r.configuration_version.downloadable_slug slug_url = Archivist.internal(slug.download_url) puts slug_url.public
- You can then download the URL printed in the console with the code compressed in a tar.gz file.
Configuration version API documentation: https://www.terraform.io/docs/cloud/api/configuration-versions.html
- Terraform Enterprise Release notes: