Skip to main content

Support outputs from multiple stacks to the same input in a downstream stack

I’d like to be able to configure multiple outputs to share an input in a downstream stack. For example.

Stack A - Output: ecr_role
Stack B - Output: codecommit_role
…

Stack X - Inputs: [ecr_role, codecommit_role] → allowed_roles

Workaround
No
Problem
Status: ⬆️ Gathering votes4 comments

Log in to comment and vote

Comments4

  • Rose Exoplanet

    •

    Jun 30

    Hello totally agree with my colleague Blue Brownie, if spacelift claims to be purely dynamic adding dependancies between stacks/policies to handle diamond structure dependancies, this is a must have.

  • Black Breeze

    •

    Jan 29

    Hey @Geoff Lancaster, thanks for raising this.

    Would something like this work for you?

    variable "ecr_role" { type = string } // comes from one stack
    variable "codecommit_role" { type = string } // comes from another stack
    
    locals {
     allowed_roles = [var.ecr_role, var.codecommit_role]
    }

    If not, can you please elaborate what’s missing in this simplistic solution to make your use case work?