-
Notifications
You must be signed in to change notification settings - Fork 127
Add flag for user-defined parameters in stack up #1411
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
Conversation
Allow to define additional parameters for `elastic-package stack up` from the command line.
|
Moving back to draft. Wondering if this should be directly stored in the profile configuration, and providers would read it from there, as done in https://github.com/elastic/elastic-package/pull/1230/files#diff-1ddc0b543f2deb096c99ee164380726eb20a9728c1ebebaaa8ae1088a9ec5854R147. |
In this other PR, I followed the same approach to get some parameters (e.g. project type) from the profile configuration: If it is done so, would it mean that a user parameter introduced in the command line is going to be re-used in the following executions? if the user does not overwrite it again elastic-package stack up --provider serverless -U serverless.project_type=security
elastic-package stack down
# this execution would also keep the same value for the parameter `serverless.project_type` from the previous run (security)
elastic-package stack up --provider serverlessIt looks like that would match the way of working of |
|
The thing is that as it is implemented now:
So if we add settings with CLI flags, where do we persist them?
I am more leaned to the second option, but this may complicate a bit configuration management in stack providers. Maybe we can provide helpers for that. Another option may be to offer a subcommand to manage profile config, instead of adding a flag, and let it manage the profile |
💚 Build Succeeded
History
cc @jsoriano |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Allow to define additional parameters for
elastic-package stack upfrom the command line.Stack providers can access these settings using
profile.Config(), they have to provide their own handling and persistence if required.If the user wants to persist the setting, they need to write it into the
config.ymlfile in the profile.For example this could be used by the serverless stack provider (#1374) to select the project type: