• About Us
  • Contact Us
  • Advertise
  • Privacy Policy
  • Guest Post
No Result
View All Result
Digital Phablet
  • Home
  • NewsLatest
  • Technology
    • Education Tech
    • Home Tech
    • Office Tech
    • Fintech
    • Digital Marketing
  • Social Media
  • Gaming
  • Smartphones
  • AI
  • Reviews
  • Interesting
  • How To
  • Home
  • NewsLatest
  • Technology
    • Education Tech
    • Home Tech
    • Office Tech
    • Fintech
    • Digital Marketing
  • Social Media
  • Gaming
  • Smartphones
  • AI
  • Reviews
  • Interesting
  • How To
No Result
View All Result
Digital Phablet
No Result
View All Result

Home » How to Enable Azure Policy Assignment on Existing Default Policies Using Terraform in Microsoft Accelerator Landing Zone

How to Enable Azure Policy Assignment on Existing Default Policies Using Terraform in Microsoft Accelerator Landing Zone

DP Staff by DP Staff
April 18, 2026
in How To
Reading Time: 2 mins read
A A
How to Fix Azure Student Subscription Region Error
ADVERTISEMENT

Select Language:

Are you looking to add a built-in Azure Policy to your Microsoft Accelerator Landing Zone (ALZ) deployment using Terraform? Here’s a simple step-by-step guide to help you do just that.

ADVERTISEMENT

First, you need to identify the specific policy you want to apply. Azure has a built-in policy called “Ensure that public network access is disabled in managed disks.” You can find this policy in the Azure portal under Policy → Definitions, or you can use Terraform’s data sources to get it programmatically with this code:

hcl
data “azurerm_policy_definition” “disable_disk_public_network” {
display_name = “Ensure that public network access is disabled in managed disks”
}

Next, you’ll add a new policy assignment within your ALZ configuration. The ALZ Terraform project offers a variable called “policy_assignments” in the management group landing zone module. You can add your new policy like this, usually in your landing_zone.mgmt_group.tfvars file:

ADVERTISEMENT

hcl
policy_assignments = {
disable_disk_public_network = {
display_name = “Disable public network access for managed disks”
description = “Ensure public network access is disabled on all Managed Disks”
policy_definition_id = data.azurerm_policy_definition.disable_disk_public_network.id
enforcement_mode = “Enabled” # or “Default”
parameters = {} # No parameters needed for this policy

scope = var.management_group_id # Use default if not specified

}
}

Once you’ve added the policy, run these Terraform commands from your command line in the landingzones/mgmtgroup directory:

bash
terraform init
terraform plan -var-file=landing_zone.mgmt_group.tfvars
terraform apply -var-file=landing_zone.mgmt_group.tfvars

This process will attach the new policy to your management group, and it will automatically apply to all subscriptions beneath it.

Finally, verify that the policy is in effect. It may take about 15–30 minutes for Azure to process the new policy assignment. Then follow these steps:

ADVERTISEMENT
  1. In the Azure portal, go to Policy → Assignments.
  2. Look for the “Disable public network access for managed disks” assignment at the management group level.
  3. Check the Compliance tab to ensure no resources are violating the policy by having public endpoints.

Following this guide should help you effectively apply this security policy across your environment using Terraform. If you have any questions or run into issues, feel free to ask!

ChatGPT ChatGPT Perplexity AI Perplexity Gemini AI Logo Gemini AI Grok AI Logo Grok AI
Google Banner
ADVERTISEMENT
DP Staff

DP Staff

Related Posts

curved road 10072702 960 720.jpg
Smartphones

Honor 600 Pro: Specs, Price, Release Date & More!

April 18, 2026
How to Obtain Palm Seeds in Windrose by Completing and Solving
Gaming

How to Obtain Palm Seeds in Windrose by Completing and Solving

April 18, 2026
AWS Security: Handling Sophisticated Attacks & Collaborating with Authorities
How To

How to Reduce AWS CloudFront Data Transfer from US (Ohio) with Low Requests

April 18, 2026
How To

How to Find the Correct HP Envy 17 Touchpad Part Number

April 18, 2026
Next Post

How to Find the Correct HP Envy 17 Touchpad Part Number

  • About Us
  • Contact Us
  • Advertise
  • Privacy Policy
  • Guest Post

© 2026 Digital Phablet

No Result
View All Result
  • Home
  • News
  • Technology
    • Education Tech
    • Home Tech
    • Office Tech
    • Fintech
    • Digital Marketing
  • Social Media
  • Gaming
  • Smartphones

© 2026 Digital Phablet