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

kind-park-18928

05/28/2020, 4:37 PM
Not really a pulumi question, but more about the terraform provider/bridge.... I have a containerized app service that pulls from an ACR. When newer images become available, ACR's webhook notifies the app service's
serviceUri
. Anyone know how to fetch this
serviceUri
programmatically (yellow portion in diagram below) in a pulumi or terraform script? It's generally of the form:
https://$<container-registry-name>:XXXXXXXXXXXXX@<app-service-name>.<http://scm.azurewebsites.net/docker/hook|scm.azurewebsites.net/docker/hook>
b

broad-dog-22463

05/28/2020, 4:41 PM
What resource are you deploying @kind-park-18928 ?
k

kind-park-18928

05/28/2020, 5:04 PM
Already deployed an azure container registry and a (containerized) app service for linux. Both of them are working fine. Now trying to deploy an
azure.containerservice.RegistryWebhook
, but cannot figure out the right value for the
serviceUri
property.
The serviceUri is also visible via
app service => Settings => Properties => Deployment Trigger URL
. But weirdly, the exported ARM template has no mention of this URL.
a

ancient-megabyte-79588

05/28/2020, 5:16 PM
I believe that the URL we are looking at has a generated username/password combination that Azure generates
I think this is a username/pwd combo, not a part of an address of a URL
k

kind-park-18928

05/28/2020, 5:21 PM
You might be right. The URL is basically exposed by a kudu extension?
a

ancient-megabyte-79588

05/28/2020, 5:24 PM
btw.. Any evil dudes who are watching, I'm tearing this down right away. 😛
k

kind-park-18928

05/28/2020, 5:26 PM
Oh wow, how on earth did you figure this out? 😀
a

ancient-megabyte-79588

05/28/2020, 5:26 PM
Other than that specific
az
cli command .. I don't know that pulumi can get at that Url..
I've been playing around in azure a bit lately.. 😛 The
azure-cli
is really good. Pulumi is really good for doing the automation, but if you want to explore Azure programatically, you have to get good with the
az
cli tool
k

kind-park-18928

05/28/2020, 5:30 PM
Looks like that portion might have to be separate from pulumi scripts for now. Thanks, I highly appreciate your help on this! 👍
🙏 1
a

ancient-megabyte-79588

05/28/2020, 5:30 PM
I'm guessing that you give that URL to another Registry (DockerHub, ACR, etc) and the Registry will call your containerized web appservice to tell it there is a new version of the container image
k

kind-park-18928

05/28/2020, 5:33 PM
Yes, that's correct. Basically that URL needs to be the RegistryWebhook's
ServiceUri
property. https://www.pulumi.com/docs/reference/pkg/azure/containerservice/registrywebhook/
3 Views