From 9dd3406f4efaa52f53af0b4e6b2a348829ffd57f Mon Sep 17 00:00:00 2001 From: Andre Kurait Date: Fri, 11 Oct 2024 17:03:30 -0500 Subject: [PATCH] Fix target proxy not needing kafka param Signed-off-by: Andre Kurait --- .../lib/service-stacks/capture-proxy-stack.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/deployment/cdk/opensearch-service-migration/lib/service-stacks/capture-proxy-stack.ts b/deployment/cdk/opensearch-service-migration/lib/service-stacks/capture-proxy-stack.ts index 45d7416db..ef1b45466 100644 --- a/deployment/cdk/opensearch-service-migration/lib/service-stacks/capture-proxy-stack.ts +++ b/deployment/cdk/opensearch-service-migration/lib/service-stacks/capture-proxy-stack.ts @@ -114,11 +114,6 @@ export class CaptureProxyStack extends MigrationServiceCore { const servicePolicies = props.streamingSourceType === StreamingSourceType.AWS_MSK ? createMSKProducerIAMPolicies(this, this.partition, this.region, this.account, props.stage, props.defaultDeployId) : [] - const brokerEndpoints = getMigrationStringParameterValue(this, { - ...props, - parameter: MigrationSSMParameter.KAFKA_BROKERS, - }); - const destinationEndpoint = getDestinationEndpoint(this, props.destinationConfig, props); let command = "/runJavaWithClasspath.sh org.opensearch.migrations.trafficcapture.proxyserver.CaptureProxy" @@ -129,6 +124,10 @@ export class CaptureProxyStack extends MigrationServiceCore { command = appendArgIfNotInExtraArgs(command, extraArgsDict, "--listenPort", "9200") command = appendArgIfNotInExtraArgs(command, extraArgsDict, "--sslConfigFile", "/usr/share/elasticsearch/config/proxy_tls.yml") if (props.streamingSourceType !== StreamingSourceType.DISABLED) { + const brokerEndpoints = getMigrationStringParameterValue(this, { + ...props, + parameter: MigrationSSMParameter.KAFKA_BROKERS, + }); command = appendArgIfNotInExtraArgs(command, extraArgsDict, "--kafkaConnection", brokerEndpoints) } if (props.streamingSourceType === StreamingSourceType.AWS_MSK) {