7
7
"github.com/hashicorp/terraform-plugin-framework/path"
8
8
"github.com/hashicorp/terraform-plugin-framework/resource"
9
9
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
10
+ "github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault"
10
11
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
12
+ "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault"
11
13
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
12
14
"github.com/hashicorp/terraform-plugin-framework/types"
13
15
"github.com/hashicorp/terraform-plugin-log/tflog"
@@ -56,6 +58,8 @@ func (r *PolicyResource) Schema(_ context.Context, _ resource.SchemaRequest, res
56
58
"description" : schema.StringAttribute {
57
59
Description : "Description of the policy." ,
58
60
Optional : true ,
61
+ Computed : true ,
62
+ Default : stringdefault .StaticString ("" ),
59
63
},
60
64
"name" : schema.StringAttribute {
61
65
Description : "Name of the policy." ,
@@ -78,14 +82,20 @@ func (r *PolicyResource) Schema(_ context.Context, _ resource.SchemaRequest, res
78
82
"enforced" : schema.BoolAttribute {
79
83
Description : "Whether the policy is enforced within the namespace hierarchy." ,
80
84
Optional : true ,
85
+ Computed : true ,
86
+ Default : booldefault .StaticBool (false ),
81
87
},
82
88
"explanation" : schema.StringAttribute {
83
89
Description : "Explanation of the policy." ,
84
90
Optional : true ,
91
+ Computed : true ,
92
+ Default : stringdefault .StaticString ("" ),
85
93
},
86
94
"remediation" : schema.StringAttribute {
87
95
Description : "Remediation of the policy." ,
88
96
Optional : true ,
97
+ Computed : true ,
98
+ Default : stringdefault .StaticString ("" ),
89
99
},
90
100
},
91
101
}
0 commit comments