Skip to content

Commit bef8627

Browse files
committed
Merge remote-tracking branch 'origin/mc-parameterized' into mc-parameterized
2 parents b3536a2 + d46f3de commit bef8627

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

mmv1/third_party/terraform/services/orgpolicy/resource_org_policy_policy_test.go

+27
Original file line numberDiff line numberDiff line change
@@ -459,3 +459,30 @@ func testAccCheckOrgPolicyPolicyDestroyProducer(t *testing.T) func(s *terraform.
459459
}
460460
}
461461

462+
func testAccOrgPolicyPolicy_EnforceParameterizedMCPolicy(context map[string]interface{}) string {
463+
return acctest.Nprintf(`
464+
resource "google_org_policy_policy" "primary" {
465+
name = "projects/${google_project.basic.name}/policies/constraints/compute.managed.restrictDiskCreation"
466+
parent = "projects/${google_project.basic.name}"
467+
468+
spec {
469+
rules {
470+
enforce = "TRUE"
471+
parameters {
472+
"isSizeLimitCheck" : True,
473+
"allowedDiskTypes" : ["pd-ssd"]
474+
}
475+
}
476+
}
477+
}
478+
479+
resource "google_project" "basic" {
480+
project_id = "tf-test-id%{random_suffix}"
481+
name = "tf-test-id%{random_suffix}"
482+
org_id = "%{org_id}"
483+
deletion_policy = "DELETE"
484+
}
485+
486+
487+
`, context)
488+
}

0 commit comments

Comments
 (0)