Skip to content

Commit

Permalink
feat: console prefix added to all resources
Browse files Browse the repository at this point in the history
  • Loading branch information
marnas committed Dec 10, 2024
1 parent 288e251 commit 5995ea2
Show file tree
Hide file tree
Showing 77 changed files with 742 additions and 698 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ provider "conduktor" {
}
# register an external user bob with PLATFORM.userView permission
resource "conduktor_user_v2" "bob" {
resource "conduktor_console_user_v2" "bob" {
name = "[email protected]"
spec {
firstname = "Bob"
Expand All @@ -109,7 +109,7 @@ resource "conduktor_user_v2" "bob" {
}
# create a group with Bob as a member
resource "conduktor_group_v2" "qa" {
resource "conduktor_console_group_v2" "qa" {
name = "qa"
spec {
display_name = "QA team"
Expand Down Expand Up @@ -153,10 +153,10 @@ Using environment variables `CDK_API_TOKEN` or `CDK_API_KEY`.
Use local user (usually admin) credentials pair. This will login against the API and use an ephemeral access token to make API calls.


Using HCL `admin_email`/`admin_password` attributes
Using HCL `admin_user`/`admin_password` attributes
```hcl
provider "conduktor" {
admin_email = "[email protected]"
admin_user = "[email protected]"
admin_password = "admin-password"
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ resource "conduktor_gateway_service_account_v2" "gateway_sa" {

### Optional

- `admin_password` (String, Sensitive) The password of the admin user. May be set using environment variable `CDK_CONSOLE_PASSWORD` or `CDK_ADMIN_PASSWORD` for Console, `CDK_GATEWAY_PASSWORD` or `CDK_ADMIN_PASSWORD` for Gateway. Required if admin_email is set. If not provided, the API token will be used to authenticater.
- `admin_password` (String, Sensitive) The password of the admin user. May be set using environment variable `CDK_CONSOLE_PASSWORD` or `CDK_ADMIN_PASSWORD` for Console, `CDK_GATEWAY_PASSWORD` or `CDK_ADMIN_PASSWORD` for Gateway. Required if admin_user is set. If not provided, the API token will be used to authenticater.
- `admin_user` (String) The login credentials of the admin user. May be set using environment variable `CDK_CONSOLE_USER`, `CDK_ADMIN_EMAIL` or `CDK_ADMIN_USER` for Console, `CDK_GATEWAY_USER` or `CDK_ADMIN_USER` for Gateway. Required if admin_password is set. If not provided and `mode` is Console, the API token will be used to authenticate.
- `api_token` (String, Sensitive) The API token to authenticate with the Conduktor Console API. May be set using environment variable `CDK_API_TOKEN` or `CDK_API_KEY`. If not provided, admin_user and admin_password will be used to authenticate. See [documentation](https://docs.conduktor.io/platform/reference/api-reference/#generate-an-api-key) for more information. Not used if `mode` is Gateway.
- `base_url` (String) The URL of either Conduktor Console or Gateway, depending on the `mode`. May be set using environment variable `CDK_CONSOLE_BASE_URL` or `CDK_BASE_URL` for Console, `CDK_GATEWAY_BASE_URL` or `CDK_BASE_URL` for Gateway. Required either here or in the environment.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
page_title: "Conduktor : conduktor_group_v2 "
page_title: "Conduktor : conduktor_console_group_v2 "
subcategory: "iam/v2"
description: |-
Resource for managing Conduktor groups.
This resource allows you to create, read, update and delete groups in Conduktor.
---

# conduktor_group_v2
# conduktor_console_group_v2

Resource for managing Conduktor groups.
This resource allows you to create, read, update and delete groups in Conduktor.
Expand All @@ -15,7 +15,7 @@ This resource allows you to create, read, update and delete groups in Conduktor.

### Simple group without members or permissions
```terraform
resource "conduktor_group_v2" "example" {
resource "conduktor_console_group_v2" "example" {
name = "simple-group"
spec {
display_name = "Simple Group"
Expand All @@ -26,7 +26,7 @@ resource "conduktor_group_v2" "example" {

### Complex group with members, external reference and permissions
```terraform
resource "conduktor_user_v2" "user1" {
resource "conduktor_console_user_v2" "user1" {
name = "[email protected]"
spec {
firstname = "User"
Expand All @@ -35,13 +35,13 @@ resource "conduktor_user_v2" "user1" {
}
}
resource "conduktor_group_v2" "example" {
resource "conduktor_console_group_v2" "example" {
name = "complex-group"
spec {
display_name = "Complex group"
description = "Complex group description"
external_groups = ["sso-group1"]
members = [conduktor_user_v2.user1.name]
members = [conduktor_console_user_v2.user1.name]
permissions = [
{
resource_type = "PLATFORM"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
page_title: "Conduktor : conduktor_kafka_cluster_v2 "
page_title: "Conduktor : conduktor_console_kafka_cluster_v2 "
subcategory: "console/v2"
description: |-
Resource for managing Conduktor Kafka cluster definition with optional Schema registry.
This resource allows you to create, read, update and delete Kafka cluster and Schema registry definitions in Conduktor.
---

# conduktor_kafka_cluster_v2
# conduktor_console_kafka_cluster_v2

Resource for managing Conduktor Kafka cluster and Schema registry definitions.
This resource allows you to create, read, update and delete Kafka clusters and Schema registry definitions in Conduktor.
Expand All @@ -16,7 +16,7 @@ This resource allows you to create, read, update and delete Kafka clusters and S
### Simple Kafka cluster without Schema registry
This example creates a simple Kafka cluster definition without authentication resource and without Schema Registry.
```terraform
resource "conduktor_kafka_cluster_v2" "simple" {
resource "conduktor_console_kafka_cluster_v2" "simple" {
name = "simple-cluster"
spec {
display_name = "Simple kafka Cluster"
Expand All @@ -32,7 +32,7 @@ resource "conduktor_kafka_cluster_v2" "simple" {
This example creates a Confluent Kafka cluster and Schema Registry definition resource.
The Schema Registry authentication uses mTLS.
```terraform
resource "conduktor_kafka_cluster_v2" "confluent" {
resource "conduktor_console_kafka_cluster_v2" "confluent" {
name = "confluent-cluster"
labels = {
"env" = "staging"
Expand Down Expand Up @@ -84,7 +84,7 @@ EOT
This example creates an Aiven Kafka cluster and Schema Registry definition resource.
The Schema Registry authentication uses basic auth.
```terraform
resource "conduktor_kafka_cluster_v2" "aiven" {
resource "conduktor_console_kafka_cluster_v2" "aiven" {
name = "aiven-cluster"
labels = {
"env" = "test"
Expand Down Expand Up @@ -122,7 +122,7 @@ resource "conduktor_kafka_cluster_v2" "aiven" {
### AWS MSK with Glue Schema registry
This example creates an AWS MSK Kafka Cluster and a Glue Schema Registry definition resource.
```terraform
resource "conduktor_kafka_cluster_v2" "aws_msk" {
resource "conduktor_console_kafka_cluster_v2" "aws_msk" {
name = "aws-cluster"
labels = {
"env" = "prod"
Expand Down Expand Up @@ -157,7 +157,7 @@ resource "conduktor_kafka_cluster_v2" "aws_msk" {
This example creates a Conduktor Gateway Kafka Cluster and Schema Registry definition resource.
The Schema Registry authentication uses a bearer token.
```terraform
resource "conduktor_kafka_cluster_v2" "gateway" {
resource "conduktor_console_kafka_cluster_v2" "gateway" {
name = "gateway-cluster"
labels = {
"env" = "prod"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
page_title: "Conduktor : conduktor_kafka_connect_v2 "
page_title: "Conduktor : conduktor_console_kafka_connect_v2 "
subcategory: "console/v2"
description: |-
Resource for managing Conduktor Kafka Connect servers definition linked to an existing Kafka cluster definition inside Conduktor Console.
This resource allows you to create, read, update and delete Kafka Connect servers connections from Conduktor Console.
---

# conduktor_kafka_connect_v2
# conduktor_console_kafka_connect_v2

Resource for managing Conduktor Kafka Connect servers definition linked to an existing Kafka cluster definition inside Conduktor Console.
This resource allows you to create, read, update and delete Kafka Connect servers connections from Conduktor Console.
Expand All @@ -16,17 +16,17 @@ This resource allows you to create, read, update and delete Kafka Connect server
### Simple Kafka Connect server
This example creates a simple Kafka Connect server connection without any authentication.
```terraform
resource "conduktor_kafka_cluster_v2" "minimal" {
resource "conduktor_console_kafka_cluster_v2" "minimal" {
name = "mini-cluster"
spec {
display_name = "Minimal Cluster"
bootstrap_servers = "localhost:9092"
}
}
resource "conduktor_kafka_connect_v2" "simple" {
resource "conduktor_console_kafka_connect_v2" "simple" {
name = "simple-connect"
cluster = conduktor_kafka_cluster_v2.minimal.name
cluster = conduktor_console_kafka_cluster_v2.minimal.name
spec {
display_name = "Simple Connect Server"
urls = "http://localhost:8083"
Expand All @@ -37,17 +37,17 @@ resource "conduktor_kafka_connect_v2" "simple" {
### Basic Kafka Connect server
This example creates a complex Kafka Connect server connection with basic authentication.
```terraform
resource "conduktor_kafka_cluster_v2" "minimal" {
resource "conduktor_console_kafka_cluster_v2" "minimal" {
name = "mini-cluster"
spec {
display_name = "Minimal Cluster"
bootstrap_servers = "localhost:9092"
}
}
resource "conduktor_kafka_connect_v2" "basic" {
resource "conduktor_console_kafka_connect_v2" "basic" {
name = "basic-connect"
cluster = conduktor_kafka_cluster_v2.minimal.name
cluster = conduktor_console_kafka_cluster_v2.minimal.name
labels = {
description = "This is a complex connect using basic authentication"
documentation = "https://docs.mycompany.com/complex-connect"
Expand All @@ -73,17 +73,17 @@ resource "conduktor_kafka_connect_v2" "basic" {
### Bearer token Kafka Connect server
This example creates a complex Kafka Connect server connection with bearer token authentication.
```terraform
resource "conduktor_kafka_cluster_v2" "minimal" {
resource "conduktor_console_kafka_cluster_v2" "minimal" {
name = "mini-cluster"
spec {
display_name = "Minimal Cluster"
bootstrap_servers = "localhost:9092"
}
}
resource "conduktor_kafka_connect_v2" "bearer" {
resource "conduktor_console_kafka_connect_v2" "bearer" {
name = "bearer-connect"
cluster = conduktor_kafka_cluster_v2.minimal.name
cluster = conduktor_console_kafka_cluster_v2.minimal.name
labels = {
description = "This is a complex connect using bearer token authentication"
documentation = "https://docs.mycompany.com/complex-connect"
Expand All @@ -108,17 +108,17 @@ resource "conduktor_kafka_connect_v2" "bearer" {
### mTLS Kafka Connect server
This example creates a complex Kafka Connect server connection with mTLS authentication.
```terraform
resource "conduktor_kafka_cluster_v2" "minimal" {
resource "conduktor_console_kafka_cluster_v2" "minimal" {
name = "mini-cluster"
spec {
display_name = "Minimal Cluster"
bootstrap_servers = "localhost:9092"
}
}
resource "conduktor_kafka_connect_v2" "mtls" {
resource "conduktor_console_kafka_connect_v2" "mtls" {
name = "mtls-connect"
cluster = conduktor_kafka_cluster_v2.minimal.name
cluster = conduktor_console_kafka_cluster_v2.minimal.name
labels = {
description = "This is a complex connect using mTLS authentication"
documentation = "https://docs.mycompany.com/complex-connect"
Expand Down Expand Up @@ -210,12 +210,12 @@ The import ID is constructed as follows: `< cluster_id >/< connect_id >`.
For example, using an [`import` block](https://developer.hashicorp.com/terraform/language/import) :
```terraform
import {
to = conduktor_kafka_connect_v2.example
to = conduktor_console_kafka_connect_v2.example
id = "mini-cluster/import-connect" # Import "import-connect" Connect server for "mini-cluster" Kafka cluster
}
```

Using the `terraform import` command:
```shell
terraform import conduktor_kafka_connect_v2.example mini-cluster/import-connect
terraform import conduktor_console_kafka_connect_v2.example mini-cluster/import-connect
```
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
page_title: "Conduktor : conduktor_user_v2 "
page_title: "Conduktor : conduktor_console_user_v2 "
subcategory: "iam/v2"
description: |-
Resource for managing Conduktor users.
This resource allows you to create, read, update and delete users in Conduktor.
---

# conduktor_user_v2
# conduktor_console_user_v2

Resource for managing Conduktor users.
This resource allows you to create, read, update and delete users in Conduktor.
Expand All @@ -15,7 +15,7 @@ This resource allows you to create, read, update and delete users in Conduktor.

### Simple user without permissions
```terraform
resource "conduktor_user_v2" "example" {
resource "conduktor_console_user_v2" "example" {
name = "[email protected]"
spec {
firstname = "Bob"
Expand All @@ -26,7 +26,7 @@ resource "conduktor_user_v2" "example" {

### Complex user with permissions
```terraform
resource "conduktor_user_v2" "example" {
resource "conduktor_console_user_v2" "example" {
name = "[email protected]"
spec {
firstname = "Bob"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "conduktor_user_v2" "user1" {
resource "conduktor_console_user_v2" "user1" {
name = "[email protected]"
spec {
firstname = "User"
Expand All @@ -7,13 +7,13 @@ resource "conduktor_user_v2" "user1" {
}
}

resource "conduktor_group_v2" "example" {
resource "conduktor_console_group_v2" "example" {
name = "complex-group"
spec {
display_name = "Complex group"
description = "Complex group description"
external_groups = ["sso-group1"]
members = [conduktor_user_v2.user1.name]
members = [conduktor_console_user_v2.user1.name]
permissions = [
{
resource_type = "PLATFORM"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "conduktor_group_v2" "example" {
resource "conduktor_console_group_v2" "example" {
name = "simple-group"
spec {
display_name = "Simple Group"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "conduktor_kafka_cluster_v2" "aiven" {
resource "conduktor_console_kafka_cluster_v2" "aiven" {
name = "aiven-cluster"
labels = {
"env" = "test"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "conduktor_kafka_cluster_v2" "aws_msk" {
resource "conduktor_console_kafka_cluster_v2" "aws_msk" {
name = "aws-cluster"
labels = {
"env" = "prod"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "conduktor_kafka_cluster_v2" "confluent" {
resource "conduktor_console_kafka_cluster_v2" "confluent" {
name = "confluent-cluster"
labels = {
"env" = "staging"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "conduktor_kafka_cluster_v2" "gateway" {
resource "conduktor_console_kafka_cluster_v2" "gateway" {
name = "gateway-cluster"
labels = {
"env" = "prod"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "conduktor_kafka_cluster_v2" "simple" {
resource "conduktor_console_kafka_cluster_v2" "simple" {
name = "simple-cluster"
spec {
display_name = "Simple kafka Cluster"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
resource "conduktor_kafka_cluster_v2" "minimal" {
resource "conduktor_console_kafka_cluster_v2" "minimal" {
name = "mini-cluster"
spec {
display_name = "Minimal Cluster"
bootstrap_servers = "localhost:9092"
}
}

resource "conduktor_kafka_connect_v2" "basic" {
resource "conduktor_console_kafka_connect_v2" "basic" {
name = "basic-connect"
cluster = conduktor_kafka_cluster_v2.minimal.name
cluster = conduktor_console_kafka_cluster_v2.minimal.name
labels = {
description = "This is a complex connect using basic authentication"
documentation = "https://docs.mycompany.com/complex-connect"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
resource "conduktor_kafka_cluster_v2" "minimal" {
resource "conduktor_console_kafka_cluster_v2" "minimal" {
name = "mini-cluster"
spec {
display_name = "Minimal Cluster"
bootstrap_servers = "localhost:9092"
}
}

resource "conduktor_kafka_connect_v2" "bearer" {
resource "conduktor_console_kafka_connect_v2" "bearer" {
name = "bearer-connect"
cluster = conduktor_kafka_cluster_v2.minimal.name
cluster = conduktor_console_kafka_cluster_v2.minimal.name
labels = {
description = "This is a complex connect using bearer token authentication"
documentation = "https://docs.mycompany.com/complex-connect"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
to = conduktor_kafka_connect_v2.example
to = conduktor_console_kafka_connect_v2.example
id = "mini-cluster/import-connect" # Import "import-connect" Connect server for "mini-cluster" Kafka cluster
}
Loading

0 comments on commit 5995ea2

Please sign in to comment.