kcp create-asset migrate-topics
kcp create-asset migrate-topics¶
Create assets for the migrate topics
Synopsis¶
Create Terraform files for migrating topics to a target Confluent Cloud cluster. Supports --mode mirror (cluster-link mirror topics, forwards data) and --mode new (plain Confluent Cloud topics, no data).
Examples¶
# Mirror mode (forwards data via cluster link)
kcp create-asset migrate-topics \
--mode mirror \
--cc-type commercial \
--state-file kcp-state.json \
--source-type msk \
--cluster-id arn:aws:kafka:us-east-1:XXX:cluster/my-cluster/abc-5 \
--target-cluster-id lkc-xyz123 \
--target-rest-endpoint https://lkc-xyz123.eu-west-3.aws.private.confluent.cloud:443 \
--cluster-link-name msk-to-cc-link
# New mode (greenfield CC topics, no data forward)
kcp create-asset migrate-topics \
--mode new \
--cc-type commercial \
--state-file kcp-state.json \
--source-type msk \
--cluster-id arn:aws:kafka:us-east-1:XXX:cluster/my-cluster/abc-5 \
--target-cluster-id lkc-xyz123 \
--target-rest-endpoint https://lkc-xyz123.eu-west-3.aws.private.confluent.cloud:443 \
--topics-include 'orders.*' --topics-exclude '*.dlq'
Options¶
--cc-type string The Confluent Cloud destination type: 'commercial' (Standard) or 'government' (Confluent Cloud for Government).
--cluster-id string The cluster identifier (ARN for MSK, cluster ID from credentials file for Apache Kafka).
--cluster-link-name string The name of the cluster link that was created as part of the migration. Required for --mode mirror; rejected for --mode new.
-h, --help help for migrate-topics
--mode string Migration mode: 'mirror' (cluster-link mirror topics, forwards data) or 'new' (plain CC topics, no data).
--output-dir string The directory to output the Terraform files to. (default: 'migrate_topics') (default "migrate_topics")
--source-type string Source type: 'msk' or 'apache-kafka' (default "msk")
--state-file string The path to the kcp state file where the cluster discovery reports have been written to.
--target-cluster-id string The Confluent Cloud cluster ID (e.g., lkc-xxxxxx).
--target-rest-endpoint string The Confluent Cloud cluster REST endpoint (e.g., https://xxx.xxx.aws.confluent.cloud:443).
--topics-exclude strings Glob patterns of topics to exclude (comma separated or repeated flag, e.g. --topics-exclude '*.dlq'). Exclude wins on overlap with include.
--topics-include strings Glob patterns of topics to include (comma separated or repeated flag, e.g. --topics-include 'orders.*,events.*'). Empty = all non-internal topics.
Options inherited from parent commands¶
SEE ALSO¶
- kcp create-asset - Generate infrastructure and migration assets