Skip to content

Commit

Permalink
feat: fix version constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollorion committed Aug 2, 2024
1 parent b99ac72 commit 080f9ae
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spacemk/exporters/terraform.py
Original file line number Diff line number Diff line change
Expand Up @@ -1285,15 +1285,15 @@ def find_workspace_variable_with_invalid_name(data: dict, workspace_id: str, typ
vcs_repository = None

terraform_version = workspace.get("attributes.terraform-version")
if terraform_version == "latest":
# KLUDGE: Stick to the latest MPL-licensed Terraform version for now
terraform_version = "1.5.7"

if semver.match(workspace.get("attributes.terraform-version"), ">=1.5.7"):
if terraform_version != "latest" and semver.match(terraform_version, ">=1.5.7"):
terraform_workflow_tool = "CUSTOM"
else:
terraform_workflow_tool = "TERRAFORM_FOSS"

if terraform_version == "latest":
# KLUDGE: Stick to the latest MPL-licensed Terraform version for now
terraform_version = "1.5.7"

if "relationships.project.data.id" in workspace:
space_id = workspace.get("relationships.project.data.id")
else:
Expand Down

0 comments on commit 080f9ae

Please sign in to comment.