variable "region" {
  default = "us-east-1"
}

variable "environment" {
  default = "prod"
}

variable "application_family" {
  default = "neighbouring-rights"
}

variable "lambda_memory_size" {
  description = "Memory size for the lambda function"
  default     = "512"
}

variable "notification_endpoints" {
  description = "Slack channel for Prod alerts and build notifications"
  default     = "@slack-collections-prod-alarms"
}

variable "DLQ_notification_endpoints" {
  description = "Slack channel for Prod DLQ message alerts"
  default     = "@slack-content-nr-sync-dlq-prod-alarms"
}

// Lambda names
variable "product_deduplicator_lambda_name" {
  default = "lambda-nr-ownership-ingest-product-deduplicator"
}

variable "sr_deduplicator_lambda_name" {
  default = "lambda-nr-ownership-ingest-sr-deduplicator"
}

variable "participant_deduplicator_lambda_name" {
  default = "lambda-nr-ownership-ingest-participant-deduplicator"
}

variable "participant_writer_lambda_name" {
  default = "lambda-nr-ownership-ingest-participant-writer"
}

variable "contributor-deduplicator_lambda_name" {
  default = "lambda-nr-ownership-ingest-contributor-deduplicator"
}

variable "product_writer_lambda_name" {
  default = "lambda-nr-ownership-ingest-product-writer"
}

variable "sr_writer_lambda_name" {
  default = "lambda-nr-ownership-ingest-sr-writer"
}

variable "rules_writer_lambda_name" {
  default = "lambda-nr-ownership-ingest-rules-writer"
}

variable "contributor_writer_lambda_name" {
  default = "lambda-nr-ownership-ingest-contributor-writer"
}

variable "finalizer_lambda_name" {
  default = "lambda-nr-ownership-ingest-finalizer"
}

variable "reporter_lambda_name" {
  default = "lambda-nr-ownership-ingest-reporting-reporter"
}

variable "state_machine_name" {
  default = "nr-ownership-ingestion"
}

variable "ownership_ingest_reporting_topic" {
  description = "Topic name for NR Ownership ingest reporting events."
  default     = "event.nr.ownership.ingest.reporting"
}

variable "stream_label" {
  default = "2023-09-27T15:55:40.127"
}

variable "kafka_brokers" {
  type    = string
  default = "b-2.prod-managed-kafka-cdc.40dsdw.c6.kafka.us-east-1.amazonaws.com:9094,b-3.prod-managed-kafka-cdc.40dsdw.c6.kafka.us-east-1.amazonaws.com:9094,b-1.prod-managed-kafka-cdc.40dsdw.c6.kafka.us-east-1.amazonaws.com:9094"
}

variable "schema_registry_url" {
  default = "https://prod-schema-registry.theorchard.io"
}


variable "dynamodb_table_name" {
  default = "nr_ownership_ingestion_events"
}

variable "hash_key" {
  default     = "batch"
  description = "Hash key required by AWS for indexing."
}

variable "range_key" {
  default     = "timestamp"
  description = "Range key required by AWS for secondary indexing."
}

variable "range_type" {
  default     = "N"
  description = "Type of range key."
}

variable "ttl_enabled" {
  default = true
}

variable "ttl_attribute_name" {
  default = "timestamp"
}
variable "kafkajs_log_level" {
  default = "nothing"
}

variable "connector_name_basic" {
  default = "dynamodb_sink_basic"
}

variable "service_name" {
  default = "kc-ddb-sink-nr-events"
}

variable "ar_release_filter_lambda_name" {
  default = "lambda-nr-ownership-ingest-ar-release-filter"
}

variable "ar_release_artist_filter_lambda_name" {
  default = "lambda-nr-ownership-ingest-ar-release-artist-filter"
}

variable "ar_track_release_artist_filter_monitor" {
  default = "lambda-nr-ownership-ingest-ar-track-release-artist-filter"
  description = "Defines the offset lag monitor on the cdc.artRelations.trackArtist topic only. There is a second monitor for the other topics consumed by the same lambda, hence the name."
}

variable "trigger_msk_cluster_name" {
  description = "MSK cluster name"
  default     = "prod-managed-kafka-cdc-destination"
}

variable "trigger_msk_cluster_uuid" {
  description = "MSK cluster uuid"
  default     = "b103e027-ec75-4982-8d15-5bddc5e33831-6"
}

variable "ar_release_topic" {
  description = "Topic that the ar-release-filter lambda will subscribe to"
  default     = "cdc.artRelations.releases"
}

variable "ar_release_artist_topic" {
  description = "Topic that the ar-release-filter lambda will subscribe to"
  default     = "cdc.artRelations.releaseArtist"
}

variable "ar_track_filter_lambda_name" {
  default = "lambda-nr-ownership-ingest-ar-track-filter"
}

variable "ar_track_topic" {
  description = "Topic that the ar-track-filter lambda will subscribe to"
  default     = "cdc.artRelations.track"
}

variable "ddb_sink_dlq_topic_name" {
  description = "Topic to be used by the DDB Sink as DLQ"
  default     = "dlq.ddb.nr.ownership.ingest.reporting"
}

variable "additional_tags" {
  default = {
    project = "kafka-data-highway"
  }
}

variable "sqs_sync_products_queue_name" {
  default = "nr-ownership-sync-products"
}

variable "sqs_sync_products_dlq_monitor_name" {
  default = "nr-ownership-sync-products-dlq-monitor"
}

variable "sqs_sync_tracks_queue_name" {
  default = "nr-ownership-sync-tracks"
}

variable "sqs_sync_products_queue_monitor_name" {
  default = "nr-ownership-sync-products-queue-monitor"
  description = "Monitor to alert on too many msgs on fifo queue, indicating service down"
}

variable "sqs_sync_tracks_queue_monitor_name" {
  default = "nr-ownership-sync-tracks-queue-monitor"
  description = "Monitor to alert on too many msgs on fifo queue, indicating service down"
}

variable "sqs_sync_tracks_dlq_monitor_name" {
  default = "nr-ownership-sync-tracks-dlq-monitor"
}

variable "sqs_sync_rights_queue_name" {
  default = "nr-ownership-sync-rights"
}

variable "sqs_sync_rights_queue_monitor_name" {
  default = "nr-ownership-sync-rights-queue-monitor"
}

variable "sqs_sync_rights_dlq_monitor_name" {
  default = "nr-ownership-sync-rights-dlq-monitor"
}

variable "sqs_filter_products_queue_name" {
  default = "nr-ownership-filter-products"
}

variable "sqs_filter_products_queue_monitor_name" {
  default = "nr-ownership-filter-products-queue-monitor"
  description = "Monitor to alert on too many msgs on fifo queue, indicating service down"
}

variable "sqs_filter_products_dlq_monitor_name" {
  default = "nr-ownership-filter-products-dlq-monitor"
}

variable "sqs_product_transfer_queue_name" {
  default = "nr-ownership-product-transfer"
}

variable "sqs_product_transfer_queue_monitor_name" {
  default     = "nr-ownership-product-transfer-queue-monitor"
  description = "Monitor to alert on too many msgs on fifo queue, indicating service down"
}

variable "sqs_product_transfer_dlq_monitor_name" {
  default = "nr-ownership-product-transfer-dlq-monitor"
}

variable "ar_release_writer_lambda_name" {
  default = "lambda-nr-ownership-ingest-ar-release-writer"
}

variable "ar_track_updater_lambda_name" {
  default = "lambda-nr-ownership-ingest-ar-track-updater"
}

variable "owner_accepted_list" {
  description = "These are the vendor_owners we will sync. ALL means all owners. Restrict the sync by making this a list e.g. KNR-R, Orchard"
  default     = "ALL"
}

variable "ar_rights_filter_lambda_name" {
  default = "lambda-nr-ownership-ingest-ar-rights-filter"
}

variable "ar_rules_writer_lambda_name" {
  default = "lambda-nr-ownership-ingest-ar-rules-writer"
}

variable "ar_vendor_contract_topic" {
  description = "Topic that the ar-rights-filter lambda will subscribe to"
  default     = "cdc.artRelations.vendorContract"
}

variable "ar_release_territory_restriction_topic" {
  description = "Topic that the ar-rights-filter lambda will subscribe to"
  default     = "cdc.artRelations.releaseTerritoryRestriction"
}

variable "ar_subaccount_royalty_collection_topic" {
  description = "Topic that the ar-rights-filter lambda will subscribe to"
  default     = "cdc.artRelations.subaccountRoyaltyCollection"
}

variable "ar_subaccount_royalty_collection_territories_topic" {
  description = "Topic that the ar-rights-filter lambda will subscribe to"
  default     = "cdc.artRelations.subaccountRoyaltyCollectionTerritories"
}

variable "ar_track_master_rights_topic" {
  description = "Topic that the ar-rights-filter lambda will subscribe to"
  default     = "cdc.artRelations.trackMasterRights"
}

variable "project_used_to_belong_to_msk_topic_v5" {
  description = "Topic containing Project information that was moved from one Vendor/SubAccount to another change events"
  default     = "cdc.musicGraphV5.projectUsedToBelongTo"
}

variable "ar_release_sync_version" {
  description = <<-EOT
  True means updates to the version field of ar_relations.releases table will
  trigger a synchronisation event. Used to force products to sync without
  touching live data (version is internal only)
EOT
  type = string
  default     = false
}

variable "ar_track_artist_topic" {
  description = "Topic that the ar-release-filter lambda will subscribe to"
  default     = "cdc.artRelations.trackArtist"
}

variable "ows_track_performer_topic" {
  description = "Topic that the ar-release-filter lambda will subscribe to"
  default     = "cdc.owsTrack.performer"
}

variable "vendor_ids" {
  description = "Vendor IDs to be used in the ar-release-filter lambda"
  default     = ""
}

variable "msk_event_enabled" {
  description = <<-EOT
  Use this to stop or start reading MSK events. Be careful.
  Setting this to false then back to true will reset the offset counter.
  You may miss updates.
EOT
  default = true
}

variable "send_to_sqs" {
  description = "A temporary flag to prevent our filter lambdas sending to the writers"
  default = true
}

variable "sqs_event_enabled" {
  description = <<-EOT
  Use this to stop or start reading SQS events. Use this to toggle
  the writers on an off, effectively stopping the sync process
EOT
  default = true
}

variable "team_name" {
  description = "Team name to be used for tagging"
  default     = "collections-ownership"
}
