Skip to content

Commit

Permalink
Revert "Remove singleton check"
Browse files Browse the repository at this point in the history
This reverts commit 2f2187f.
  • Loading branch information
briankassouf committed Jan 9, 2025
1 parent 2f2187f commit d3935da
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/provider/metrics_endpoint_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ func (r *metricsEndpointResource) Create(ctx context.Context, req resource.Creat
return
}

if accResp.GetAccount().GetMetrics().GetUri() != "" {
resp.Diagnostics.AddError("Metrics endpoint already configured.", fmt.Sprintf("account metrics endpoint already configured with url %q, remove the existing metrics configuration to manage it with Terraform", accResp.GetAccount().GetMetrics().GetUri()))
return
}

certs, err := base64.StdEncoding.DecodeString(plan.AcceptedClientCA.ValueString())
if err != nil {
resp.Diagnostics.AddError("Invalid (base64 encoded) accepted_client_ca", err.Error())
Expand Down

0 comments on commit d3935da

Please sign in to comment.