1+ // Copyright (c) HashiCorp, Inc.
2+ // SPDX-License-Identifier: MPL-2.0
3+
14package admissionregistrationv1
25
36import (
@@ -7,91 +10,93 @@ import (
710
811type ValidatingAdmissionPolicyModel struct {
912 Timeouts timeouts.Value `tfsdk:"timeouts"`
10- ID types.String `tfsdk:"id" manifest:"" `
11- Metadata MetadataModel `tfsdk:"metadata" manifest:"metadata" `
12- Spec ValidatingAdmissionPolicySpecModel `tfsdk:"spec" manifest:"spec" `
13+ ID types.String `tfsdk:"id"`
14+ Metadata MetadataModel `tfsdk:"metadata"`
15+ Spec ValidatingAdmissionPolicySpecModel `tfsdk:"spec"`
1316}
1417
1518type MetadataModel struct {
16- Annotations map [string ]types.String `tfsdk:"annotations" manifest:"annotations" `
17- GenerateName types.String `tfsdk:"generate_name" manifest:"generateName" `
18- Generation types.Int64 `tfsdk:"generation" manifest:"generation" `
19- Labels map [string ]types.String `tfsdk:"labels" manifest:"labels" `
20- Name types.String `tfsdk:"name" manifest:"name" `
21- Namespace types.String `tfsdk:"namespace" manifest:"namespace" `
22- ResourceVersion types.String `tfsdk:"resource_version" manifest:"resourceVersion" `
23- UID types.String `tfsdk:"uid" manifest:"uid" `
19+ Annotations map [string ]types.String `tfsdk:"annotations"`
20+ GenerateName types.String `tfsdk:"generate_name"`
21+ Generation types.Int64 `tfsdk:"generation"`
22+ Labels map [string ]types.String `tfsdk:"labels"`
23+ Name types.String `tfsdk:"name"`
24+ Namespace types.String `tfsdk:"namespace"`
25+ ResourceVersion types.String `tfsdk:"resource_version"`
26+ UID types.String `tfsdk:"uid"`
2427}
2528
2629type ValidatingAdmissionPolicySpecModel struct {
27- AuditAnnotations []AuditAnnotationModel `tfsdk:"audit_annotations" manifest:"auditAnnotations" `
28- FailurePolicy types.String `tfsdk:"failure_policy" manifest:"failurePolicy" `
29- MatchConditions []MatchConditionModel `tfsdk:"match_conditions" manifest:"matchConditions" `
30- MatchConstraints MatchConstraintsModel `tfsdk:"match_constraints" manifest:"matchConstraints" `
31- ParamKind * ParamKindModel `tfsdk:"param_kind" manifest:"paramKind" `
32- Validations []ValidationModel `tfsdk:"validations" manifest:"validations" `
33- Variables []VariableModel `tfsdk:"variables" manifest:"variables" `
30+ AuditAnnotations []AuditAnnotationModel `tfsdk:"audit_annotations"`
31+ FailurePolicy types.String `tfsdk:"failure_policy"`
32+ MatchConditions []MatchConditionModel `tfsdk:"match_conditions"`
33+ MatchConstraints MatchConstraintsModel `tfsdk:"match_constraints"`
34+ ParamKind * ParamKindModel `tfsdk:"param_kind"`
35+ Validations []ValidationModel `tfsdk:"validations"`
36+ Variables []VariableModel `tfsdk:"variables"`
3437}
3538
3639type AuditAnnotationModel struct {
37- Key types.String `tfsdk:"key" manifest:"key" `
38- ValueExpression types.String `tfsdk:"value_expression" manifest:"valueExpression" `
40+ Key types.String `tfsdk:"key"`
41+ ValueExpression types.String `tfsdk:"value_expression"`
3942}
4043
4144type MatchConditionModel struct {
42- Expression types.String `tfsdk:"expression" manifest:"expression" `
43- Name types.String `tfsdk:"name" manifest:"name" `
45+ Expression types.String `tfsdk:"expression"`
46+ Name types.String `tfsdk:"name"`
4447}
4548
4649type MatchConstraintsModel struct {
47- ExcludeResourceRules []RuleWithOperationsModel `tfsdk:"exclude_resource_rules" manifest:"excludeResourceRules" `
48- MatchPolicy types.String `tfsdk:"match_policy" manifest:"matchPolicy" `
49- NamespaceSelector * LabelSelectorModel `tfsdk:"namespace_selector" manifest:"namespaceSelector" `
50- ObjectSelector * ObjectSelectorModel `tfsdk:"object_selector" manifest:"objectSelector" `
51- ResourceRules []RuleWithOperationsModel `tfsdk:"resource_rules" manifest:"resourceRules" `
50+ ExcludeResourceRules []RuleWithOperationsModel `tfsdk:"exclude_resource_rules"`
51+ MatchPolicy types.String `tfsdk:"match_policy"`
52+ NamespaceSelector * LabelSelectorModel `tfsdk:"namespace_selector"`
53+ ObjectSelector * ObjectSelectorModel `tfsdk:"object_selector"`
54+ ResourceRules []RuleWithOperationsModel `tfsdk:"resource_rules"`
5255}
5356
5457type RuleWithOperationsModel struct {
55- APIGroups []types.String `tfsdk:"api_groups" manifest:"apiGroups" `
56- APIVersions []types.String `tfsdk:"api_versions" manifest:"apiVersions" `
57- Operations []types.String `tfsdk:"operations" manifest:"operations" `
58- ResourceNames []types.String `tfsdk:"resource_names" manifest:"resourceNames" `
59- Resources []types.String `tfsdk:"resources" manifest:"resources" `
60- Scope types.String `tfsdk:"scope" manifest:"scope" `
58+ APIGroups []types.String `tfsdk:"api_groups"`
59+ APIVersions []types.String `tfsdk:"api_versions"`
60+ Operations []types.String `tfsdk:"operations"`
61+ ResourceNames []types.String `tfsdk:"resource_names"`
62+ Resources []types.String `tfsdk:"resources"`
63+ Scope types.String `tfsdk:"scope"`
6164}
6265
6366type LabelSelectorModel struct {
64- MatchLabels types.Map `tfsdk:"match_labels" manifest:"matchLabels" `
65- MatchExpressions []LabelSelectorRequirementModel `tfsdk:"match_expressions" manifest:"matchExpressions" `
67+ MatchLabels types.Map `tfsdk:"match_labels"`
68+ MatchExpressions []LabelSelectorRequirementModel `tfsdk:"match_expressions"`
6669}
6770
6871type LabelSelectorRequirementModel struct {
69- Key types.String `tfsdk:"key" manifest:"key" `
70- Operator types.String `tfsdk:"operator" manifest:"operator" `
71- Values []types.String `tfsdk:"values" manifest:"values" `
72+ Key types.String `tfsdk:"key"`
73+ Operator types.String `tfsdk:"operator"`
74+ Values []types.String `tfsdk:"values"`
7275}
7376
7477type ObjectSelectorModel struct {
75- LabelSelector LabelSelectorModel `tfsdk:"label_selector" manifest:"labelSelector" `
78+ LabelSelector LabelSelectorModel `tfsdk:"label_selector"`
7679}
7780
7881type ParamKindModel struct {
79- APIVersion types.String `tfsdk:"api_version" manifest:"apiVersion" `
80- Kind types.String `tfsdk:"kind" manifest:"kind" `
82+ APIVersion types.String `tfsdk:"api_version"`
83+ Kind types.String `tfsdk:"kind"`
8184}
8285
8386type ValidationModel struct {
84- Expression types.String `tfsdk:"expression" manifest:"expression" `
85- Message types.String `tfsdk:"message" manifest:"message" `
86- MessageExpression types.String `tfsdk:"message_expression" manifest:"messageExpression" `
87- Reason types.String `tfsdk:"reason" manifest:"reason" `
87+ Expression types.String `tfsdk:"expression"`
88+ Message types.String `tfsdk:"message"`
89+ MessageExpression types.String `tfsdk:"message_expression"`
90+ Reason types.String `tfsdk:"reason"`
8891}
8992
9093type VariableModel struct {
91- Expression types.String `tfsdk:"expression" manifest:"expression" `
92- Name types.String `tfsdk:"name" manifest:"name" `
94+ Expression types.String `tfsdk:"expression"`
95+ Name types.String `tfsdk:"name"`
9396}
9497
9598type ValidatingAdmissionPolicyIdentityModel struct {
96- Name types.String `tfsdk:"name"`
99+ APIVersion types.String `tfsdk:"api_version"`
100+ Kind types.String `tfsdk:"kind"`
101+ Name types.String `tfsdk:"name"`
97102}
0 commit comments