Open JElgar opened 4 months ago
Hi, thank you for reaching out. This seems like a specific use case that would need to be implemented on the client side rather than within Greengrass. For example, you could "merge" a config value only if it matches its set default value, otherwise you would skip the update.
I was looking at an approach along those lines although it doesn't seem like there's a sensible way to get the current configuration of a component in order to perform that merge. Even if there was pulling the config and doing the update outside of green grass could result in race conditions (config is updated after merge), although there might be existing solutions to that part?
The best approach would be to use the IPC. A component can use the IPC to get either its own config or the config of any other component, and it can also update its own config. This way each component can check if the user has made any changes to the default config, and update it if need be. Here are some docs for reference: https://docs.aws.amazon.com/greengrass/v2/developerguide/ipc-component-configuration.html#ipc-operation-updateconfiguration
Hi @JElgar, is this issue resolved or does this require further attention?
Feature Description From my understanding there are currently 2 available update types "reset" and "merge". Reset allows you to delete some config value and merge allows you to overwrite it.
I would like to be able to only update a key in the configuration if there is not an existing value.
Use Case
We are deploying greengrass components on behalf of ours users into their AWS accounts. Sometimes we want to be able to update our default configuration without overwriting any changes the user has made (appreciate this wont help with keys users have removed).
Proposed Solution
Add an additional update type similar to merge which only updates keys which do not currently exist in the config.