Member-only story
How to Resolve “CannotSetProperty: Cannot set or update property disallowPublicIpAddress” in Azure DevOps ARM Template Deployment
When deploying an Azure Resource Manager (ARM) template via an Azure DevOps pipeline, you might encounter the following error during the deployment:
##[error]CannotSetProperty: Cannot set or update property disallowPublicIpAddress.
This error indicates an issue with the configuration related to public IP addresses for a virtual machine (VM) or network interface in the ARM template. Specifically, the disallowPublicIpAddress
property is being set or updated incorrectly in the deployment, leading to a failure.
In this article, we will break down the causes of this error and provide steps to resolve it.
Understanding the Error
The property disallowPublicIpAddress
is typically used in certain Azure configurations to prevent the use of public IP addresses with virtual machines or resources in a lab environment. When this property is misconfigured or in conflict with the ARM template's resource definitions, it can lead to deployment failures.
In the provided log, the deployment is attempting to create a virtual machine in the DevTest Labs environment. The error indicates that the deployment is…