Skip to content

Commit

Permalink
feat: manage state
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollorion committed Jun 13, 2024
1 parent f7d86a5 commit f710f9a
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions spacemk/templates/base.tf.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -80,33 +80,19 @@ EOT
{% if stack.vcs.repository %}
resource "spacelift_stack" "{{ stack._relationships.space._migration_id }}_{{ stack._migration_id }}" {
{{ argument("auto_deploy", stack.auto_deploy, default=False) }}
{{ argument("branch", stack.vcs.branch, required=True) }}
{{ argument("branch", "spacelift", required=True) }}
{{ argument("description", stack.description) }}
{{ argument("local_preview", stack.local_preview) }}
{{ argument("labels", stack.labels) }}
{{ argument("manage_state", False) }}
{{ argument("manage_state", True) }}
{{ argument("name", stack.name, required=True) }}
{{ argument("project_root", stack.vcs.project_root) }}
{{ argument("repository", stack.vcs.repository, required=True) }}
{{ argument("slug", stack.slug, default=stack.name) }}
{{ argument("space_id", "spacelift_space." ~ stack._relationships.space._migration_id ~ ".id", serialize=False) }}
{{ argument("terraform_version", stack.terraform.version, serialize=True) }}
{{ argument("terraform_workflow_tool", stack.terraform.workflow_tool, default="TERRAFORM_FOSS") }}
{{ argument("terraform_workflow_tool", "TERRAFORM_FOSS") }}
{% block stack_arguments_extra scoped %}{% endblock %}

{% if stack.terraform.workflow_tool == "CUSTOM" %}
{{ argument("runner_image ", extra_vars.custom_terraform_runner_image ~ ":" ~ stack.terraform.version, required=True) }}
{% endif %}

{% if stack.vcs.provider == "github_custom" %}
github_enterprise {
{{ argument("namespace", stack.vcs.namespace) }}
}
{% elif stack.vcs.provider %}
{{ stack.vcs.provider }} {
{{ argument("namespace", stack.vcs.namespace) }}
}
{% endif %}
}

{% if stack.terraform.workflow_tool == "CUSTOM" %}
Expand Down

0 comments on commit f710f9a

Please sign in to comment.