Skip to content

Instantly share code, notes, and snippets.


ampedandwired/ template.rb

Last active Aug 26, 2020
What would you like to do?
Splitting cfndsl templates into multiple files
require_relative "subtemplate.rb"
CloudFormation {
instance_type = external_parameters.fetch(:instance_type, "t2.micro")
def my_instance(instance_type)
EC2_Instance(:MyInstance) {
InstanceType instance_type
instance_type: m4.xlarge
$ cfndsl -p -y params.yml template.rb
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"MyInstance": {
"Properties": {
"InstanceType": "m4.xlarge"
"Type": "AWS::EC2::Instance"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.