ampedandwired / bora

A Ruby command line tool and rake tasks for working with cloudformation stacks and cfndsl
MIT License
18 stars 11 forks source link

Stack Tags merging bug #38

Open starchx opened 7 years ago

starchx commented 7 years ago
  timtest:
    template_file: templates/global/alb.rb
    on_failure: DO_NOTHING
    tags:
      CostCentre: EDS
    capabilities: [CAPABILITY_IAM]
    stacks:
      qa:
        tags:
          Account: NONPROD
          Environment: QA
        params:
          Environment: QA
          AlbSchema: internal
          targetgroups:
            XXXXX:
              healthcheck_path: '/healthcheck.html'
              listenerrules:
                - priority: 100
                  conditions:
                    host-header: 'xxxxx.x.x'
      stg:
        tags:
          Account: NONPROD
          Environment: STG
        params:
          Environment: STG
          AlbSchema: internal
          targetgroups:
            XXXXX:
              healthcheck_path: '/healthcheck.html'
              listenerrules:
                - priority: 100
                  conditions:
                    host-header: 'xxxxx.x.x'

I run bora apply timtest-qa, the stack it created has Tags:

  CostCentre: EDS
  Account: NONPROD
  Environment: STG  <--- Should be QA

Based on my testing, Bora always uses the last stack Tags.

herebebogans commented 6 years ago

@starchx thanks for the bug report.

@ampedandwired #39 should fix this .. I'm not sure Marshal into a new hash is the cleanest approach though