Skip to content

Commit

Permalink
fix: needs separate if
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollorion committed Jun 6, 2024
1 parent 0e1587f commit 6b0c4c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ generator:
# # Default: false
# github:
# custom_app: false
#

# # If you want spacelift to manage your state set to `true`.
# # If you want to use a third-party backend, like s3, set to `false`.
# # Default: true
Expand Down
8 changes: 6 additions & 2 deletions spacemk/templates/base.tf.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,12 @@ resource "spacelift_stack" "{{ stack._relationships.space._migration_id }}_{{ st
{{ argument("runner_image ", extra_vars.custom_terraform_runner_image ~ ":" ~ stack.terraform.version, required=True) }}
{% endif %}

{% if stack.vcs.provider == "github_custom" and generation_config.github.custom_app %}
{% if stack.vcs.provider == "github_custom" %}
{% if generation_config.github.custom_app %}
github_enterprise {
{{ argument("namespace", stack.vcs.namespace) }}
}
{% endif %}
{% elif stack.vcs.provider %}
{{ stack.vcs.provider }} {
{{ argument("namespace", stack.vcs.namespace) }}
Expand Down Expand Up @@ -260,11 +262,13 @@ resource "spacelift_module" "{{ module._relationships.space._migration_id }}_{{
{{ argument("terraform_provider", module.terraform_provider) }}
{% block module_arguments_extra scoped %}{% endblock %}

{% if module.vcs.provider == "github_custom" and generation_config.github.custom_app %}
{% if module.vcs.provider == "github_custom" %}
{% if generation_config.github.custom_app %}
github_enterprise {
{{ argument("namespace", module.vcs.namespace) }}
}
{% endif %}
{% endif %}
}
{% block module_extra scoped %}{% endblock %}
{% endif %}
Expand Down

0 comments on commit 6b0c4c9

Please sign in to comment.