-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathir.json
More file actions
1183 lines (1183 loc) · 62 KB
/
ir.json
File metadata and controls
1183 lines (1183 loc) · 62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"$schema": "https://raw.githubusercontent.com/hashicorp/terraform-plugin-codegen-spec/main/spec/v0.1/schema.json",
"version": "0.1",
"provider": {
"name": "alz",
"schema": {
"markdown_description": "ALZ provider to generate archetype data for use with the ALZ Terraform module.",
"description": "ALZ provider to generate archetype data for use with the ALZ Terraform module.",
"attributes": [
{
"name": "library_overwrite_enabled",
"bool": {
"optional_required": "optional",
"description": "Whether to allow overwriting of the library by other lib directories. Default is `false`."
}
},
{
"name": "role_definitions_use_supplied_names_enabled",
"bool": {
"optional_required": "optional",
"description": "Whether to allow using the Name and RoleName supplied in the library directly for a predictable ID. Default behaviour is to update them to unique values per management group. Default is `false`."
}
},
{
"name": "skip_provider_registration",
"bool": {
"optional_required": "optional",
"description": "Should the provider skip registering all of the resource providers that it supports, if they're not already registered? Default is `false`. If not specified, value will be attempted to be read from the `ARM_SKIP_PROVIDER_REGISTRATION` environment variable."
}
},
{
"name": "suppress_warning_policy_role_assignments",
"bool": {
"optional_required": "optional",
"description": "Should the provider omit the warning if it cannot create the full list of policy role assignments? Default is `false`. If not specified, value will be attempted to be read from the `ALZ_PROVIDER_SUPPRESS_WARNING_POLICY_ROLE_ASSIGNMENTS` environment variable."
}
},
{
"name": "library_fetch_dependencies",
"bool": {
"optional_required": "optional",
"description": "Whether to automatically fetch dependencies for the library. This option reads the `alz_library_metadata.json` file in any supplied library and will recursively download dependent libraries. Default is `true`."
}
},
{
"name": "cache_file_name",
"string": {
"optional_required": "optional",
"description": "Path to a gzipped cache file (must end in `.gz`) containing built-in policy and policy set definitions. When set, the provider will load the cache from this file (if it exists) so that built-in definitions do not need to be fetched from Azure. Use `cache_file_save_enabled` to (re)write the cache file after the provider has been configured. Caches should be regularly updated to ensure no miscalculation for the policy role assignments, as new minor or patch versions of built-in policy definitions may be released.",
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
},
{
"path": "regexp"
}
],
"schema_definition": "stringvalidator.RegexMatches(regexp.MustCompile(`\\.gz$`), \"cache_file_name must end with .gz\")"
}
}
]
}
},
{
"name": "cache_file_save_enabled",
"bool": {
"optional_required": "optional",
"description": "Whether to (re)write the cache file specified by `cache_file_name` after the provider has been configured. When `true`, the built-in policy and policy set definitions loaded into the AlzLib will be exported and saved to the file. Defaults to `false`. Has no effect when `cache_file_name` is not set."
}
},
{
"name": "library_references",
"list_nested": {
"optional_required": "required",
"description": "A list of references to the [ALZ library](https://aka.ms/alz/library) to use. Each reference should either contain the `path` (e.g. `platform/alz`) and the `ref` (e.g. `2024.03.5`), or a `custom_url` to be supplied to go-getter.",
"nested_object": {
"attributes": [
{
"name": "path",
"string": {
"optional_required": "optional",
"description": "The path in the ALZ Library, e.g. `platform/alz`. Also requires `ref`. Conflicts with `custom_url`.",
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
}
],
"schema_definition": "stringvalidator.ConflictsWith(path.MatchRelative().AtParent().AtName(\"custom_url\"))"
}
},
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
}
],
"schema_definition": "stringvalidator.AlsoRequires(path.MatchRelative().AtParent().AtName(\"ref\"))"
}
}
]
}
},
{
"name": "ref",
"string": {
"optional_required": "optional",
"description": "This is the version of the library to use, e.g. `2024.07.5`. Also requires `path`. Conflicts with `custom_url`.",
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
}
],
"schema_definition": "stringvalidator.ConflictsWith(path.MatchRelative().AtParent().AtName(\"custom_url\"))"
}
},
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
}
],
"schema_definition": "stringvalidator.AlsoRequires(path.MatchRelative().AtParent().AtName(\"path\"))"
}
}
]
}
},
{
"name": "custom_url",
"string": {
"optional_required": "optional",
"description": "A custom path/URL to the library to use. Conflicts with `path` and `ref`. For supported protocols, see [go-getter](https://pkg.go.dev/github.com/hashicorp/go-getter/v2). Value is marked sensitive as may contain secrets.",
"sensitive": true,
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
},
{
"path": "github.com/hashicorp/terraform-plugin-framework/path"
}
],
"schema_definition": "stringvalidator.ConflictsWith(path.MatchRelative().AtParent().AtName(\"path\"))"
}
},
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
},
{
"path": "github.com/hashicorp/terraform-plugin-framework/path"
}
],
"schema_definition": "stringvalidator.ConflictsWith(path.MatchRelative().AtParent().AtName(\"ref\"))"
}
}
]
}
}
]
},
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator"
}
],
"schema_definition": "listvalidator.UniqueValues()"
}
},
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator"
}
],
"schema_definition": "listvalidator.SizeAtLeast(1)"
}
}
]
}
},
{
"name": "non_compliance_message_substitution_settings",
"single_nested": {
"description": "Global settings for non-compliance message placeholder substitutions. These control how placeholders in non-compliance messages are resolved based on the enforcement mode of policy assignments.",
"optional_required": "optional",
"attributes": [
{
"name": "enforcement_mode_placeholder",
"string": {
"description": "The placeholder string in the default message that will be replaced based on the enforcement mode. Defaults to `{enforcementMode}`.",
"optional_required": "optional"
}
},
{
"name": "enforced_replacement",
"string": {
"description": "The replacement string to use for the enforcement mode placeholder when the policy assignment is enforced. Defaults to `must`.",
"optional_required": "optional"
}
},
{
"name": "not_enforced_replacement",
"string": {
"description": "The replacement string to use for the enforcement mode placeholder when the policy assignment is not enforced. Defaults to `should`.",
"optional_required": "optional"
}
}
]
}
}
]
}
},
"datasources": [
{
"name": "metadata",
"schema": {
"markdown_description": "The metadata data source provides metadata information from ALZ library.",
"attributes": [
{
"name": "id",
"string": {
"description": "A computed value representing the unique identifier for the architecture. Mandatory for acceptance testing.",
"computed_optional_required": "computed"
}
},
{
"name": "alz_library_references",
"list": {
"computed_optional_required": "computed",
"element_type": {
"string": {}
},
"description": "A list of all loaded ALZ library references."
}
}
]
}
},
{
"name": "architecture",
"schema": {
"markdown_description": "The architecture data source provides the information required to deploy an ALZ management group hierarchy, including policy and additional role assignment detail.",
"description": "The architecture data source provides the information required to deploy an ALZ management group hierarchy, including policy and additional role assignment detail.",
"attributes": [
{
"name": "name",
"string": {
"description": "The name of the architecture to deploy.",
"computed_optional_required": "required",
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
}
],
"schema_definition": "stringvalidator.LengthAtLeast(1)"
}
}
]
}
},
{
"name": "id",
"string": {
"description": "A computed value representing the unique identifier for the architecture. Mandatory for acceptance testing.",
"computed_optional_required": "computed"
}
},
{
"name": "root_management_group_id",
"string": {
"description": "The root management group id under which to deploy the architecture.",
"computed_optional_required": "required",
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
}
],
"schema_definition": "stringvalidator.LengthAtLeast(1)"
}
}
]
}
},
{
"name": "location",
"string": {
"description": "The Azure region used as a default for resources.",
"computed_optional_required": "required",
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
}
],
"schema_definition": "stringvalidator.LengthAtLeast(1)"
}
}
]
}
},
{
"name": "default_non_compliance_message_settings",
"single_nested": {
"description": "Settings for controlling default non-compliance messages on policy assignments. When configured, a default non-compliance message will be applied to policy assignments.",
"computed_optional_required": "optional",
"attributes": [
{
"name": "default_message",
"string": {
"description": "The default non-compliance message to apply to policy assignments. Supports placeholder substitution configured in the provider's `non_compliance_message_substitution_settings` block.",
"computed_optional_required": "required"
}
},
{
"name": "merge_mode",
"string": {
"description": "Controls behavior when a policy assignment already has a default non-compliance message (one without a `policyDefinitionReferenceId`). `replace` (default) removes the existing default message and adds the configured default. `prefer_existing` keeps the existing default message if present, only adding the configured default when none exists. Policy-specific messages (with `policyDefinitionReferenceId`) are always preserved. Assignments with no messages always receive the default if a default message is supplied.",
"computed_optional_required": "optional",
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
}
],
"schema_definition": "stringvalidator.OneOf(\"replace\", \"prefer_existing\")"
}
}
]
}
}
]
}
},
{
"name": "policy_assignments_to_modify",
"map_nested": {
"computed_optional_required": "optional",
"description": "A mested map of policy assignments to modify. The key is the management group id, and the value is an object with a single attribute, `policy_assignments`. This is another map.",
"nested_object": {
"attributes": [
{
"name": "policy_assignments",
"map_nested": {
"description": "A map of policy assignments to modify. The key is the policy assignment name, and the value is an object containing the modifications to make.",
"computed_optional_required": "optional",
"nested_object": {
"attributes": [
{
"name": "enforcement_mode",
"string": {
"computed_optional_required": "optional",
"description": "The enforcement mode for the policy assignment. Valid values are `Default` and `DoNotEnforce`.",
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
}
],
"schema_definition": "stringvalidator.OneOf(\"Default\", \"DoNotEnforce\")"
}
}
]
}
},
{
"name": "identity",
"string": {
"description": "The identity type. Must be one of `SystemAssigned` or `UserAssigned`.",
"computed_optional_required": "optional",
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
}
],
"schema_definition": "stringvalidator.OneOf(\"SystemAssigned\", \"UserAssigned\")"
}
}
]
}
},
{
"name": "identity_ids",
"set": {
"computed_optional_required": "optional",
"element_type": {
"string": {}
},
"description": "A set of zero or one identity ids to assign to the policy assignment. Required if `identity` is `UserAssigned`. **Do not** pass in computed values, instead construct the resource id yourself.",
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
},
{
"path": "github.com/Azure/terraform-provider-alz/internal/alzvalidators"
}
],
"schema_definition": "setvalidator.ValueStringsAre(alzvalidators.ArmResourceIdTypeNamespace(\"Microsoft.ManagedIdentity\", \"userAssignedIdentities\"))"
}
},
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
},
{
"path": "github.com/hashicorp/terraform-plugin-framework/path"
}
],
"schema_definition": "setvalidator.AlsoRequires(path.MatchRelative().AtParent().AtName(\"identity\"))"
}
},
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
}
],
"schema_definition": "setvalidator.SizeBetween(0, 1)"
}
}
]
}
},
{
"name": "non_compliance_messages",
"set_nested": {
"description": "The non-compliance messages to use for the policy assignment.",
"computed_optional_required": "optional",
"nested_object": {
"attributes": [
{
"name": "message",
"string": {
"description": "The non-compliance message to use for the policy assignment.",
"computed_optional_required": "required"
}
},
{
"name": "policy_definition_reference_id",
"string": {
"description": "The policy definition reference id (not the resource id) to use for the non compliance message. This references the definition within the policy set.",
"computed_optional_required": "optional"
}
}
]
}
}
},
{
"name": "not_scopes",
"list": {
"computed_optional_required": "optional",
"element_type": {
"string": {}
},
"description": "A list of scopes to exclude from the policy assignment. Each element must be a valid ARM resource id. If specified here the not scopes will replace any existing not scopes on the policy assignment.",
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator"
}
],
"schema_definition": "listvalidator.UniqueValues()"
}
},
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator"
},
{
"path": "github.com/Azure/terraform-provider-alz/internal/alzvalidators"
}
],
"schema_definition": "listvalidator.ValueStringsAre(alzvalidators.ArmResourceId())"
}
}
]
}
},
{
"name": "overrides",
"list_nested": {
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator"
}
],
"schema_definition": "listvalidator.SizeAtMost(10)"
}
},
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator"
}
],
"schema_definition": "listvalidator.UniqueValues()"
}
}
],
"description": "The overrides for this policy assignment. There are a maximum of 10 overrides allowed per assignment. If specified here the overrides will replace the existing overrides.",
"computed_optional_required": "optional",
"nested_object": {
"attributes": [
{
"name": "kind",
"string": {
"description": "The property the assignment will override. The supported kind is `policyEffect`.",
"computed_optional_required": "required",
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
}
],
"schema_definition": "stringvalidator.OneOf(\"policyEffect\")"
}
}
]
}
},
{
"name": "value",
"string": {
"description": "The new value which will override the existing value. The supported values are: `addToNetworkGroup`, `append`, `audit`, `auditIfNotExists`, `deny`, `denyAction`, `deployIfNotExists`, `disabled`, `manual`, `modify`, `mutate`. <https://learn.microsoft.com/azure/governance/policy/concepts/effects>",
"computed_optional_required": "required",
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
}
],
"schema_definition": "stringvalidator.OneOf(\"addToNetworkGroup\", \"append\", \"audit\", \"auditIfNotExists\", \"deny\", \"denyAction\", \"deployIfNotExists\", \"disabled\", \"manual\", \"modify\", \"mutate\")"
}
}
]
}
},
{
"name": "override_selectors",
"list_nested": {
"description": "The selectors to use for the override.",
"computed_optional_required": "optional",
"nested_object": {
"attributes": [
{
"name": "kind",
"string": {
"computed_optional_required": "required",
"description": "The property of a selector that describes what characteristic will narrow down the scope of the override. Allowed value for kind: `policyEffect` is: `policyDefinitionReferenceId`.",
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
}
],
"schema_definition": "stringvalidator.OneOf(\"policyDefinitionReferenceId\")"
}
}
]
}
},
{
"name": "in",
"set": {
"description": "The list of values that the selector will match. Conflicts with `not_in`.",
"computed_optional_required": "optional",
"element_type": {
"string": {}
},
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
}
],
"schema_definition": "setvalidator.SizeAtMost(50)"
}
},
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
},
{
"path": "github.com/hashicorp/terraform-plugin-framework/path"
}
],
"schema_definition": "setvalidator.ConflictsWith(path.MatchRelative().AtParent().AtName(\"not_in\"))"
}
}
]
}
},
{
"name": "not_in",
"set": {
"description": "The list of values that the selector will not match. Conflicts with `in`.",
"computed_optional_required": "optional",
"element_type": {
"string": {}
},
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
}
],
"schema_definition": "setvalidator.SizeAtMost(50)"
}
},
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
},
{
"path": "github.com/hashicorp/terraform-plugin-framework/path"
}
],
"schema_definition": "setvalidator.ConflictsWith(path.MatchRelative().AtParent().AtName(\"not_in\"))"
}
}
]
}
}
]
}
}
}
]
}
}
},
{
"name": "resource_selectors",
"list_nested": {
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator"
}
],
"schema_definition": "listvalidator.SizeAtMost(10)"
}
},
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator"
}
],
"schema_definition": "listvalidator.UniqueValues()"
}
}
],
"description": "The resource selectors to use for the policy assignment. A maximum of 10 resource selectors are allowed per assignment. If specified here the resource selectors will replace any existing resource selectors.",
"computed_optional_required": "optional",
"nested_object": {
"attributes": [
{
"name": "name",
"string": {
"description": "The name of the resource selector. The name must be unique within the assignment.",
"computed_optional_required": "required",
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
}
],
"schema_definition": "stringvalidator.LengthAtLeast(1)"
}
}
]
}
},
{
"name": "resource_selector_selectors",
"list_nested": {
"description": "The selectors to use for the resource selector.",
"computed_optional_required": "optional",
"nested_object": {
"attributes": [
{
"name": "kind",
"string": {
"description": "The property of a selector that describes what characteristic will narrow down the set of evaluated resources. Each kind can only be used once in a single resource selector. Allowed values are: `resourceLocation`, `resourceType`, `resourceWithoutLocation`. `resourceWithoutLocation` cannot be used in the same resource selector as `resourceLocation`.",
"computed_optional_required": "required",
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
}
],
"schema_definition": "stringvalidator.OneOf(\"resourceLocation\", \"resourceType\", \"resourceWithoutLocation\")"
}
}
]
}
},
{
"name": "in",
"set": {
"description": "The list of values that the selector will match. Conflicts with `not_in`.",
"computed_optional_required": "optional",
"element_type": {
"string": {}
},
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
}
],
"schema_definition": "setvalidator.SizeAtMost(50)"
}
},
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
},
{
"path": "github.com/hashicorp/terraform-plugin-framework/path"
}
],
"schema_definition": "setvalidator.ConflictsWith(path.MatchRelative().AtParent().AtName(\"not_in\"))"
}
}
]
}
},
{
"name": "not_in",
"set": {
"description": "The list of values that the selector will not match. Conflicts with `in`.",
"computed_optional_required": "optional",
"element_type": {
"string": {}
},
"validators": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
}
],
"schema_definition": "setvalidator.SizeAtMost(50)"
}
},
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
},
{
"path": "github.com/hashicorp/terraform-plugin-framework/path"
}
],
"schema_definition": "setvalidator.ConflictsWith(path.MatchRelative().AtParent().AtName(\"not_in\"))"
}
}
]
}
}
]
}
}
}
]
}
}
},
{
"name": "parameters",
"map": {
"description": "The parameters to use for the policy assignment. The map key is the parameter name and the value is an JSON object containing a single `value` attribute with the values to apply. This to mitigate issues with the Terraform type system. E.g. `{ defaultName = jsonencode({ value = \"value\"}) }`",
"computed_optional_required": "optional",
"element_type": {
"string": {
"custom_type": {
"import": {
"path": "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes"
},
"type": "jsontypes.NormalizedType{}",
"value_type": "jsontypes.Normalized"
}
}
}
}
}
]
}
}
}
]
}
}
},
{
"name": "management_groups",
"list_nested": {
"description": "This is a list of objects pertaining to the tier of management groups to be deployed (relative to the supplied root management group id). Use the `level` attribute to specify the tier of management groups to deploy.",
"computed_optional_required": "computed",
"nested_object": {
"attributes": [
{
"name": "id",
"string": {
"description": "The id of the management group. This the last segment of the resource id.",
"computed_optional_required": "computed"
}
},
{
"name": "parent_id",
"string": {
"description": "The parent management group id.",
"computed_optional_required": "computed"
}
},
{
"name": "display_name",
"string": {
"description": "The display name of the management group.",
"computed_optional_required": "computed"
}
},
{
"name": "level",
"number": {
"description": "The level of the management group in the hierarchy, relative to the supplied root management group. The level starts at zero.",
"computed_optional_required": "computed"
}
},
{
"name": "exists",
"bool": {
"description": "Whether the management group already exists or not. Used to determine if the management group should be created or just have policy/role resources created within.",
"computed_optional_required": "computed"
}
},
{
"name": "policy_assignments",
"map": {
"description": "The policy assignments to apply to the management group. The key is the policy assignment name, and the value is the policy assignment JSON as a string.",
"element_type": {
"string": {}
},
"computed_optional_required": "computed"
}
},
{
"name": "policy_definitions",
"map": {
"description": "The policy definitions to apply to the management group. The key is the policy definition name, and the value is the policy definition JSON as a string.",
"element_type": {
"string": {}
},
"computed_optional_required": "computed"
}
},
{
"name": "policy_set_definitions",
"map": {
"description": "The policy set definitions to apply to the management group. The key is the policy set definition name, and the value is the policy set definition JSON as a string.",
"element_type": {
"string": {}
},
"computed_optional_required": "computed"
}
},
{
"name": "role_definitions",
"map": {
"description": "The role definitions to apply to the management group. The key is the role definition name, and the value is the role definition JSON as a string.",
"element_type": {
"string": {}
},
"computed_optional_required": "computed"
}
}
]
}
}
},
{
"name": "policy_role_assignments",
"set_nested": {
"computed_optional_required": "computed",
"description": "A set of role assignments that need to be created for the policies that have been assigned in the hierarchy. Since we will likely be using system assigned identities, we don't know the principal ID until after the deployment. Therefore this data can be used to create the role assignments after the deployment.",
"nested_object": {
"attributes": [
{
"name": "role_definition_id",
"string": {
"description": "The role definition id to assign.",
"computed_optional_required": "computed"
}
},
{
"name": "scope",
"string": {
"description": "The scope of the assignment.",
"computed_optional_required": "computed"
}
},
{
"name": "policy_assignment_name",
"string": {
"description": "The name of the policy assignment to enable retrieval of the identity id.",
"computed_optional_required": "computed"
}
},
{
"name": "management_group_id",
"string": {
"description": "The id of the management group where the policy assignment will be created.",
"computed_optional_required": "computed"
}
}
]
}
}
},
{
"name": "policy_default_values",