From 96d1e2244e3c30ad57a01444c6fff3a72ae04f54 Mon Sep 17 00:00:00 2001 From: Rui Fu Date: Wed, 2 Oct 2024 06:59:46 +0800 Subject: [PATCH] force functions and connector using v3 api admin client (#126) * deprecate api_version in pulsar provider * fix docs * fix ci * better err log * more logs * print config * fix client * fix client in test --------- Co-authored-by: Benjamin Nelson --- README.md | 3 -- examples/functions/main.tf | 1 - examples/sinks/main.tf | 1 - examples/sources/main.tf | 1 - pulsar/client.go | 6 ++- pulsar/provider.go | 49 +++++++++++++++-- pulsar/resource_pulsar_function.go | 70 +++++++++++++++++++------ pulsar/resource_pulsar_function_test.go | 11 ++-- pulsar/resource_pulsar_sink.go | 9 ++-- pulsar/resource_pulsar_sink_test.go | 12 ++--- pulsar/resource_pulsar_source.go | 9 ++-- pulsar/resource_pulsar_source_test.go | 9 ++-- pulsar/testdata/function/main.tf | 1 - pulsar/testdata/sink/main.tf | 1 - pulsar/testdata/source/main.tf | 1 - 15 files changed, 126 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index 4a4699b..0cfcfb8 100644 --- a/README.md +++ b/README.md @@ -363,7 +363,6 @@ A resource for creating and managing Apache Pulsar Functions. ```hcl provider "pulsar" { web_service_url = "http://localhost:8080" - api_version = "3" } resource "pulsar_function" "function-1" { @@ -462,7 +461,6 @@ A resource for creating and managing Apache Pulsar Sources. ```hcl provider "pulsar" { web_service_url = "http://localhost:8080" - api_version = "3" } resource "pulsar_source" "source-1" { @@ -514,7 +512,6 @@ A resource for creating and managing Apache Pulsar Sinks. ```hcl provider "pulsar" { web_service_url = "http://localhost:8080" - api_version = "3" } resource "pulsar_sink" "sample-sink-1" { diff --git a/examples/functions/main.tf b/examples/functions/main.tf index e7fb172..ef2cd07 100644 --- a/examples/functions/main.tf +++ b/examples/functions/main.tf @@ -26,7 +26,6 @@ terraform { provider "pulsar" { web_service_url = "http://localhost:8080" - api_version = "3" } // Note: function resource requires v3 api. diff --git a/examples/sinks/main.tf b/examples/sinks/main.tf index 4ed2e2b..cb5c4d7 100644 --- a/examples/sinks/main.tf +++ b/examples/sinks/main.tf @@ -26,7 +26,6 @@ terraform { provider "pulsar" { web_service_url = "http://localhost:8080" - api_version = "3" } // Note: sink resource requires v3 api. diff --git a/examples/sources/main.tf b/examples/sources/main.tf index 974e5b3..d13dff1 100644 --- a/examples/sources/main.tf +++ b/examples/sources/main.tf @@ -26,7 +26,6 @@ terraform { provider "pulsar" { web_service_url = "http://localhost:8080" - api_version = "3" } resource "pulsar_source" "source-1" { diff --git a/pulsar/client.go b/pulsar/client.go index 7ddae4f..fdd21b4 100644 --- a/pulsar/client.go +++ b/pulsar/client.go @@ -22,5 +22,9 @@ import ( ) func getClientFromMeta(meta interface{}) admin.Client { - return meta.(admin.Client) + return meta.(PulsarClientBundle).Client +} + +func getV3ClientFromMeta(meta interface{}) admin.Client { + return meta.(PulsarClientBundle).V3Client } diff --git a/pulsar/provider.go b/pulsar/provider.go index 47aa5cd..ab296be 100644 --- a/pulsar/provider.go +++ b/pulsar/provider.go @@ -24,7 +24,8 @@ import ( "os" "strconv" - "github.com/apache/pulsar-client-go/pulsaradmin/pkg/admin/config" + pulsaradmin "github.com/apache/pulsar-client-go/pulsaradmin/pkg/admin" + adminconfig "github.com/apache/pulsar-client-go/pulsaradmin/pkg/admin/config" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/pkg/errors" @@ -69,6 +70,12 @@ func init() { } } +// PulsarClientBundle is a struct that holds the pulsar admin client for both v2 and v3 api versions +type PulsarClientBundle struct { + Client pulsaradmin.Client + V3Client pulsaradmin.Client +} + // Provider returns a schema.Provider func Provider() *schema.Provider { provider := &schema.Provider{ @@ -204,10 +211,17 @@ func providerConfigure(d *schema.ResourceData, tfVersion string) (interface{}, d return nil, diag.FromErr(fmt.Errorf("ERROR_PULSAR_CONFIG_tls_TRUST_FILE_NOTEXIST: %q", TLSTrustCertsFilePath)) } - config := &config.Config{ + configVersion := adminconfig.APIVersion(apiVersion) + // for backward compatibility, if user state api_version as 3 + // we will use v2 as the default client version because we have v3 as individual client + if configVersion == adminconfig.V3 { + configVersion = adminconfig.APIVersion(0) // v2 will be the default client version + } + + config := &adminconfig.Config{ WebServiceURL: clusterURL, Token: token, - PulsarAPIVersion: config.APIVersion(apiVersion), + PulsarAPIVersion: configVersion, TLSTrustCertsFilePath: TLSTrustCertsFilePath, TLSAllowInsecureConnection: TLSAllowInsecureConnection, IssuerEndpoint: issuerEndpoint, @@ -226,7 +240,34 @@ func providerConfigure(d *schema.ResourceData, tfVersion string) (interface{}, d return nil, diag.FromErr(err) } - return client, nil + configV3 := &adminconfig.Config{ + WebServiceURL: clusterURL, + Token: token, + PulsarAPIVersion: adminconfig.V3, + TLSTrustCertsFilePath: TLSTrustCertsFilePath, + TLSAllowInsecureConnection: TLSAllowInsecureConnection, + IssuerEndpoint: issuerEndpoint, + ClientID: clientID, + Audience: audience, + Scope: scope, + KeyFile: keyFilePath, + TLSKeyFile: TLSKeyFilePath, + TLSCertFile: TLSCertFilePath, + } + + clientV3, err := admin.NewPulsarAdminClient(&admin.PulsarAdminConfig{ + Config: configV3, + }) + if err != nil { + return nil, diag.FromErr(err) + } + + clientBundle := PulsarClientBundle{ + Client: client, + V3Client: clientV3, + } + + return clientBundle, nil } // Exists reports whether the named file or directory exists. diff --git a/pulsar/resource_pulsar_function.go b/pulsar/resource_pulsar_function.go index 715ebb2..fcdfe8a 100644 --- a/pulsar/resource_pulsar_function.go +++ b/pulsar/resource_pulsar_function.go @@ -23,7 +23,6 @@ import ( "fmt" "strings" - "github.com/apache/pulsar-client-go/pulsaradmin/pkg/admin" "github.com/apache/pulsar-client-go/pulsaradmin/pkg/rest" "github.com/apache/pulsar-client-go/pulsaradmin/pkg/utils" "github.com/hashicorp/terraform-plugin-log/tflog" @@ -380,7 +379,7 @@ func resourcePulsarFunction() *schema.Resource { } func resourcePulsarFunctionRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - client := meta.(admin.Client).Functions() + client := getV3ClientFromMeta(meta).Functions() tenant := d.Get(resourceFunctionTenantKey).(string) namespace := d.Get(resourceFunctionNamespaceKey).(string) @@ -396,13 +395,17 @@ func resourcePulsarFunctionRead(ctx context.Context, d *schema.ResourceData, met return diag.FromErr(errors.Wrapf(err, "failed to get function %s", d.Id())) } - unmarshalFunctionConfig(functionConfig, d) + err = unmarshalFunctionConfig(functionConfig, d) + if err != nil { + tflog.Debug(ctx, fmt.Sprintf("@@@Read function: %v", err)) + return diag.Errorf("ERROR_UNMARSHAL_FUNCTION_CONFIG: %v", err) + } return nil } func resourcePulsarFunctionCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - client := meta.(admin.Client).Functions() + client := getV3ClientFromMeta(meta).Functions() functionConfig, err := marshalFunctionConfig(d) if err != nil { @@ -434,7 +437,7 @@ func resourcePulsarFunctionCreate(ctx context.Context, d *schema.ResourceData, m } func resourcePulsarFunctionUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - client := meta.(admin.Client).Functions() + client := getV3ClientFromMeta(meta).Functions() functionConfig, err := marshalFunctionConfig(d) if err != nil { @@ -465,7 +468,7 @@ func resourcePulsarFunctionUpdate(ctx context.Context, d *schema.ResourceData, m } func resourcePulsarFunctionDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - client := meta.(admin.Client).Functions() + client := getV3ClientFromMeta(meta).Functions() tenant := d.Get(resourceFunctionTenantKey).(string) namespace := d.Get(resourceFunctionNamespaceKey).(string) @@ -676,19 +679,31 @@ func marshalFunctionConfig(d *schema.ResourceData) (*utils.FunctionConfig, error func unmarshalFunctionConfig(functionConfig utils.FunctionConfig, d *schema.ResourceData) error { if functionConfig.Jar != nil { - d.Set(resourceFunctionJarKey, *functionConfig.Jar) + err := d.Set(resourceFunctionJarKey, *functionConfig.Jar) + if err != nil { + return err + } } if functionConfig.Py != nil { - d.Set(resourceFunctionPyKey, *functionConfig.Py) + err := d.Set(resourceFunctionPyKey, *functionConfig.Py) + if err != nil { + return err + } } if functionConfig.Go != nil { - d.Set(resourceFunctionGoKey, *functionConfig.Go) + err := d.Set(resourceFunctionGoKey, *functionConfig.Go) + if err != nil { + return err + } } if functionConfig.ClassName != "" { - d.Set(resourceFunctionClassNameKey, functionConfig.ClassName) + err := d.Set(resourceFunctionClassNameKey, functionConfig.ClassName) + if err != nil { + return err + } } if len(functionConfig.Inputs) != 0 { @@ -702,31 +717,52 @@ func unmarshalFunctionConfig(functionConfig utils.FunctionConfig, d *schema.Reso } if functionConfig.TopicsPattern != nil { - d.Set(resourceFunctionTopicsPatternKey, *functionConfig.TopicsPattern) + err := d.Set(resourceFunctionTopicsPatternKey, *functionConfig.TopicsPattern) + if err != nil { + return err + } } if functionConfig.Parallelism != 0 { - d.Set(resourceFunctionParallelismKey, functionConfig.Parallelism) + err := d.Set(resourceFunctionParallelismKey, functionConfig.Parallelism) + if err != nil { + return err + } } if functionConfig.Output != "" { - d.Set(resourceFunctionOutputKey, functionConfig.Output) + err := d.Set(resourceFunctionOutputKey, functionConfig.Output) + if err != nil { + return err + } } if functionConfig.Parallelism != 0 { - d.Set(resourceFunctionParallelismKey, functionConfig.Parallelism) + err := d.Set(resourceFunctionParallelismKey, functionConfig.Parallelism) + if err != nil { + return err + } } if functionConfig.ProcessingGuarantees != "" { - d.Set(resourceFunctionProcessingGuaranteesKey, functionConfig.ProcessingGuarantees) + err := d.Set(resourceFunctionProcessingGuaranteesKey, functionConfig.ProcessingGuarantees) + if err != nil { + return err + } } if functionConfig.SubName != "" { - d.Set(resourceFunctionSubscriptionNameKey, functionConfig.SubName) + err := d.Set(resourceFunctionSubscriptionNameKey, functionConfig.SubName) + if err != nil { + return err + } } if functionConfig.SubscriptionPosition != "" { - d.Set(resourceFunctionSubscriptionPositionKey, functionConfig.SubscriptionPosition) + err := d.Set(resourceFunctionSubscriptionPositionKey, functionConfig.SubscriptionPosition) + if err != nil { + return err + } } err := d.Set(resourceFunctionCleanupSubscriptionKey, functionConfig.CleanupSubscription) diff --git a/pulsar/resource_pulsar_function_test.go b/pulsar/resource_pulsar_function_test.go index 2fe102b..30071d6 100644 --- a/pulsar/resource_pulsar_function_test.go +++ b/pulsar/resource_pulsar_function_test.go @@ -20,11 +20,10 @@ package pulsar import ( "errors" "fmt" - "io/ioutil" + "os" "strings" "testing" - "github.com/apache/pulsar-client-go/pulsaradmin/pkg/admin/config" "github.com/apache/pulsar-client-go/pulsaradmin/pkg/rest" "github.com/apache/pulsar-client-go/pulsaradmin/pkg/utils" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" @@ -37,13 +36,13 @@ func init() { } func TestFunction(t *testing.T) { - configBytes, err := ioutil.ReadFile("testdata/function/main.tf") + configBytes, err := os.ReadFile("testdata/function/main.tf") if err != nil { t.Fatal(err) } resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheckWithAPIVersion(t, config.V3) }, + PreCheck: func() { testAccPreCheck(t) }, ProviderFactories: testAccProviderFactories, PreventPostDestroyRefresh: false, CheckDestroy: testPulsarFunctionDestroy, @@ -65,11 +64,13 @@ func TestFunction(t *testing.T) { if config == nil { return fmt.Errorf("failed to create %s function", rs.Primary.ID) } + fmt.Printf("config: %v\n", config) assert.Equal(t, "function-1", config.Name) assert.Equal(t, "public", config.Tenant) assert.Equal(t, "default", config.Namespace) assert.Equal(t, ProcessingGuaranteesAtLeastOnce, config.ProcessingGuarantees) + assert.NotNil(t, config.TimeoutMs) assert.Equal(t, int64(6666), *config.TimeoutMs) assert.NotNil(t, config.Resources) @@ -100,7 +101,7 @@ func testPulsarFunctionDestroy(s *terraform.State) error { } func getPulsarFunctionByResourceID(id string) (*utils.FunctionConfig, error) { - client := getClientFromMeta(testAccProvider.Meta()).Functions() + client := getV3ClientFromMeta(testAccProvider.Meta()).Functions() parts := strings.Split(id, "/") if len(parts) != 3 { diff --git a/pulsar/resource_pulsar_sink.go b/pulsar/resource_pulsar_sink.go index 2a2c52e..3e66e92 100644 --- a/pulsar/resource_pulsar_sink.go +++ b/pulsar/resource_pulsar_sink.go @@ -23,7 +23,6 @@ import ( "fmt" "strings" - "github.com/apache/pulsar-client-go/pulsaradmin/pkg/admin" "github.com/apache/pulsar-client-go/pulsaradmin/pkg/rest" "github.com/apache/pulsar-client-go/pulsaradmin/pkg/utils" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" @@ -360,7 +359,7 @@ func resourcePulsarSink() *schema.Resource { } func resourcePulsarSinkCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - client := meta.(admin.Client).Sinks() + client := getV3ClientFromMeta(meta).Sinks() sinkConfig, err := marshalSinkConfig(d) if err != nil { @@ -380,7 +379,7 @@ func resourcePulsarSinkCreate(ctx context.Context, d *schema.ResourceData, meta } func resourcePulsarSinkRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - client := meta.(admin.Client).Sinks() + client := getV3ClientFromMeta(meta).Sinks() tenant := d.Get(resourceSinkTenantKey).(string) namespace := d.Get(resourceSinkNamespaceKey).(string) @@ -599,7 +598,7 @@ func resourcePulsarSinkRead(ctx context.Context, d *schema.ResourceData, meta in } func resourcePulsarSinkUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - client := meta.(admin.Client).Sinks() + client := getV3ClientFromMeta(meta).Sinks() sinkConfig, err := marshalSinkConfig(d) if err != nil { @@ -620,7 +619,7 @@ func resourcePulsarSinkUpdate(ctx context.Context, d *schema.ResourceData, meta } func resourcePulsarSinkDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - client := meta.(admin.Client).Sinks() + client := getV3ClientFromMeta(meta).Sinks() tenant := d.Get(resourceSinkTenantKey).(string) namespace := d.Get(resourceSinkNamespaceKey).(string) diff --git a/pulsar/resource_pulsar_sink_test.go b/pulsar/resource_pulsar_sink_test.go index f5a3584..8545334 100644 --- a/pulsar/resource_pulsar_sink_test.go +++ b/pulsar/resource_pulsar_sink_test.go @@ -24,7 +24,6 @@ import ( "strings" "testing" - "github.com/apache/pulsar-client-go/pulsaradmin/pkg/admin" "github.com/apache/pulsar-client-go/pulsaradmin/pkg/admin/config" "github.com/apache/pulsar-client-go/pulsaradmin/pkg/rest" "github.com/apache/pulsar-client-go/pulsaradmin/pkg/utils" @@ -50,7 +49,7 @@ func TestSink(t *testing.T) { } resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheckWithAPIVersion(t, config.V3) }, + PreCheck: func() { testAccPreCheck(t) }, ProviderFactories: testAccProviderFactories, PreventPostDestroyRefresh: false, CheckDestroy: testPulsarSinkDestroy, @@ -64,7 +63,7 @@ func TestSink(t *testing.T) { return fmt.Errorf("%s not be found", name) } - client := getClientFromMeta(testAccProvider.Meta()).Sinks() + client := getV3ClientFromMeta(testAccProvider.Meta()).Sinks() parts := strings.Split(rs.Primary.ID, "/") if len(parts) != 3 { @@ -84,7 +83,7 @@ func TestSink(t *testing.T) { } func testPulsarSinkDestroy(s *terraform.State) error { - client := testAccProvider.Meta().(admin.Client).Sinks() + client := getV3ClientFromMeta(testAccProvider.Meta()).Sinks() for _, rs := range s.RootModule().Resources { if rs.Type != "pulsar_sink" { @@ -204,7 +203,6 @@ func testSampleSink(name string) string { return fmt.Sprintf(` provider "pulsar" { web_service_url = "http://localhost:8080" - api_version = "3" } resource "pulsar_sink" "test" { @@ -247,7 +245,7 @@ func TestSinkUpdate(t *testing.T) { configString = strings.ReplaceAll(configString, "sink-1", "update-sink-test-1") resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheckWithAPIVersion(t, config.V3) }, + PreCheck: func() { testAccPreCheck(t) }, ProviderFactories: testAccProviderFactories, PreventPostDestroyRefresh: false, CheckDestroy: testPulsarSinkDestroy, @@ -261,7 +259,7 @@ func TestSinkUpdate(t *testing.T) { return fmt.Errorf("%s not be found", name) } - client := getClientFromMeta(testAccProvider.Meta()).Sinks() + client := getV3ClientFromMeta(testAccProvider.Meta()).Sinks() parts := strings.Split(rs.Primary.ID, "/") if len(parts) != 3 { diff --git a/pulsar/resource_pulsar_source.go b/pulsar/resource_pulsar_source.go index 8f98753..d83aea6 100644 --- a/pulsar/resource_pulsar_source.go +++ b/pulsar/resource_pulsar_source.go @@ -23,7 +23,6 @@ import ( "fmt" "strings" - "github.com/apache/pulsar-client-go/pulsaradmin/pkg/admin" "github.com/apache/pulsar-client-go/pulsaradmin/pkg/rest" "github.com/apache/pulsar-client-go/pulsaradmin/pkg/utils" "github.com/hashicorp/terraform-plugin-log/tflog" @@ -305,7 +304,7 @@ func resourcePulsarSource() *schema.Resource { } func resourcePulsarSourceCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - client := meta.(admin.Client).Sources() + client := getV3ClientFromMeta(meta).Sources() sourceConfig, err := marshalSourceConfig(d) if err != nil { @@ -327,7 +326,7 @@ func resourcePulsarSourceCreate(ctx context.Context, d *schema.ResourceData, met } func resourcePulsarSourceRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - client := meta.(admin.Client).Sources() + client := getV3ClientFromMeta(meta).Sources() tenant := d.Get(resourceSourceTenantKey).(string) namespace := d.Get(resourceSourceNamespaceKey).(string) @@ -527,7 +526,7 @@ func resourcePulsarSourceRead(ctx context.Context, d *schema.ResourceData, meta } func resourcePulsarSourceUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - client := meta.(admin.Client).Sources() + client := getV3ClientFromMeta(meta).Sources() sourceConfig, err := marshalSourceConfig(d) if err != nil { @@ -548,7 +547,7 @@ func resourcePulsarSourceUpdate(ctx context.Context, d *schema.ResourceData, met } func resourcePulsarSourceDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - client := meta.(admin.Client).Sources() + client := getV3ClientFromMeta(meta).Sources() tenant := d.Get(resourceSourceTenantKey).(string) namespace := d.Get(resourceSourceNamespaceKey).(string) diff --git a/pulsar/resource_pulsar_source_test.go b/pulsar/resource_pulsar_source_test.go index 9822d6c..4c2405c 100644 --- a/pulsar/resource_pulsar_source_test.go +++ b/pulsar/resource_pulsar_source_test.go @@ -20,7 +20,7 @@ package pulsar import ( "encoding/json" "fmt" - "io/ioutil" + "os" "strings" "testing" @@ -44,13 +44,13 @@ var testdataSourceArchive = "https://www.apache.org/dyn/mirrors/mirrors.cgi" + "?action=download&filename=pulsar/pulsar-2.10.4/connectors/pulsar-io-file-2.10.4.nar" func TestSource(t *testing.T) { - configBytes, err := ioutil.ReadFile("testdata/source/main.tf") + configBytes, err := os.ReadFile("testdata/source/main.tf") if err != nil { t.Fatal(err) } resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheckWithAPIVersion(t, config.V3) }, + PreCheck: func() { testAccPreCheck(t) }, ProviderFactories: testAccProviderFactories, PreventPostDestroyRefresh: false, CheckDestroy: testPulsarSourceDestroy, @@ -114,7 +114,7 @@ func testPulsarSourceDestroy(s *terraform.State) error { } func getPulsarSourceByResourceID(id string) (*utils.SourceConfig, error) { - client := getClientFromMeta(testAccProvider.Meta()).Sources() + client := getV3ClientFromMeta(testAccProvider.Meta()).Sources() parts := strings.Split(id, "/") if len(parts) != 3 { @@ -223,7 +223,6 @@ func testSampleSource(name string) string { return fmt.Sprintf(` provider "pulsar" { web_service_url = "%s" - api_version = "3" } resource "pulsar_source" "test" { diff --git a/pulsar/testdata/function/main.tf b/pulsar/testdata/function/main.tf index 812d600..8997df4 100644 --- a/pulsar/testdata/function/main.tf +++ b/pulsar/testdata/function/main.tf @@ -1,7 +1,6 @@ provider "pulsar" { web_service_url = "http://localhost:8080" - api_version = "3" } resource "pulsar_function" "function-1" { diff --git a/pulsar/testdata/sink/main.tf b/pulsar/testdata/sink/main.tf index af78548..30e78aa 100644 --- a/pulsar/testdata/sink/main.tf +++ b/pulsar/testdata/sink/main.tf @@ -17,7 +17,6 @@ provider "pulsar" { web_service_url = "http://localhost:8080" - api_version = "3" } resource "pulsar_sink" "sink-1" { diff --git a/pulsar/testdata/source/main.tf b/pulsar/testdata/source/main.tf index aca0917..7263f98 100644 --- a/pulsar/testdata/source/main.tf +++ b/pulsar/testdata/source/main.tf @@ -17,7 +17,6 @@ provider "pulsar" { web_service_url = "http://localhost:8080" - api_version = "3" } resource "pulsar_source" "source-1" {