Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

[bugfix] Fixed passing in the list of supported services #62

Merged
merged 1 commit into from
Jul 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#Definition ID: /providers/Microsoft.Authorization/policyDefinitions/a08ec900-254a-4555-9bf5-e42af04b5c5c
#Name: Allowed resource types

locals {
supported_svc = "${jsonencode(var.policies_matrix.list_of_supported_svc)}"
}

resource "azurerm_policy_assignment" "res_type" {
count = var.policies_matrix.restrict_supported_svc ? 1 : 0
name = "res_svc"
Expand All @@ -12,10 +16,8 @@ resource "azurerm_policy_assignment" "res_type" {
parameters = <<PARAMETERS
{
"listOfResourceTypesAllowed": {
{
"value" : "${var.policies_matrix.list_of_supported_svc}"
}
}
"value" : ${local.supported_svc}
}
}
PARAMETERS
}