confluent_environment
describes an Environment 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_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
}
The following arguments are supported (specify either id
or display_name
, not both):
id
- (Optional String) The ID of the Environment, for example, env-abc123
.display_name
- (Optional String) A human-readable name for the Environment.The following attributes are exported:
id
- (Required String) The ID of the Environment, for example, env-abc123
.display_name
- (Required String) A human-readable name for the Environment.resource_name
- (Required String) The Confluent Resource Name of the Environment, for example, crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123
.