@@ -57,7 +57,7 @@ func (r *OrganizationResource) Schema(ctx context.Context, req resource.SchemaRe
57
57
},
58
58
},
59
59
"name" : schema.StringAttribute {
60
- MarkdownDescription : "Username of the organization." ,
60
+ MarkdownDescription : "Name of the organization." ,
61
61
Required : true ,
62
62
Validators : []validator.String {
63
63
codersdkvalidator .Name (),
@@ -67,6 +67,7 @@ func (r *OrganizationResource) Schema(ctx context.Context, req resource.SchemaRe
67
67
MarkdownDescription : "Display name of the organization. Defaults to name." ,
68
68
Computed : true ,
69
69
Optional : true ,
70
+ Default : stringdefault .StaticString ("" ),
70
71
Validators : []validator.String {
71
72
codersdkvalidator .DisplayName (),
72
73
},
@@ -224,6 +225,6 @@ func (r *OrganizationResource) Delete(ctx context.Context, req resource.DeleteRe
224
225
225
226
func (r * OrganizationResource ) ImportState (ctx context.Context , req resource.ImportStateRequest , resp * resource.ImportStateResponse ) {
226
227
// Terraform will eventually `Read` in the rest of the fields after we have
227
- // set the `id ` attribute.
228
- resource .ImportStatePassthroughID (ctx , path .Root ("id " ), req , resp )
228
+ // set the `name ` attribute.
229
+ resource .ImportStatePassthroughID (ctx , path .Root ("name " ), req , resp )
229
230
}
0 commit comments