Skip to content

Commit

Permalink
Merge pull request #9 from masterpointio/fix/label-merging
Browse files Browse the repository at this point in the history
fix: common labels merge with stack labels
  • Loading branch information
Gowiem authored Dec 13, 2024
2 parents 8a15724 + b9e63ae commit de4ea6f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions aqua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ packages:
- name: terraform-docs/terraform-docs@v0.18.0
- name: hashicorp/terraform@v1.9.3
- name: opentofu/opentofu@v1.8.0
- name: spacelift-io/spacectl@v1.8.0
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
stack_settings:
administrative: true
aws_integration_enabled: true
labels:
- common_label
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
stack_settings:
description: This Automation stack is used for Masterpoint's testing purposes
labels:
- stack_specific_label
3 changes: 3 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ module "deep" {
for_each = local._root_module_stack_configs
# Stack configuration will take precedence and overwrite the conflicting value from the common configuration (if any)
maps = [local._common_configs[each.value.root_module], each.value]

# To support merging labels from common.yaml, we need lists to append instead of overwrite
append_list_enabled = true
}

resource "spacelift_stack" "default" {
Expand Down

0 comments on commit de4ea6f

Please sign in to comment.