This message was deleted.
# general
s
This message was deleted.
b
just so I'm clear, you're running Pulumi from two different places with two different configurations? it's not totally clear what's happening here
s
Sorry, we have infrastructure deployments with Pulumi to create some underlying infra and an App Service. As part of that, we want to set some defaults for some App and config settings. We have a separate deployment pipeline in ADO which deploys into that App Service, its not in Pulumi. This also sets some appSettings which are specific to the app. When re-deploying the pulumi pipelines, the config set by the ADO pipeline is wiped.
I want to ignore all changes to the settings (which I have done using
ignore
), however, this does not work if we add an extra app setting in pulumi. It just replaces whatever is there with what it thinks should be there and ignores any existing settings.
I want to be able to update app settings in pulumi, which will only update or change the value I added/changed, but ignoring all others.
(We could also be going about this wrong, still quite new to this 😅 )
b
unfortunately that's not the right way to go about it. Pulumi drives towards a desired end state, so when your ADO pipeline runs, it changes the state of the services.
the only way for this to work would be use pulumi, delete all the resources from the state, then use the ADO pipeline, but then you can't update anything with Pulumi
I would recommend using just Pulumi if you can
s
Sadly we are not in a position to do that, I might suggest we do not set app settings on the Pulumi deployments; instead always set at the app deployment level. Could it be an option to programmatically grab the updated settings and re-set them? Something like... 1. When deploying a app service, check to see if existing settings exist (using the
existing resource lookup
) 2. If exists, get all settings and add them to a list 3. Run through the list, check those settings against the ones set in pulumi 4. Replace the settings with the pulumi versions, keeping all the others 5. update the app service with new settings
b
that's currently not available as an option, but we do have an issue open for it. Pulumi expects to have a desired state to drive towards, in a declarative manner. your logic is very imperative, so it's not possible to define in Pulumi
s
Okay thanks