cultureamp / cfparams

Wrangle parameters for AWS CloudFormation
MIT License
0 stars 0 forks source link

Supports JSON params format #2

Closed vgunawan closed 6 years ago

vgunawan commented 6 years ago

At the time of this writing native Cloudformation params file does not comes in YML format, so the JSON goes like this.

[
  {
    "ParameterKey": "ConfigPolicyArn",
    "ParameterValue": "arn:aws:iam::514571838450:policy/read-cultureamp-staging-config-web-gateway"
  },
  {
    "ParameterKey": "Environment",
    "ParameterValue": "aslan"
  }
]

It would be nice if cfparams supports --template in either JSON or YAML, perhaps with an extra switch--template-json. This makes transitioning in and out simpler.

At the moment I have to converts all the params file into cfparams format.

pda commented 6 years ago

--template is for the CloudFormation template; currently it only supports YAML CloudFormation templates because I think JSON CloudFormation templates are awful. But that's unrelated to the parameters JSON format.

I guess you're talking about the --parameters=foo.yaml flag — yep that's using simple YAML key-value pairs instead of the JSON format supported by AWS CLI, mostly because I think that format is awful too. I recommend converting them to YAML, but adding support for the JSON format would be good. I'm not likely to do it myself though. PR welcome ;)

vgunawan commented 6 years ago

Yep that's what I meant. --parameters instead of --template. I'll create the PR when I got some spare weekend :)

pda commented 6 years ago

I think we'll leave parameters files as YAML only. Simpler to read/write, and supports fancy things like custom tags for #9