From 793e99745c81539463e74fdc9ace577afd1c195f Mon Sep 17 00:00:00 2001 From: Daniel Hougaard Date: Mon, 16 Sep 2024 16:59:01 +0400 Subject: [PATCH] fix: infinite drift on project role resource --- internal/provider/resource/project_role_resource.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/provider/resource/project_role_resource.go b/internal/provider/resource/project_role_resource.go index ed81941..22c3a0d 100644 --- a/internal/provider/resource/project_role_resource.go +++ b/internal/provider/resource/project_role_resource.go @@ -10,6 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" "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" "github.com/hashicorp/terraform-plugin-framework/types" ) @@ -71,8 +72,10 @@ func (r *projectRoleResource) Schema(_ context.Context, _ resource.SchemaRequest Required: true, }, "description": schema.StringAttribute{ - Description: "The description for the new role", + Description: "The description for the new role. Defaults to an empty string.", Optional: true, + Computed: true, + Default: stringdefault.StaticString(""), }, "project_slug": schema.StringAttribute{ Description: "The slug of the project to create role",