Skip to content

Commit

Permalink
Add example for Microsoft.PolicyInsights_policyStates@2019-10-01
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-yechenwei committed Feb 19, 2025
1 parent 2b92eee commit 97c76e3
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" "test" {
type = "Microsoft.PolicyInsights/policyStates@2019-10-01"
resource_id = "${azapi_resource.resourceGroup.id}/providers/Microsoft.PolicyInsights/policyStates/latest"
action = "triggerEvaluation"
}

0 comments on commit 97c76e3

Please sign in to comment.