diff --git a/internal/provider/metrics_endpoint_resource.go b/internal/provider/metrics_endpoint_resource.go index 9afa02e..c36e42a 100644 --- a/internal/provider/metrics_endpoint_resource.go +++ b/internal/provider/metrics_endpoint_resource.go @@ -268,7 +268,7 @@ func (r *metricsEndpointResource) Delete(ctx context.Context, req resource.Delet metricsReq := &cloudservicev1.UpdateAccountRequest{ ResourceVersion: accResp.GetAccount().GetResourceVersion(), Spec: &accountv1.AccountSpec{ - Metrics: &accountv1.MetricsSpec{}, + Metrics: nil, }, } diff --git a/internal/provider/metrics_endpoint_resource_test.go b/internal/provider/metrics_endpoint_resource_test.go index 4bd33da..4042b79 100644 --- a/internal/provider/metrics_endpoint_resource_test.go +++ b/internal/provider/metrics_endpoint_resource_test.go @@ -1,34 +1,31 @@ package provider import ( + "fmt" "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccBasicAccountMetrics(t *testing.T) { - config := ` + config := func(cert string) string { + return fmt.Sprintf(` provider "temporalcloud" { } -resource "temporalcloud_account_metrics" "terraform" { +resource "temporalcloud_metrics_endpoint" "terraform" { accepted_client_ca = base64encode(<