diff --git a/internal/provider/group_resource.go b/internal/provider/group_resource.go index f396108..552a20e 100644 --- a/internal/provider/group_resource.go +++ b/internal/provider/group_resource.go @@ -13,6 +13,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int32default" "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" @@ -82,6 +83,8 @@ func (r *GroupResource) Schema(ctx context.Context, req resource.SchemaRequest, "quota_allowance": schema.Int32Attribute{ MarkdownDescription: "The number of quota credits to allocate to each user in the group.", Optional: true, + Computed: true, + Default: int32default.StaticInt32(0), }, "organization_id": schema.StringAttribute{ MarkdownDescription: "The organization ID that the group belongs to. Defaults to the provider default organization ID.", diff --git a/internal/provider/group_resource_test.go b/internal/provider/group_resource_test.go index b049976..60b2e2d 100644 --- a/internal/provider/group_resource_test.go +++ b/internal/provider/group_resource_test.go @@ -64,6 +64,7 @@ func TestAccGroupResource(t *testing.T) { t.Run("CreateImportUpdateReadOk", func(t *testing.T) { resource.Test(t, resource.TestCase{ + IsUnitTest: true, PreCheck: func() { testAccPreCheck(t) }, ProtoV6ProviderFactories: testAccProtoV6ProviderFactories, Steps: []resource.TestStep{ @@ -111,6 +112,7 @@ func TestAccGroupResource(t *testing.T) { t.Run("CreateUnmanagedMembersOk", func(t *testing.T) { resource.Test(t, resource.TestCase{ + IsUnitTest: true, PreCheck: func() { testAccPreCheck(t) }, ProtoV6ProviderFactories: testAccProtoV6ProviderFactories, Steps: []resource.TestStep{