KablamoOSS / kombustion

Extend CloudFormation with plugins
https://kombustion.io
MIT License
25 stars 12 forks source link

Ref values break the generation of cloudformation #118

Open wenisman opened 6 years ago

wenisman commented 6 years ago

Describe the bug Currently basic support for !Ref isnt working. Whilst trying to parse in a single parameter the compiled output will have no Resources

To Reproduce Steps to reproduce the behavior:

  1. create a basic vpc.yaml

    AWSTemplateFormatVersion: 2010-09-09
    Description: The base VPC
    Parameters:
    CidrBlock:
    Description: The range of IPs for the VPC
    Type: String
    Resources:
    Vpc:
    Type: AWS::EC2::VPC
    Properties:
      CidrBlock: !Ref CidrBlock
  2. Run Generate

    > kombustion upsert  --param CidrBlock=10.0.0.0/16 stacks/vpc.yaml

Current behaviour:

AWSTemplateFormatVersion: "2010-09-09"
Description: The base VPC for the ECS cluster
Parameters:
  CidrBlock:
    Description: The range of IPs for the VPC
    Type: String
Resources: {}

Expected behavior A basic cloudformation with the reference value populated should be created.

Screenshots NA

Desktop (please complete the following information):

ojkelly commented 6 years ago

Hey @wenisman,

Thanks for the detailed report. This sounds like it might be related to #113, which nearly has a fix. I'll try and reproduce after that fix is merged.

wenisman commented 6 years ago

Thanks @ojkelly ill have a read through the code and see whats happening.

113 looks like it has to do with incorrect outputs being generated. I got around that by just disabling default outputs. I was getting both subnet and vpc failures when i had default outputs enabled