Skip to content

Latest commit

 

History

History
104 lines (83 loc) · 2.73 KB

File metadata and controls

104 lines (83 loc) · 2.73 KB
page_title description
Conduktor : conduktor_generic
Generic Resource that use manifests in YAML format. This resource allows you to create, read, update and delete any resource supported by Conduktor Console.

conduktor_generic

Generic Resource that use manifests in YAML format. This resource allows you to create, read, update and delete any resource supported by Conduktor Console.

Caution

This resource is experimental and have many limitations and might have breaking changes in next releases. Be aware that using it to manage production environement is not recommended as it will cause migrations issues in future.

Example Usage

Using embedded YAML string

resource "conduktor_generic" "example" {
  kind     = "User"
  version  = "v2"
  name     = "[email protected]"
  manifest = <<EOF
apiVersion: v2
kind: User
metadata:
  name: [email protected]
spec:
  firstName: Bob
  lastName: Smith
  permissions:
    - permissions:
        - userView
        - datamaskingView
        - auditLogView
      resourceType: PLATFORM
    - permissions:
        - topicViewConfig
        - topicConsume
        - topicProduce
      resourceType: TOPIC
      name: "test-topic"
      cluster: "*"
      patternType: LITERAL
  EOF
}

Using incuded YAML string

resource "conduktor_generic" "test" {
  kind     = "KafkaCluster"
  version  = "v2"
  name     = "cluserA"
  manifest = file("clusterA.yaml")
}
#cluster_a.yaml
apiVersion: v2
kind: KafkaCluster
metadata:
  name: cluster_a
spec:
  displayName: "Cluster A"
  bootstrapServers: "localhost:9092"
  ignoreUntrustedCertificate: false

Schema

Required

  • kind (String) resource kind
  • manifest (String) resource manifest in yaml format. See reference documentation for more details
  • name (String) resource name
  • version (String) resource version

Optional

  • cluster (String) resource parent cluster (if any)

Limitations

Current limitation of this resource are :

  • import is not supported.
  • plan after apply show changes because of YAML automatic formatting and ordering.
  • only support Console resources for now

Migrations notes

In future releases, this terraform provider will support more and more typed resources and you might end up migrating a resource from this generic resource to the typed one.

This migration can only be done by destroying previous resource on Conduktor and recreate it after using the new typed resouce.

Because of that you will need to be extra careful of the current state of the resource before doing migrations.