confluent_environment Data Source

General Availability

confluent_environment describes an Environment data source.

Example Usage

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_environment" "example_using_id" {
  id = "env-abc123"
}

output "example_using_id" {
  value = data.confluent_environment.example_using_id
}

data "confluent_environment" "example_using_name" {
  display_name = "stag"
}

data "confluent_service_account" "example_using_name" {
  display_name = "test_sa"
}

resource "confluent_role_binding" "test-role-binding" {
  principal   = "User:${data.confluent_service_account.example_using_name.id}"
  role_name   = "EnvironmentAdmin"
  crn_pattern = data.confluent_environment.example_using_name.resource_name
}

Argument Reference

The following arguments are supported (specify either id or display_name, not both):

Attributes Reference

The following attributes are exported: