Skip to content
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

No HTTP resource was found that matches the request URI #23

Open
Layanshafaamri opened this issue Aug 26, 2018 · 10 comments
Open

No HTTP resource was found that matches the request URI #23

Layanshafaamri opened this issue Aug 26, 2018 · 10 comments

Comments

@Layanshafaamri
Copy link

Hi,
I am trying to deploy the template. It does not work. It shows this error:

"Template deployment returned the following errors:
16:06:55 - 4:06:49 PM - Resource Microsoft.Resources/resourceGroups 'lsh' failed with message '{
16:06:55 - "message": "No HTTP resource was found that matches the request URI 'https://management.azure.com/subscriptions/fcebdb0c-44cf-4d89-8248-e9acdbafd358/resourcegroups/lsh4/providers/Microsoft.Resources/resourceGroups/lsh?api-version=2018-05-01'."

Any idea what is wrong?

@4c74356b41
Copy link

looking at the URI you need to target the subscription to make this work and you are targeting the resource group

@Layanshafaamri
Copy link
Author

How can i do that? i just copied the template from GitHub and deployed it. Here is the link 👍 https://github.com/krnese/AzureDeploy/blob/master/ARM/deployments/rgCreate.json

@Layanshafaamri
Copy link
Author

I just copied the template below to Visual Studio"
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.1",
"parameters": {
"rgName": {
"type": "string"
},
"rgLocation": {
"type": "string"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Resources/resourceGroups",
"apiVersion": "2018-05-01",
"location": "[parameters('rgLocation')]",
"name": "[parameters('rgName')]",
"properties": {}
}
],
"outputs": {}
}",

I am still getting the same error.

@4c74356b41
Copy link

why would it matter if its visual studio or not? read the article I've linked.

@Layanshafaamri
Copy link
Author

I am trying to give you all the information to sort it out accurately. I have seen the the link you have sent me many times while researching, and i still cannot find what is the reason behind the template failure.

@4c74356b41
Copy link

you are using wrong command to deploy the template. thats the reason. read the article carefully.

@sraddhananda
Copy link

@Layanshafaamri , You are trying to create resource group within a resource group.
This template, it creates a resource group and then creates a storage account in that resource group.

If you want the same template to work,
New-AzDeployment -TemplateFile .\rgCreate.json -Location "UK SOuth"

Note: Make sure that Storage account name must be between 3 and 24 characters in length.

@ArindamRayMukherjee
Copy link

@sraddhananda

I'm trying to deploy the same template but via an azure pipeline task.
That fails because my pipeline task as detailed below tries to deploy to a resource group, the same group that it is actually trying to create.

task: AzureResourceGroupDeployment@2
displayName: 'Azure Deployment:Create Resource Group'
inputs:
azureSubscription: $(azureSubscription)
resourceGroupName: $(resourceGroupName)
location: $(location)
csmFile: '$(System.DefaultWorkingDirectory)/**/container-resourceGroup-template.json'
overrideParameters: '-rgName "$(resourceGroupName)" -rgLocation "$(location)"'

Removing the resourceGroupName: $(resourceGroupName) line from above fails because it is a required clause

I did not find a pipeline task for doing subscription level deployments, is there one?

@ArindamRayMukherjee
Copy link

Silly me, I didn't realize that pipeline tasks create a resource group if they do not find one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants