Skip to content

Commit a656f71

Browse files
committed
feat: quotas in landing zone resource
1 parent 78cf4fe commit a656f71

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

internal/provider/landingzone_resource.go

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"regexp"
77

88
"github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier"
9+
"github.com/hashicorp/terraform-plugin-framework/resource/schema/listdefault"
910
"github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier"
1011
"github.com/meshcloud/terraform-provider-meshstack/client"
1112
"github.com/meshcloud/terraform-provider-meshstack/internal/modifiers/platformtypemodifier"
@@ -177,6 +178,32 @@ func (r *landingZoneResource) Schema(_ context.Context, _ resource.SchemaRequest
177178
},
178179
},
179180
},
181+
"quotas": schema.ListNestedAttribute{
182+
MarkdownDescription: "Quota definitions for this landing zone.",
183+
Optional: true,
184+
Computed: true,
185+
Default: listdefault.StaticValue(types.ListValueMust(
186+
types.ObjectType{
187+
AttrTypes: map[string]attr.Type{
188+
"key": types.StringType,
189+
"value": types.Int64Type,
190+
},
191+
},
192+
[]attr.Value{},
193+
)),
194+
NestedObject: schema.NestedAttributeObject{
195+
Attributes: map[string]schema.Attribute{
196+
"key": schema.StringAttribute{
197+
MarkdownDescription: "Quota key identifier.",
198+
Required: true,
199+
},
200+
"value": schema.Int64Attribute{
201+
MarkdownDescription: "Quota value.",
202+
Required: true,
203+
},
204+
},
205+
},
206+
},
180207
},
181208
},
182209

0 commit comments

Comments
 (0)