Skip to content

Commit 1783235

Browse files
updated troubleshoot doc with key vault public access issue
1 parent eb7c4c4 commit 1783235

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

articles/virtual-machines/linux/image-builder-troubleshoot.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,30 @@ The `customization.log` file includes the following stages:
354354
- Ensure that Azure Policy and Firewall allow connectivity to remote resources.
355355
- Output comments to the console by using `Write-Host` or `echo`. Doing so lets you search the *customization.log* file.
356356
357+
### The template deployment failed because of policy violation
358+
359+
#### Error
360+
361+
```text
362+
{
363+
"statusCode": "BadRequest",
364+
"serviceRequestId": null,
365+
"statusMessage": "{\"error\":{\"code\":\"InvalidTemplateDeployment\",\"message\":\"The template deployment failed because of policy violation. Please see details for more information.\",\"details\":[{\"code\":\"RequestDisallowedByPolicy\",\"target\":\"<target_name>\",\"message\":\"Resource '<resource_name>' was disallowed by policy. Policy identifiers: '[{\\\"policyAssignment\\\":{\\\"name\\\":\\\"[Initiative] KeyVault (Microsoft.KeyVault)\\\",\\\"id\\\":\\\"/providers/Microsoft.Management/managementGroups/<managementGroup_name>/providers/Microsoft.Authorization/policyAssignments/Microsoft.KeyVault\\\"},\\\"policyDefinition\\\":{\\\"name\\\":\\\"Azure Key Vault should disable public network access\\\",\\\"id\\\":\\\"/providers/Microsoft.Management/managementGroups/<managementGroup_name>/providers/Microsoft.Authorization/policyDefinitions/KeyVault.disablePublicNetworkAccess_deny_deny\\\"},\\\"policySetDefinition\\\":{\\\"name\\\":\\\"[Initiative] KeyVault (Microsoft.KeyVault)\\\",\\\"id\\\":\\\"/providers/Microsoft.Management/managementGroups/<managementGroup_name>/providers/Microsoft.Authorization/policySetDefinitions/Microsoft.KeyVault\\\"}}]'.\",\"additionalInfo\":[{\"type\":\"PolicyViolation\"}]}]}}",
366+
"eventCategory": "Administrative",
367+
"entity": "/subscriptions/<subscription_ID>/<resourcegroups>/<resourcegroupname>/providers/Microsoft.Resources/deployments/<deployment_name>",
368+
"message": "Microsoft.Resources/deployments/validate/action",
369+
"hierarchy": "<subscription_ID>/<resourcegroupname>/<policy_name>/<managementGroup_name>/<deployment_ID>"
370+
}
371+
```
372+
373+
#### Cause
374+
375+
When using a key vaults with public access disabled. At this time, Azure Image Builder doesn't support this configuration.
376+
377+
#### Solution
378+
379+
KVs to be created with public access enabled.
380+
357381
## Troubleshoot common build errors
358382

359383
### Packer build command failure

0 commit comments

Comments
 (0)