Skip to content

Commit

Permalink
Attach AWS integration to stacks
Browse files Browse the repository at this point in the history
  • Loading branch information
jmfontaine committed Apr 25, 2024
1 parent 0b1710e commit 20b9029
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spacemk/templates/base.tf.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ resource "spacelift_stack" "{{ stack._relationships.space._migration_id }}_{{ st
{% endif %}
}

resource "spacelift_aws_integration_attachment" "{{ stack._relationships.space._migration_id }}_{{ stack._migration_id }}_aws_integration" {
{{ argument("integration_id", "spacelift_aws_integration.main[\"" ~ stack._relationships.space.name ~ "\"].id", serialize=False) }}
{{ argument("stack_id", "spacelift_stack." ~ stack._relationships.space._migration_id ~ "_" ~ stack._migration_id ~ ".id", serialize=False) }}
}

{% if stack.terraform.workflow_tool == "CUSTOM" %}
resource "spacelift_context_attachment" "{{ stack._relationships.space._migration_id }}_{{ stack._migration_id }}_terraform_workflow_tool" {
{{ argument("context_id", "spacelift_context." ~ stack._relationships.space._migration_id ~ "_terraform_workflow_tool.id", serialize=False) }}
Expand Down

0 comments on commit 20b9029

Please sign in to comment.