-
We're migrating from Terraform Enterprise to Terrakube and our build process currently interacts with terraform enterprise to create a workspace version. This version provides an upload URL that we use to upload our code. Does terrakube provide any ability for us to upload (POST) our code? We use the "Configuration Version" of the workspace and the Direct Upload where we can post a zipped file of our code: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hello @JPatC Terrakube support some of the TFC API methods (only the ones that are used for the CLI driven workflow). I think these are the endpoints that you need: to create the configuration version. "POST /remote/tfe/v2/workspaces/{workspaceId}/configuration-versions" to upload the tar.gz file using the response property upload-url from the above method: "PUT /remote/tfe/v2/configuration-versions/{configurationid}" Those 2 entpoints are the one used in the terraform code here when running a terraform remote plan Once you have uploaded the source code using a "tar.gz" you will have to update the workspace "source" property, Terrakube does that when creating the job in this part of the code |
Beta Was this translation helpful? Give feedback.
Hello @JPatC Terrakube support some of the TFC API methods (only the ones that are used for the CLI driven workflow).
I think these are the endpoints that you need:
to create the configuration version.
"POST /remote/tfe/v2/workspaces/{workspaceId}/configuration-versions"
terrakube/api/src/main/java/org/terrakube/api/plugin/state/RemoteTfeController.java
Line 210 in 5639fec
to upload the tar.gz file using the response property upload-url from the above method:
"PUT /remote/tfe/v2/configuration-versions/{configurationid}"
terrakube/api/src/main/java/org/terraku…