File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
internal/fleet/agent_policy Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,12 @@ import (
1111 "github.com/hashicorp/terraform-plugin-framework/resource/schema"
1212 "github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault"
1313 "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier"
14+ "github.com/hashicorp/terraform-plugin-framework/resource/schema/mapdefault"
1415 "github.com/hashicorp/terraform-plugin-framework/resource/schema/mapplanmodifier"
1516 "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
1617 "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
1718 "github.com/hashicorp/terraform-plugin-framework/schema/validator"
19+ "github.com/hashicorp/terraform-plugin-framework/types"
1820)
1921
2022func (r * agentPolicyResource ) Schema (ctx context.Context , req resource.SchemaRequest , resp * resource.SchemaResponse ) {
@@ -114,6 +116,12 @@ func getSchema() schema.Schema {
114116 },
115117 Computed : true ,
116118 Optional : true ,
119+ Default : mapdefault .StaticValue (types .MapValueMust (types.ObjectType {
120+ AttrTypes : map [string ]attr.Type {
121+ "string_value" : types .StringType ,
122+ "number_value" : types .Float32Type ,
123+ },
124+ }, map [string ]attr.Value {})),
117125 PlanModifiers : []planmodifier.Map {
118126 mapplanmodifier .UseStateForUnknown (),
119127 },
You can’t perform that action at this time.
0 commit comments