Cloudformation nested stacks by environment

16 Views Asked by At

I'm trying to selectively build some resources depending on the environment. I have 3 Github actions files called feature-pipeline.yaml, dev-pipeline.yaml and prod-pipeline.yaml. I want each to use sam build and deploy commands to build resources from a main template.yaml file as well as one of the env specific template files template-feature.yaml OR template-dev.yaml OR template-prod.yaml.

I want to do this because I want my lambdas and api gateway resources to be built similarly across environments but want VPCs and Aurora dbs to be very different in each environment.

How can I structure the output from the main template file while not knowing exactly which nested stack will be built and hence what resources will be built from it?

0

There are 0 best solutions below