# ACLS APPLIED ON MAX_COMMITTED_STATUS_CHANGES_MIRROR TOPIC
resource "kafka_acl" "MAX_COMMITTED_STATUS_CHANGES_MIRROR01" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=Robert DeWilder"
  resource_name                = "MAX_COMMITTED_STATUS_CHANGES_MIRROR"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "MAX_COMMITTED_STATUS_CHANGES_MIRROR02" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Write"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=Robert DeWilder"
  resource_name                = "MAX_COMMITTED_STATUS_CHANGES_MIRROR"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "MAX_COMMITTED_STATUS_CHANGES_MIRROR03" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=orderhistory.com"
  resource_name                = "MAX_COMMITTED_STATUS_CHANGES_MIRROR"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "MAX_COMMITTED_STATUS_CHANGES_MIRROR04" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=distboard.tokyo"
  resource_name                = "MAX_COMMITTED_STATUS_CHANGES_MIRROR"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "MAX_COMMITTED_STATUS_CHANGES_MIRROR05" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Write"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=orderhistory.com"
  resource_name                = "MAX_COMMITTED_STATUS_CHANGES_MIRROR"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "MAX_COMMITTED_STATUS_CHANGES_MIRROR06" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=swbrd-oh-qa-grps"
  resource_name                = "MAX_COMMITTED_STATUS_CHANGES_MIRROR"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "MAX_COMMITTED_STATUS_CHANGES_MIRROR07" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=burrow"
  resource_name                = "MAX_COMMITTED_STATUS_CHANGES_MIRROR"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

# ACLS APPLIED ON ALL TOPICS
resource "kafka_acl" "all-topics01" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=Robert DeWilder"
  resource_name                = "*"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "all-topics02" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "All"
  acl_permission_type          = "Allow"
  acl_principal                = "User:arn:aws:iam::662302927201:role/orch-switchboard-dev-gen"
  resource_name                = "*"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "all-topics03" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Describe"
  acl_permission_type          = "Allow"
  acl_principal                = "User:arn:aws:iam::662302927201:role/orch-switchboard-dev-gen"
  resource_name                = "*"
  resource_pattern_type_filter = "Prefixed"
  resource_type                = "Topic"
}

resource "kafka_acl" "all-topics04" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "All"
  acl_permission_type          = "Allow"
  acl_principal                = "User:arn:aws:iam::662302927201:role/orch-switchboard-dev-gen"
  resource_name                = "*"
  resource_pattern_type_filter = "Prefixed"
  resource_type                = "Topic"
}

resource "kafka_acl" "all-topics05" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Create"
  acl_permission_type          = "Allow"
  acl_principal                = "User:arn:aws:iam::662302927201:role/orch-switchboard-dev-gen"
  resource_name                = "*"
  resource_pattern_type_filter = "Prefixed"
  resource_type                = "Topic"
}

# ACLS APPLIED ON amazon-msk-client-authentication TOPIC
resource "kafka_acl" "amazon-msk-client-authentication" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=burrow"
  resource_name                = "amazon-msk-client-authentication"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

# ACLS APPLIED ON MSK CLUSTER
resource "kafka_acl" "cluster01" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Describe"
  acl_permission_type          = "Allow"
  acl_principal                = "User:arn:aws:iam::662302927201:role/orch-switchboard-dev-gen"
  resource_name                = "kafka-cluster"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Cluster"
}

resource "kafka_acl" "cluster02" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Alter"
  acl_permission_type          = "Allow"
  acl_principal                = "User:arn:aws:iam::662302927201:role/orch-switchboard-dev-gen"
  resource_name                = "kafka-cluster"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Cluster"
}

# ACLS APPLIED ON __consumer_offsets TOPIC
resource "kafka_acl" "consumer_offsets" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=burrow"
  resource_name                = "__consumer_offsets"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

# ACLS APPLIED ON conversion-events TOPIC
resource "kafka_acl" "conversion-events01" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=order-history-dn"
  resource_name                = "conversion-events"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "conversion-events02" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=orderhistory.com"
  resource_name                = "conversion-events"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "conversion-events03" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Write"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=conversion-events-write"
  resource_name                = "conversion-events"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "conversion-events04" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Write"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=conversion-events"
  resource_name                = "conversion-events"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "conversion-events05" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=order-history.com"
  resource_name                = "conversion-events"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "conversion-events06" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=conversion-events"
  resource_name                = "conversion-events"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "conversion-events07" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=burrow"
  resource_name                = "conversion-events"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

# ACLS APPLIED ON dsrv-conversion-metadata TOPIC
resource "kafka_acl" "dsrv-conversion-metadata01" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=dsrv-conversion-metadata"
  resource_name                = "dsrv-conversion-metadata"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "dsrv-conversion-metadata02" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=Robert DeWilder"
  resource_name                = "dsrv-conversion-metadata"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "dsrv-conversion-metadata03" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Write"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=order-history.com"
  resource_name                = "dsrv-conversion-metadata"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "dsrv-conversion-metadata04" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=orderhistory.com"
  resource_name                = "dsrv-conversion-metadata"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "dsrv-conversion-metadata05" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Write"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=dsrv-conversion-metadata"
  resource_name                = "dsrv-conversion-metadata"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "dsrv-conversion-metadata06" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Write"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=orderhistory.com"
  resource_name                = "dsrv-conversion-metadata"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

# ACLS APPLIED ON oh-test-readonly TOPIC
resource "kafka_acl" "oh-test-readonly" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=orderhistory.com"
  resource_name                = "oh-test-readonly"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

# ACLS APPLIED ON oh-test-writeonly TOPIC
resource "kafka_acl" "oh-test-writeonly" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Write"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=orderhistory.com"
  resource_name                = "oh-test-writeonly"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

# ACLS APPLIED ON oh-test TOPIC
resource "kafka_acl" "oh-test01" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=orderhistory.com"
  resource_name                = "oh-test"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "oh-test02" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Write"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=orderhistory.com"
  resource_name                = "oh-test"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

# ACLS APPLIED ON order-history-filter TOPIC
resource "kafka_acl" "order-history-filter01" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Write"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=orderhistory.com"
  resource_name                = "order-history-filter"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "order-history-filter02" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=orderhistory.com"
  resource_name                = "order-history-filter"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

# ACLS APPLIED ON order-history TOPIC
resource "kafka_acl" "order-history01" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=Robert DeWilder"
  resource_name                = "order-history"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "order-history02" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Write"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=Robert DeWilder"
  resource_name                = "order-history"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "order-history03" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=orderhistory.com"
  resource_name                = "order-history"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "order-history04" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=distboard.tokyo"
  resource_name                = "order-history"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "order-history05" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Write"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=orderhistory.com"
  resource_name                = "order-history"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "order-history06" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=swbrd-oh-qa-grps"
  resource_name                = "order-history"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

resource "kafka_acl" "order-history07" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Read"
  acl_permission_type          = "Allow"
  acl_principal                = "User:CN=burrow"
  resource_name                = "order-history"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}

# ACLS APPLIED ON qa-order-history TOPIC
resource "kafka_acl" "qa-order-history" {
  provider = kafka.qa_order_history

  acl_host                     = "*"
  acl_operation                = "Describe"
  acl_permission_type          = "Allow"
  acl_principal                = "User:arn:aws:iam::662302927201:role/orch-switchboard-dev-gen"
  resource_name                = "qa-order-history"
  resource_pattern_type_filter = "Literal"
  resource_type                = "Topic"
}
