Azure / packer-azure

Packer for Azure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When using azcli auth, wrong query ?

Poil opened this issue · comments

commented

Hi,

I'm trying to build a Packer Image using azcli auth,
My Image Gallery is created and my image definition too.

The properties of my image definition is /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/resourceGroups/run-bdu1-dev-rg/providers/Microsoft.Compute/galleries/run_bdu1_euw_dev_sig/images/ubuntu-focal-python2

it looks like packer is omitting one part in the property in the two first queries galleries/run_bdu1_euw_dev_sig
And after omitting the subscription-id but with the previously omitted part

2020/12/29 13:48:58 packer-builder-azure-arm plugin: Azure request method="GET" request="https://management.azure.com/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/resourcegroups/run-bdu1-dev-rg?api-version=2018-02-01" body=""
2020/12/29 13:48:59 packer-builder-azure-arm plugin: Azure response x-ms-request-id="f7447190-ce29-4776-ba7c-7ba233542618" body="{\"id\":\"/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/resourceGroups/run-bdu1-dev-rg\",\"name\":\"run-bdu1-dev-rg\",\"location\":\"westeurope\",\"tags\":{\"env\":\"dev\",\"stack\":\"run\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" status="200 OK" method="GET" request="https://management.azure.com/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/resourcegroups/run-bdu1-dev-rg?api-version=2018-02-01"
2020/12/29 13:48:59 packer-builder-azure-arm plugin: Azure response status="200 OK" method="GET" request="https://management.azure.com/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/resourcegroups/run-bdu1-dev-rg?api-version=2018-02-01" x-ms-request-id="f7447190-ce29-4776-ba7c-7ba233542618" body="{\"id\":\"/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/resourceGroups/run-bdu1-dev-rg\",\"name\":\"run-bdu1-dev-rg\",\"location\":\"westeurope\",\"tags\":{\"env\":\"dev\",\"stack\":\"run\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}"
2020/12/29 13:48:59 packer-builder-azure-arm plugin: Azure request method="GET" request="https://management.azure.com/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/resourceGroups/run-bdu1-dev-rg/providers/Microsoft.Compute/images/ubuntu-focal-python2?api-version=2018-04-01" body=""
2020/12/29 13:48:59 packer-builder-azure-arm plugin: Azure response status="404 Not Found" method="GET" request="https://management.azure.com/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/resourceGroups/run-bdu1-dev-rg/providers/Microsoft.Compute/images/ubuntu-focal-python2?api-version=2018-04-01" x-ms-request-id="35a60131-b524-4082-91ac-16ab7c3b5019" body="{\"error\":{\"code\":\"ResourceNotFound\",\"message\":\"The Resource 'Microsoft.Compute/images/ubuntu-focal-python2' under resource group 'run-bdu1-dev-rg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\"}}"
2020/12/29 13:48:59 packer-builder-azure-arm plugin: Azure response status="404 Not Found" method="GET" request="https://management.azure.com/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/resourceGroups/run-bdu1-dev-rg/providers/Microsoft.Compute/images/ubuntu-focal-python2?api-version=2018-04-01" x-ms-request-id="35a60131-b524-4082-91ac-16ab7c3b5019" body="{\"error\":{\"code\":\"ResourceNotFound\",\"message\":\"The Resource 'Microsoft.Compute/images/ubuntu-focal-python2' under resource group 'run-bdu1-dev-rg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\"}}"
2020/12/29 13:48:59 packer-builder-azure-arm plugin: Azure request method="GET" request="https://management.azure.com/subscriptions//resourceGroups/run-bdu1-dev-rg/providers/Microsoft.Compute/galleries/run_bdu1_euw_dev_sig/images/ubuntu-focal-python2?api-version=2019-03-01" body=""
2020/12/29 13:48:59 packer-builder-azure-arm plugin: Azure response status="404 Not Found" method="GET" request="https://management.azure.com/subscriptions//resourceGroups/run-bdu1-dev-rg/providers/Microsoft.Compute/galleries/run_bdu1_euw_dev_sig/images/ubuntu-focal-python2?api-version=2019-03-01" x-ms-request-id="c64d7bb7-c3f4-403f-b223-025236990a56" body="{\"error\":{\"code\":\"SubscriptionNotFound\",\"message\":\"The subscription 'resourceGroups' could not be found.\"}}"
2020/12/29 13:48:59 packer-builder-azure-arm plugin: Azure response status="404 Not Found" method="GET" request="https://management.azure.com/subscriptions//resourceGroups/run-bdu1-dev-rg/providers/Microsoft.Compute/galleries/run_bdu1_euw_dev_sig/images/ubuntu-focal-python2?api-version=2019-03-01" x-ms-request-id="c64d7bb7-c3f4-403f-b223-025236990a56" body="{\"error\":{\"code\":\"SubscriptionNotFound\",\"message\":\"The subscription 'resourceGroups' could not be found.\"}}"

Best regards