https://pulumi.com logo
#azure
Title
# azure
g

glamorous-helmet-50600

01/25/2021, 11:12 PM
How do you guys normally manage your app settings when using Pulumi + Azure DevOps? I was trying to go for a hybrid approach where some settings would be set by pulumi (e.g., dependencies on other resources) and others by the pipeline. So far doesn't seem to be a good approach so I'd like to know how you guys do it.
t

tall-needle-56640

01/26/2021, 9:44 PM
You kind of need both. You want some settings in the stack that follow some definition and you need pipeline settings for running in different configurations or entering secrets.
g

glamorous-helmet-50600

01/27/2021, 9:05 AM
Thanks @tall-needle-56640. I wanted to do something like that but unless I create a custom task on DevOps the existing one to apply variables will either wipe the settings created by Pulumi or not update any at all. Also, does Pulumi handle well the app settings being updated in 2 places? (will it not try to wipe the pipeline ones on the next run?)
t

tall-needle-56640

01/27/2021, 2:53 PM
For app settings, an update will replace so you can merge them together and set them at once.
g

glamorous-helmet-50600

01/27/2021, 4:42 PM
@tall-needle-56640 Sorry when you say merge how exactly is that done? Would it be using the DevOps api to retrieve does and use them with pulumi (so that it's not the pipeline that's effectively updating the settings) or is it something else?
t

tall-needle-56640

01/27/2021, 8:19 PM
When I say merge, I meant you take two lists of name-pairs and combine them to assign them at once to the web app. If you have a sample you can share, I can be more helpful. "Settings" is such an overloaded term that I'm not even sure we are talking about the same thing.
g

glamorous-helmet-50600

01/27/2021, 9:52 PM
Sorry, I meant AppSettings. On AzureDevOps pipeline we store the appsettings in the "Variables" and there's a task to apply them to the App Service. My question: if I want to do a hybrid approach where I set some AppSettings with Pulumi and some with the pipeline Variables, where do I merge them to then assign? Do I need to create something custom to pass the pipeline variables into the pulumi project so that I can merge and assign via pulumi only? I'm sorry if I sound confusing 😅
3 Views