-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add example for Microsoft.PolicyInsights_policyStates@2019-10-01
- Loading branch information
1 parent
2b92eee
commit 97c76e3
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
examples/Microsoft.PolicyInsights_policyStates@2019-10-01/main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |