Coder Social home page Coder Social logo

Comments (4)

Mongey avatar Mongey commented on August 20, 2024

@deltaaj2016 can you provide your config?

from terraform-provider-kafka.

deltaaj2016 avatar deltaaj2016 commented on August 20, 2024
resource "kafka_topic" "res-ctt-dsv-metrics-health-v0" {
  name               = format("%s.use1.private.res.ctt.dsv.metrics.health.v0", var.topic_prefix)
  replication_factor = 2
  partitions         = 3

  config = {
    "retention.ms"     = "432000000"
  }
}

resource "kafka_topic" "oss-ctt-dsv-metrics-health-v0" {
  name               = format("%s.use1.private.oss.ctt.dsv.metrics.health.v0", var.topic_prefix)
  replication_factor = 2
  partitions         = 3

  config = {
    "retention.ms"     = "432000000"
  }
}

resource "kafka_topic" "vs-air4-ctt-dsv-metrics-health-v0" {
  name               = format("%s.use1.private.vs.air4.ctt.dsv.metrics.health.v0", var.topic_prefix)
  replication_factor = 2
  partitions         = 3

  config = {
    "retention.ms"     = "432000000"
  }
}

resource "kafka_topic" "res-ctt-dsv-metrics-actvcnts-v0" {
  name               = format("%s.use1.private.res.ctt.dsv.metrics.actvcnts.v0", var.topic_prefix)
  replication_factor = 2
  partitions         = 3

  config = {
    "retention.ms"     = "259200000"
  }
}

resource "kafka_topic" "res-ctt-dsv-metrics-tahms-v0" {
  name               = format("%s.use1.private.res.ctt.dsv.metrics.tahms.v0", var.topic_prefix)
  replication_factor = 2
  partitions         = 3

  config = {
    "retention.ms"     = "259200000"
  }
}

resource "kafka_topic" "vs-air4-ctt-dsv-metrics-tahms-v0" {
  name               = format("%s.use1.private.vs.air4.ctt.dsv.metrics.tahms.v0", var.topic_prefix)
  replication_factor = 2
  partitions         = 3

  config = {
    "retention.ms"     = "259200000"
  }
}

resource "kafka_topic" "res-ctt-dsv-metrics-dca-v0" {
  name               = format("%s.use1.private.res.ctt.dsv.metrics.dca.v0", var.topic_prefix)
  replication_factor = 2
  partitions         = 3

  config = {
    "retention.ms"     = "172800000"
  }
}

resource "kafka_topic" "oss-ctt-dsv-metrics-dca-v0" {
  name               = format("%s.use1.private.oss.ctt.dsv.metrics.dca.v0", var.topic_prefix)
  replication_factor = 2
  partitions         = 3

  config = {
    "retention.ms"     = "172800000"
  }
}

resource "kafka_topic" "vs-air4-ctt-dsv-metrics-dca-v0" {
  name               = format("%s.use1.private.vs.air4.ctt.dsv.metrics.dca.v0", var.topic_prefix)
  replication_factor = 2
  partitions         = 3

  config = {
    "retention.ms"     = "172800000"
  }
}

resource "kafka_topic" "res-ctt-dsv-metrics-dca-descriptions-v0" {
  name               = format("%s.use1.private.res.ctt.dsv.metrics.dca.descriptions.v0", var.topic_prefix)
  replication_factor = 2
  partitions         = 3

  config = {
    "retention.ms"     = "259200000"
  }
}

resource "kafka_topic" "oss-ctt-dsv-metrics-dca-descriptions-v0" {
  name               = format("%s.use1.private.oss.ctt.dsv.metrics.dca.descriptions.v0", var.topic_prefix)
  replication_factor = 2
  partitions         = 3

  config = {
    "retention.ms"     = "259200000"
  }
}

resource "kafka_topic" "vs-air4-ctt-dsv-metrics-dca-descriptions-v0" {
  name               = format("%s.use1.private.vs.air4.ctt.dsv.metrics.dca.descriptions.v0", var.topic_prefix)
  replication_factor = 2
  partitions         = 3

  config = {
    "retention.ms"     = "259200000"
  }
}

resource "kafka_topic" "res-ctt-application-logging-v0" {
  name               = format("%s.use1.private.res.ctt.application.logging.v0", var.topic_prefix)
  replication_factor = 2
  partitions         = 3

  config = {
    "retention.ms"     = "86400000"
  }
}

resource "kafka_topic" "oss-ctt-application-logging-v0" {
  name               = format("%s.use1.private.oss.ctt.application.logging.v0", var.topic_prefix)
  replication_factor = 2
  partitions         = 3

  config = {
    "retention.ms"     = "86400000"
  }
}

resource "kafka_topic" "vs-air4-ctt-application-logging-v0" {
  name               = format("%s.use1.private.vs.air4.ctt.application.logging.v0", var.topic_prefix)
  replication_factor = 2
  partitions         = 3

  config = {
    "retention.ms"     = "86400000"
  }
}

resource "kafka_acl" "res-ctt-dsv-metrics-health-v0-Read" {
  resource_name       = format("%s.use1.private.res.ctt.dsv.metrics.health.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Read"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "res-ctt-dsv-metrics-health-v0-Write" {
  resource_name       = format("%s.use1.private.res.ctt.dsv.metrics.health.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Write"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "oss-ctt-dsv-metrics-health-v0-Read" {
  resource_name       = format("%s.use1.private.oss.ctt.dsv.metrics.health.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Read"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "oss-ctt-dsv-metrics-health-v0-Write" {
  resource_name       = format("%s.use1.private.oss.ctt.dsv.metrics.health.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Write"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "vs-air4-ctt-dsv-metrics-health-v0-Read" {
  resource_name       = format("%s.use1.private.vs.air4.ctt.dsv.metrics.health.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Read"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "vs-air4-ctt-dsv-metrics-health-v0-Write" {
  resource_name       = format("%s.use1.private.vs.air4.ctt.dsv.metrics.health.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Write"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "res-ctt-dsv-metrics-actvcnts-v0-Read" {
  resource_name       = format("%s.use1.private.res.ctt.dsv.metrics.actvcnts.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Read"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "res-ctt-dsv-metrics-actvcnts-v0-Write" {
  resource_name       = format("%s.use1.private.res.ctt.dsv.metrics.actvcnts.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Write"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "res-ctt-dsv-metrics-tahms-v0-Read" {
  resource_name       = format("%s.use1.private.res.ctt.dsv.metrics.tahms.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Read"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "res-ctt-dsv-metrics-tahms-v0-Write" {
  resource_name       = format("%s.use1.private.res.ctt.dsv.metrics.tahms.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Write"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "vs-air4-ctt-dsv-metrics-tahms-v0-Read" {
  resource_name       = format("%s.use1.private.vs.air4.ctt.dsv.metrics.tahms.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Read"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "vs-air4-ctt-dsv-metrics-tahms-v0-Write" {
  resource_name       = format("%s.use1.private.vs.air4.ctt.dsv.metrics.tahms.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Write"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "res-ctt-dsv-metrics-dca-v0-Read" {
  resource_name       = format("%s.use1.private.res.ctt.dsv.metrics.dca.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Read"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "res-ctt-dsv-metrics-dca-v0-Write" {
  resource_name       = format("%s.use1.private.res.ctt.dsv.metrics.dca.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Write"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "oss-ctt-dsv-metrics-dca-v0-Read" {
  resource_name       = format("%s.use1.private.oss.ctt.dsv.metrics.dca.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Read"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "oss-ctt-dsv-metrics-dca-v0-Write" {
  resource_name       = format("%s.use1.private.oss.ctt.dsv.metrics.dca.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Write"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "vs-air4-ctt-dsv-metrics-dca-v0-Read" {
  resource_name       = format("%s.use1.private.vs.air4.ctt.dsv.metrics.dca.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Read"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "vs-air4-ctt-dsv-metrics-dca-v0-Write" {
  resource_name       = format("%s.use1.private.vs.air4.ctt.dsv.metrics.dca.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Write"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "res-ctt-dsv-metrics-dca-descriptions-v0-Read" {
  resource_name       = format("%s.use1.private.res.ctt.dsv.metrics.dca.descriptions.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Read"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "res-ctt-dsv-metrics-dca-descriptions-v0-Write" {
  resource_name       = format("%s.use1.private.res.ctt.dsv.metrics.dca.descriptions.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Write"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "oss-ctt-dsv-metrics-dca-descriptions-v0-Read" {
  resource_name       = format("%s.use1.private.oss.ctt.dsv.metrics.dca.descriptions.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Read"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "oss-ctt-dsv-metrics-dca-descriptions-v0-Write" {
  resource_name       = format("%s.use1.private.oss.ctt.dsv.metrics.dca.descriptions.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Write"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "vs-air4-ctt-dsv-metrics-dca-descriptions-v0-Read" {
  resource_name       = format("%s.use1.private.vs.air4.ctt.dsv.metrics.dca.descriptions.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Read"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "vs-air4-ctt-dsv-metrics-dca-descriptions-v0-Write" {
  resource_name       = format("%s.use1.private.vs.air4.ctt.dsv.metrics.dca.descriptions.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Write"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "res-ctt-application-logging-v0-Read" {
  resource_name       = format("%s.use1.private.res.ctt.application.logging.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Read"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "res-ctt-application-logging-v0-Write" {
  resource_name       = format("%s.use1.private.res.ctt.application.logging.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Write"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "oss-ctt-application-logging-v0-Read" {
  resource_name       = format("%s.use1.private.oss.ctt.application.logging.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Read"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "oss-ctt-application-logging-v0-Write" {
  resource_name       = format("%s.use1.private.oss.ctt.application.logging.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Write"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "vs-air4-ctt-application-logging-v0-Read" {
  resource_name       = format("%s.use1.private.vs.air4.ctt.application.logging.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Read"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "vs-air4-ctt-application-logging-v0-Write" {
  resource_name       = format("%s.use1.private.vs.air4.ctt.application.logging.v0", var.topic_prefix)
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "Write"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "idempotentwrite" {
  resource_name       = "kafka-cluster"
  resource_type       = "Cluster"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "IdempotentWrite"
  acl_permission_type = "Allow"

}

resource "kafka_acl" "AdminTopicAll" {
  resource_name       = "*"
  resource_type       = "Topic"
  acl_principal       = "User:admin"
  acl_host            = "*"
  acl_operation       = "All"
  acl_permission_type = "Allow"

}

from terraform-provider-kafka.

deltaaj2016 avatar deltaaj2016 commented on August 20, 2024

`terraform {
required_providers {
kafka = {
source = "Mongey/kafka"
version = "0.4.1"
}
}

backend "s3" {
key = "terraform.tfstate"
}
}

provider "kafka" {
bootstrap_servers = var.bootstrap_servers
tls_enabled = var.kafka_tls_enabled
sasl_username = var.sasl_username
sasl_password = var.sasl_password
sasl_mechanism = var.sasl_mechanism
}`

from terraform-provider-kafka.

deltaaj2016 avatar deltaaj2016 commented on August 20, 2024

`variable "bootstrap_servers" {
description = "Kafka bootstrap servers where configuration will be applied"
type = list(string)
}

variable "sasl_username" {
description = "Username for Kafka SASL Authentication"
type = string
}

variable "sasl_password" {
description = "Password for Kafka SASL Authentication"
type = string
}

variable "sasl_mechanism" {
description = "Password for Kafka SASL Authentication"
type = string
default = "scram-sha512"
}

variable "kafka_tls_enabled" {
description = "Use TLS Encryption for Kafka protocol"
type = bool
default = true
}

variable "topic_prefix" {
description = "Prefix for topic names"
type = string
default = "dev"

validation {
condition = can(regex("^[A-Za-z0-9\.\-]+$", var.topic_prefix))
error_message = "For the topic_prefix value only A-Z, a-z, 0-9, '.', and '
' are allowed."
}
}
`

from terraform-provider-kafka.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.