diff --git a/spacemk/commands/import_state_files_to_spacelift.py b/spacemk/commands/import_state_files_to_spacelift.py index db4ce0d..e0d416f 100644 --- a/spacemk/commands/import_state_files_to_spacelift.py +++ b/spacemk/commands/import_state_files_to_spacelift.py @@ -28,14 +28,14 @@ def _create_context(spacelift: Spacelift, space_id: str, token: str): TF_WORKSPACE_ID=$1 -echo 'Downloading Terraform state file' +echo "Downloading Terraform state file for workspace ${TF_WORKSPACE_ID}" STATE_DOWNLOAD_URL=$(curl --fail \ --header "Authorization: Bearer $TF_TOKEN" \ --header "Content-Type: application/vnd.api+json" \ --location \ --show-error \ --silent \ - "https://app.terraform.io/api/v2/workspaces/${TF_WORKSPACE_ID}/current-state-version" \ + "https://tfe.lucidutil.com/api/v2/workspaces/${TF_WORKSPACE_ID}/current-state-version" \ | jq -r '.data.attributes."hosted-state-download-url"' ) echo 'Pushing Terraform state file'