Azure / Azure/azure-quickstart-templates

azure-quickstart-templates/quickstarts/microsoft.azurestackhci/create-cluster /azuredeploy.json needs update

Open
#14,271 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Bicep
Stars
14.9k
Forks
16.2k
Avg merge
6d 21h
Merged PRs (30d)
6

Description

# The template worked in the past and recently stopped working. Potentially due to Portal update

![Image](https://github.com/user-attachments/assets/32cad948-b2a5-4efc-8587-928a87945b73)
***template 8-16***






![Image](https://github.com/user-attachments/assets/ed30c4f5-176b-4fad-b331-4b72dcb62c3e)

Even if the name is properly filled, the error check would not go away, and it prevents deployment.

After inspection, it is due to lack of conditional logic to make clusterWitnessStorageAccountName optional and skip creating a storage account although the template attempts to set a variable clusterWitnessStorageAccountNameVar to "" when witnessType is "No Witness", it never uses a condition on the storage account resource itself.

Suggested fix is to add ***"condition": "[equals(parameters('witnessType'), 'Cloud')]",*** to line 549

![Image](https://github.com/user-attachments/assets/c40fe8f2-3af6-408c-9301-37be6250c8cf)

I can confirm that the conditional logic removes the error.

Contributor guide

No contributing guide indexed for this repository

Research direction

Open quickstarts/microsoft.azurestackhci/create-cluster/azuredeploy.json and inspect the storage account resource around line 549, along with the witnessType and clusterWitnessStorageAccountName parameters and variables. Validate a deployment using "No Witness" and "Cloud" witness settings; done means the no-witness template no longer triggers the storage-account validation error while cloud witness still creates the account.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.