hashicorp / hashicorp/packer-plugin-azure

Azure ARM does not support boot diagnostics for non public cloud

Open
#70 1 comment 0 reactions 0 assignees View on GitHub
bug builder/azure
Dominant language
Go
Stars
63
Forks
103
PR merge metrics
No merged PRs in 30d

Description

_This issue was originally opened by @davemedvitz as hashicorp/packer#9333. It was migrated here as a result of the [Packer plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737). The original body of the issue is below._


#### Overview of the Issue

When setting boot_diag_storage_account when also specifying cloud_environment_name, packer throws an error

vhd: Code="DeploymentFailed" Message="At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details." Details=[{"code":"BadRequest","message":"{\r\n \"error\": {\r\n \"code\": \"InvalidParameter\",\r\n \"message\": \"The blob URL's domain must be blob.core.usgovcloudapi.net.\",\r\n \"target\": \"bootDiagnostics.storageAccountUri\"\r\n }\r\n}"}]

### Packer version

Packer version 1.5.6

### Analysis

I did some digging, thinking that I wasn't providing the diag storage account in the right way.

The function SetBootDiag in template_builder.go (line 383 in master @ commit c016f37) hard codes the storage URI suffix.

Contributor guide

Open the contributing guide

Research direction

Start in template_builder.go at SetBootDiag, identified in the issue as hard-coding the storage URI suffix. Trace how cloud_environment_name is provided and how boot diagnostics builds the storage account URI. Done means boot diagnostics uses the correct blob domain for non-public Azure clouds without breaking the public-cloud case.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, go
Domain
cloud
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.