unbounce / iidy

iidy (Is it done yet?) -- CloudFormation with Confidence
MIT License
52 stars 7 forks source link

Make setting params easier based on stack-args #92

Closed jpb closed 2 months ago

jpb commented 6 years ago

Given a stack args like:

$imports:
  params: ssm-path:/path/to/params/

...
Parameters:
  ImageId: !$ params.ImageId

allow something like this to work:

iidy param set stack-args.yaml params.ImageId ami-000000

where params is the $imports variable name that points to a SSM parameter path. This would set /path/to/params/ImageId to ami-000000.

This should work with iidy param --environment ... or other imports that are used to produce the ssm-path.

Related, it would be nice to have iidy param update that fails if it isn't overwriting a parameter (the opposite of iidy set without --overwrite). This, in conjunction with the above, would prevent users from setting the wrong parameter (eg. setting the wrong path or the correct path in the wrong region).

tavisrudd commented 6 years ago

Any thoughts on how we'd deal with ad-hoc naming of the $imports or import of multiple ssm-paths (app-specific, shared, etc.)?

jpb commented 6 years ago

params isn't a special identifier - it could be called anything:

$imports:
  cats: ssm-path:/cats/
  dogs: ssm-path:/dogs/

...
Parameters:
  ImageId: !$ cats.ImageId
iidy param set stack-args.yaml cats.ImageId ami-000000
tavisrudd commented 6 years ago

@jpb are you still interested in this?

tavisrudd commented 6 years ago

Shall we close this?