Skip to content

Commit

Permalink
Fix incorrect usage func names
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhung committed Apr 29, 2024
1 parent a0d68a7 commit a2bc886
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/xray/resource/resource_xray_workers_count.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ func (r *WorkersCountResource) Create(ctx context.Context, req resource.CreateRe
}

func (r *WorkersCountResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) {
go util.SendUsageResourceCreate(ctx, r.ProviderData.Client, r.ProviderData.ProductId, r.TypeName)
go util.SendUsageResourceRead(ctx, r.ProviderData.Client, r.ProviderData.ProductId, r.TypeName)

var state WorkersCountResourceModel
// Read Terraform prior state data into the model
Expand Down Expand Up @@ -393,7 +393,7 @@ func (r *WorkersCountResource) Read(ctx context.Context, req resource.ReadReques
}

func (r *WorkersCountResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) {
go util.SendUsageResourceCreate(ctx, r.ProviderData.Client, r.ProviderData.ProductId, r.TypeName)
go util.SendUsageResourceUpdate(ctx, r.ProviderData.Client, r.ProviderData.ProductId, r.TypeName)

var plan WorkersCountResourceModel

Expand Down Expand Up @@ -430,7 +430,7 @@ func (r *WorkersCountResource) Update(ctx context.Context, req resource.UpdateRe
// Delete No delete functionality provided by API for the settings or DB sync call.
// This function will remove the object from the Terraform state
func (r *WorkersCountResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) {
go util.SendUsageResourceCreate(ctx, r.ProviderData.Client, r.ProviderData.ProductId, r.TypeName)
go util.SendUsageResourceDelete(ctx, r.ProviderData.Client, r.ProviderData.ProductId, r.TypeName)

resp.Diagnostics.AddWarning(
"Workers Count resource does not support delete",
Expand Down

0 comments on commit a2bc886

Please sign in to comment.