From 5fd42a9a403209d98e88bd8d95105ed9a273a44d Mon Sep 17 00:00:00 2001 From: Rui Fu Date: Sat, 20 Apr 2024 17:43:30 +0800 Subject: [PATCH] make input topics and subscription forcenew (#120) --- pulsar/resource_pulsar_function.go | 3 +++ pulsar/resource_pulsar_sink.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/pulsar/resource_pulsar_function.go b/pulsar/resource_pulsar_function.go index abc1d81..715ebb2 100644 --- a/pulsar/resource_pulsar_function.go +++ b/pulsar/resource_pulsar_function.go @@ -183,12 +183,14 @@ func resourcePulsarFunction() *schema.Resource { resourceFunctionInputsKey: { Type: schema.TypeSet, Optional: true, + ForceNew: true, Description: resourceFunctionDescriptions[resourceFunctionInputsKey], Elem: &schema.Schema{Type: schema.TypeString}, }, resourceFunctionTopicsPatternKey: { Type: schema.TypeString, Optional: true, + ForceNew: true, Description: resourceFunctionDescriptions[resourceFunctionTopicsPatternKey], }, resourceFunctionOutputKey: { @@ -209,6 +211,7 @@ func resourcePulsarFunction() *schema.Resource { resourceFunctionSubscriptionNameKey: { Type: schema.TypeString, Optional: true, + ForceNew: true, Description: resourceFunctionDescriptions[resourceFunctionSubscriptionNameKey], }, resourceFunctionSubscriptionPositionKey: { diff --git a/pulsar/resource_pulsar_sink.go b/pulsar/resource_pulsar_sink.go index 0c286fb..2a2c52e 100644 --- a/pulsar/resource_pulsar_sink.go +++ b/pulsar/resource_pulsar_sink.go @@ -152,17 +152,20 @@ func resourcePulsarSink() *schema.Resource { resourceSinkInputsKey: { Type: schema.TypeSet, Optional: true, + ForceNew: true, Description: resourceSinkDescriptions[resourceSinkInputsKey], Elem: &schema.Schema{Type: schema.TypeString}, }, resourceSinkTopicsPatternKey: { Type: schema.TypeString, Optional: true, + ForceNew: true, Description: resourceSinkDescriptions[resourceSinkTopicsPatternKey], }, resourceSinkSubscriptionNameKey: { Type: schema.TypeString, Optional: true, + ForceNew: true, Description: resourceSinkDescriptions[resourceSinkSubscriptionNameKey], }, resourceSinkCleanupSubscriptionKey: {