confluent_user
describes a User data source.
provider "confluent" {
cloud_api_key = var.confluent_cloud_api_key # optionally use CONFLUENT_CLOUD_API_KEY env var
cloud_api_secret = var.confluent_cloud_api_secret # optionally use CONFLUENT_CLOUD_API_SECRET env var
}
data "confluent_user" "example_using_id" {
id = "u-abc123"
}
output "example_using_id" {
value = data.confluent_user.example_using_id
}
data "confluent_user" "example_using_email" {
email = "test123@gmail.com"
}
resource "confluent_environment" "test-env" {
display_name = "env_for_${data.confluent_user.example_using_id.full_name}"
}
resource "confluent_kafka_cluster" "standard-cluster-on-aws" {
display_name = "standard_kafka_cluster_on_aws"
availability = "SINGLE_ZONE"
cloud = "AWS"
region = "us-west-2"
standard {}
environment {
id = confluent_environment.test-env.id
}
}
resource "confluent_role_binding" "test-role-binding" {
principal = "User:${data.confluent_user.example_using_email.id}"
role_name = "CloudClusterAdmin"
crn_pattern = confluent_kafka_cluster.standard-cluster-on-aws.rbac_crn
}
data "confluent_user" "example_using_full_name" {
full_name = "John Doe"
}
The following arguments are supported.
id
- (Optional String) The ID of the User (e.g., u-abc123
).full_name
- (Optional String) The full name of the User.email
- (Optional String) The email address of the User.The following attributes are exported:
id
- (Required String) The ID of the User, for example, u-abc123
.api_version
- (Required String) An API Version of the schema version of the User.kind
- (Required String) A kind of the User.full_name
- (Required String) The full name of the User.email
- (Required String) The email address of the User.