Your company requires that all virtual machines deployed to a subscription automatically have the Log Analytics agent installed to ensure monitoring compliance. If a virtual machine is deployed without the agent, the agent must be automatically installed without blocking the deployment of the virtual machine itself. Which Azure Policy effect should you recommend to meet this requirement?
- DeployIfNotExistsCevap
- BDeny
- CAudit
- DModify
Cevap
DeployIfNotExists
The DeployIfNotExists effect checks if a related or child resource (such as a virtual machine extension) exists, and if not, it automatically triggers a deployment template to remediate the compliance gap. This allows the primary resource (the virtual machine) to be deployed successfully while automatically ensuring that the required extension is installed.
Adım Adım Çözüm
Anahtar Kavram
Azure Policy effects determine what happens when a resource matches a policy definition during creation or update. The DeployIfNotExists effect enables automated deployment of dependent resources or extensions when they are missing, ensuring automated compliance without blocking the deployment of the primary resource.
Tahmini Süre:1m 0s