Open scrocquesel-ml150 opened 4 months ago
Microsoft.ApiManagement/service/products/apis
2022-08-01
Other
Follow-up from https://github.com/Azure/bicep/discussions/13933:
resource productApi 'Microsoft.ApiManagement/service/products/apis@2022-08-01' existing = { }
This fails during deployment with the error message: "The requested resource does not support the HTTP method 'GET'."
I aim for the deployment to execute a read operation to confirm the resource's existence and then use it in a dependsOn clause for another resource.
dependsOn
According to the documentation, there is no GET operation available as the resource lacks properties. A HEAD request should be possible.
Either Bicep should somehow generate a HEAD request, or it should prohibit the use of existing in this scenario.
existing
resource apim 'Microsoft.ApiManagement/service@2022-08-01' existing = { name: 'myapim' resource product 'products' existing = { name: 'myproduct' } } resource productApi 'Microsoft.ApiManagement/service/products/apis@2022-08-01' existing ={ parent: apim::product name: 'apiName' } resource xx 'zzz' = { name: 'foo' dependsOn: [ productApi ] }
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @adrianhall, @KedarJoshi. Please see https://aka.ms/biceptypesinfo for troubleshooting help.
Resource Type
Microsoft.ApiManagement/service/products/apis
Api Version
2022-08-01
Issue Type
Other
Other Notes
Follow-up from https://github.com/Azure/bicep/discussions/13933:
This fails during deployment with the error message: "The requested resource does not support the HTTP method 'GET'."
I aim for the deployment to execute a read operation to confirm the resource's existence and then use it in a
dependsOn
clause for another resource.According to the documentation, there is no GET operation available as the resource lacks properties. A HEAD request should be possible.
Either Bicep should somehow generate a HEAD request, or it should prohibit the use of
existing
in this scenario.Bicep Repro
Confirm