Kotaimen / awscfncli

Friendly AWS CloudFormation CLI
MIT License
58 stars 12 forks source link

Allow for an !import to bring in blocks from other files #106

Open Vitiate opened 3 years ago

Vitiate commented 3 years ago

One of the things that we would like to do is add a git commit tag to all of our deployed resources. I feel like the easiest way to do this would be to allow for a !nclude to include files and blocks.

I would like to be able to define an inline include like so:

Version: 3 Blueprints: vpc: Order: 1 Region: us-west-2 Template: ./templates/vpc.yaml StackPolicy: ALLOW_ALL Capabilities: [CAPABILITY_IAM] Package: true Tags: au:application:owner: Operations au:application:role: Infrastructure au:security:classification: private au:security:access: IT !include: ./commit.yaml

or even an !include ./commit.yaml where the yaml contains a block with an anchor that can then be anchored into other locations in the file.

Is anyone doing this in a manner that I haven't thought of? I have considered creating a stack that just contains an out put that has the hash in it and using the output as a nested variable but that seems overly complicated...