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

powerful-football-81694

02/17/2020, 9:07 PM
I know this is not exactly an answer to your question, but could you make those URLs relative?
m

millions-beach-85282

02/17/2020, 9:10 PM
In this case I cannot. 😞 Good idea though. I did figure out an alternative solution, but I am still curious if there is a formal solution for this kind of problem. I can imagine declarative nature of things may make it not possible though.
p

powerful-football-81694

02/17/2020, 9:18 PM
Yeah, I ran into this before, there are some cases where the underlying Terraform provider bundles some things into one resource that should really be separate resources. IMO AppSetting is one that people commonly run into.
Would be so much better if AppSetting was a separate resource.
I can’t think of any solutions besides hard-coding the knowledge of what the hostname is going to be (in practice the hostname is predictable), or use a custom domain name for your web app.
$"{baseName]-<http://api-app.azurewebsites.net|api-app.azurewebsites.net>"
would get you the correct result.
m

millions-beach-85282

02/17/2020, 9:22 PM
That's exactly the alternative we ended up going with. Which actually is a bit more desirable, but meant less MVP for the current work. Post that solution it was more of an intellectual curiosity. Thanks for replying to me!
/facepalm. That's a great idea. Although wouldn't pulumi add an additional id on that?
The 8 character random id?
p

powerful-football-81694

02/17/2020, 9:24 PM
Not if you specify the
Name
property of the resource yourself.
I hate the random suffix personally, so I always include the stack name in my resource names instead.
AppServiceArgs.Name
is the property.
m

millions-beach-85282

02/17/2020, 9:25 PM
I learned something new. That's going to make a big difference in a few ways. Thanks Daniel!
p

powerful-football-81694

02/17/2020, 9:25 PM
anytime
3 Views