How can we trigger an Azure Policy from an Azure Runbook? example - to may be stop provisioning of resources in a subscription temporarily. I have basically created an Budget Action Group to an Azure Runbook via Webhook. This works successfully, but need to also test Azure Policy trigger via a Runbook if the Budget/Action Group gets triggered.
How to trigger an Azure Policy from an Azure Runbook
165 views Asked by Sahil Wadehra At
1
There are 1 answers
Related Questions in AZURE
- How to update to the latest external Git in Azure Web App?
- I need an azure product that executes my intensive ffmpeg command then dies, and i only get charged for the delta. Any Tips?
- Inject AsyncCollector into a service
- mutual tls authentication between app service and function app
- Azure Application Insights Not Displaying Custom Logs for Azure Functions with .NET 8
- Application settings for production deployment slot in Azure App Services
- Encountered an error (ServiceUnavailable) from host runtime on Azure Function App
- Implementing Incremental consent when using both application and delegated permissions
- Invalid format for email address in WordPress on Azure app service
- Producer Batching Service Bus Vs Kafka
- Integrating Angular External IP with ClusterIP of .NET microservices on AKS
- Difficulty creating a data pipeline with Fabric Datafactory using REST
- Azure Batch for Excel VBA
- How to authenticate only Local and Guest users in Azure AD B2C and add custom claims in token?
- Azure Scale Sets and Parallel Jobs
Related Questions in AZURE-AUTOMATION
- Get-Service command giving me the error Cannot open Service Control Manager on computer 'xx'. This operation might require other privileges
- VS Code Azure Automation Runbook Python Packages not recognized
- Why am I getting "could not find file" errors when using Remove-Item in PowerShell?
- Issue with wg-easy VPN service and setting up auto reboot using Powershell script on Automation Accounts
- Powershell runbooks on hybrid workers can access other jobs variables if too many jobs are running at the same time
- Bad request at Azure Automation Tasks Preview
- How to deploy a "Logic App Standard" with multiple workflows via arm template
- $DebugPreference = "Continue" not working when running a powersehll runbook in azure automation account's test pane
- Azure powershell failing with error: One or more errors occurred while using Get-AzRecoveryServicesVault cmdlet
- Azure Automation Account Powershell runbook exception errors with Azure Snapshots
- PowerShell code runs considerably slower in Automation Account hybrid worker than it does directly on the hybrid worker server
- Logic app, convert run query json results to usuable / readable output (html/excelish?)to use in Sentinel comments for enrichment
- Azure: How to use custom module in State Configuration
- Powershell script with automation account and managed identity Unauthorized when sending e-mail
- How to Kill sessions running for last 5 minutes automatically in azure analysis services?
Related Questions in AZURE-POLICY
- How to audit MFA status of users in Azure
- Implementing Azure Policy to Restrict Role Assignments at Subscription Level Except for Specific Service Principal
- Keys should have a rotation policy ensuring that their rotation is scheduled within the specified number of days after creation not working
- Azure APIM Policy, managed identity resource value from namevalue
- Azure Policy not working (check for lowercase APIM Url)
- Azure policy definition to allow the access to a VM via Bastion only for users of a specific user group
- azure policy - Force administrators to use standard plan and not premium
- Azure Policy to Ensure and Validate Tag inheritance with allowed values
- How to show the virtual machine name instead of the extension name in this policy?
- create azure policy that retrieves resource createdTime and adds a tag createdTime to the resource
- (BICEP) Regarding microsoft azure polices - DeployIfNotExists - Locks
- Regarding microsoft azure polices - DeployIfNotExists
- Azure Policy Compliance - "Compliant" resource groups showing as non-complaint
- I'm trying to get this Azure Policy to work but keep getting an error saying the properties does not exist
- Azure Policy not assigning on tagged VM
Related Questions in AZURE-RUNBOOK
- VS Code Azure Automation Runbook Python Packages not recognized
- Powershell runbooks on hybrid workers can access other jobs variables if too many jobs are running at the same time
- How do you access Azure runbook storage?
- Creating Microsoft OnPremise User with Azure RunBook
- How to trigger a webhook after azure pipeline run completes
- Azure automation Jobs that completed with errors - JobStreams data not forwarded to Azure Monitor
- Trouble calling runbook when name is a variable
- Azure Automation Runbook - Returning incorrect resource group name. 'Resource group '{resource-group-name}' could not be found'
- How to get data from an Excel Document/ CSV stored in a blob storage with an automation Account/Runbook
- Get Azure Automation Runbook Credential in Python
- Set-PnPListPermission failing from Azure Automation Runbook on List (Document Library works fine)
- Azure runbook to Azuredevops server pipeline trigger failing
- Stop-Integration Runtime
- Can't connect to managed identity with User Administrator role
- automation account - get currently running runbook name
Related Questions in AZURE-BILLING
- Will Timer/blob triggers in azure always use host resources even though it's not executing?
- Azure price sheet api not returning the savings plan price details
- Log Analytics workspace vs Storage Account
- get-azconsumptiondetails won't work for some resources
- Cannot implement billing (model=B) query param for Teams API in .NET SDK [5.8.0]
- Why my Azure resources cost still increasing while i'm using free services?
- Is it possible to avoid "bad" traffic to a public Azure site?
- Retrieving Azure Cost on daily basis using Python
- is it possible to export azure billing report to a database for detailed analysis?
- Set different payment method for Azure pay-as-you-go subscriptions
- Power Bi Azure Cost Management - oauth token
- When I tried to export power apps table data into azure storage using azure synapse link will it costs for write operation in azure?
- How to trigger an Azure Policy from an Azure Runbook
- Azure map generates huge billing, details says due to "Azure Maps - Location Insights"
- How to report the Obsolete assets in Azure?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
In Azure policy definitions and assignments exist. A policy definition is just that, it defines what a policy would do if it were to be assigned to a certain scope in a Policy assignment.
So you could create the policy definition for blocking resource creation and first test it at the scope of a testing resourcegroup. When everything works as expected you can create simple powershell commands in your runbook to create the assignment at the scope needed when the runbook is triggered. You could also automate the removal of the policy assignment.
PowerShell commands are:
New-AzPolicyAssignmentandRemove-AzPolicyAssignment.Further documentation on assigning policies can be found here