diff --git a/provider/file_resource.go b/provider/file_resource.go index afd01b5..0885c01 100644 --- a/provider/file_resource.go +++ b/provider/file_resource.go @@ -60,7 +60,7 @@ func (r *fileResource) Schema(ctx context.Context, req resource.SchemaRequest, r }, "challenge_id": schema.StringAttribute{ MarkdownDescription: "Challenge of the file.", - Required: true, + Optional: true, }, "name": schema.StringAttribute{ MarkdownDescription: "Name of the file as displayed to end-users.", @@ -291,9 +291,5 @@ func lookForChallengeId(ctx context.Context, client *api.Client, fileID int, dia } } } - diags.AddError( - "Provider Error", - fmt.Sprintf("Unable to find challenge of file %d", fileID), - ) return types.StringNull() }