-
Notifications
You must be signed in to change notification settings - Fork 775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App Service publishing credentials can't be used as Bicep resource type #2504
Comments
This is the root cause, but we should allow any() to get unblock you. At that point you will lose type validation, but at least you will be unblocked. I will see if I can get someone from the web team to help here. |
Turns out this resource type can't be created via PUT only POST. It can be retrieved with a GET, so we'll need to discusss if it is worth supporting as an "existing"-only resource type. Thanks @bmoore-msft for doing the digging on this. Though one change I'd recommend is pulling the apiVersion from the sites resource: output url string = '${list(resourceId('Microsoft.Web/sites/config', webappName, 'publishingcredentials'), app.apiVersion).properties.scmUri}/docker/hook' |
I think this absolutely makes sense for both the |
I don't think publishingCreds can be fetched with a GET only a POST since they are secret (sorry if I misstated that)... so the "feature" in this case would be allowing me to create a resourceId() via the symbolic reference and use it in the list function... Basically calling list*() without using the resourceId function - so not sure it really changes the feature though... |
I believe the fetching of the secret is still a POST action on an In this case, both syntaxes are a way of constructing a symbolic name, which then can be used to call a |
Came here to +1 this. I am currently building an application for Azure Functions and was surprised there is no property or native way to retrieve the publishing profile for a Web App / Function App. |
Bicep version
Bicep CLI version 0.3.255 (589f037)
Describe the bug
I'm trying to create an idiomatic Bicep conversion of this JSON template expression:
I have a working version using the
resourceId()
function (see below), but I've been trying to model this in a more Bicep-native way usingexisting
, and have run into a roadblock. I've tried to use this Bicep code:However, the validation complains that the name
publishingcredentials
isn't valid for the nested config resource (BCP036).I'm not clear if this is purely an issue with the App Service OpenAPI metadata not including the
publishingcredentials
name as a type discriminator, or if there's something Bicep could/should be doing differently. For example, it'd be nice if I could override the BCP036 error with theany()
function, but I can't.To Reproduce
Steps to reproduce the behavior:
See above.
Additional context
Add any other context about the problem here.
This code works, but it feels icky:
The text was updated successfully, but these errors were encountered: