Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parameter cleanup of modified output file not working as expected #3

Open
rjhicks41 opened this issue Mar 13, 2017 · 2 comments
Open

Comments

@rjhicks41
Copy link

parameters that are removed from json template do not get removed from an updated parameter file.

to recreate:

run cf_parameter_generator
cf_parameter_generator -f input.json -o output.json

edit input.json to change the name of a pre-existing parameter
"ELBListenersLoadBalancerPort": { "Description": "Specifies the external load balancer port number", "Type": "String" },

changes to:

"ELBListenersLoadBalancerPortHTTP": { "Description": "Specifies the external load balancer port number for HTTP connections", "Type": "String" },

re-run cf_parameter_generator:
cf_parameter_generator -f input.json -o output.json

view output.json and you'll find this:
{ "ParameterKey": "ELBListenersLoadBalancerPort", "ParameterValue": "80" }, { "ParameterKey": "ELBListenersLoadBalancerPortHTTP", "ParameterValue": "Type: String" }, { "ParameterKey": "ELBListenersLoadBalancerPortHTTPS", "ParameterValue": "Type: String" },

when you were looking for this:
{ "ParameterKey": "ELBListenersLoadBalancerPortHTTP", "ParameterValue": "Type: String" }, { "ParameterKey": "ELBListenersLoadBalancerPortHTTPS", "ParameterValue": "Type: String" },

@rjhicks41
Copy link
Author

ugh...my markdown fu is not json compatible. :)

@alistanis
Copy link
Owner

alistanis commented Mar 15, 2017

If you include -r it will remove old entries. But your comments make me think about the case where someone renames something. It would be better to rename the parameter as well, but that's harder to detect. I'll think about this and ways that it can be detected and updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants