Skip to content

Commit

Permalink
Add example for Microsoft.PolicyInsights_policyStates@2019-10-01 (#774)
Browse files Browse the repository at this point in the history
* Add example for Microsoft.PolicyInsights_policyStates@2019-10-01

* Rename azapi_resource_action to triggerEvaluation

---------

Co-authored-by: Heng Lu <[email protected]>
  • Loading branch information
neil-yechenwei and ms-henglu authored Feb 20, 2025
1 parent fed52d0 commit 50bb0f4
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions examples/Microsoft.PolicyInsights_policyStates@2019-10-01/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}

provider "azapi" {
skip_provider_registration = false
}

variable "resource_name" {
type = string
default = "acctest0001"
}

variable "location" {
type = string
default = "eastus"
}

resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}

resource "azapi_resource_action" "triggerEvaluation" {
type = "Microsoft.PolicyInsights/policyStates@2019-10-01"
resource_id = "${azapi_resource.resourceGroup.id}/providers/Microsoft.PolicyInsights/policyStates/latest"
action = "triggerEvaluation"
}

0 comments on commit 50bb0f4

Please sign in to comment.