https://pulumi.com logo
Title
w

witty-honey-13693

11/22/2021, 10:23 AM
Hiii Iam trying to create a backend resource in Azure APIM. But getting an error. var backend = new Pulumi.AzureNative.ApiManagement.Backend("autobackend", new Pulumi.AzureNative.ApiManagement.BackendArgs { BackendId = "autobackend", ResourceGroupName = resourceGroup.Name, ServiceName = stackName+projectname, Url = "http://app-sea.azurewebsites.net/api", ResourceId = funcapp.Id, Protocol = "https", Tls = new Pulumi.AzureNative.ApiManagement.Inputs.BackendTlsPropertiesArgs { ValidateCertificateChain = true, ValidateCertificateName = true, }, }); Any idea what iam missing ? Error : Status=400 Code="ValidationError" Message="One or more fields contain incorrect values:" Details=[{"code":"ValidationError","message":"Value should represent absolute http URL","target":"resourceId"}]
w

witty-candle-66007

11/22/2021, 2:45 PM
I’m not familiar with that resource, but it appears to be complaining about the
Url
property and the error status 400 indicates it is an error being reported by Azure. I see that the
Url
property is set to
http://….
instead of
https://…
(i.e. not using HTTPS).
w

witty-honey-13693

11/22/2021, 9:32 PM
i tried with http as well still the same error.
w

witty-candle-66007

11/22/2021, 9:36 PM
So to clarify:
Url=
is set to
<https://app-sea.azuerwebsites.net/api>
w

witty-honey-13693

11/23/2021, 4:59 AM
URL is the Function / App service end point that iam giving. I believe thats correct.
Hi All Thanks for your help. I Am able to create the backend now. ResourceID is the Resource ID of the Function/WebAPp But Resource ID starts with the subscription/..... It should be prefixed with https://management.azure.com/ After which it started working and the backend is created.