-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfluent-resources.tf
27 lines (23 loc) · 950 Bytes
/
confluent-resources.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Create the Confluent Resouce API Key Pair based on the service account from the Confluent Resource
# (e.g., Kafka Cluster or Schema Registry)
resource "confluent_api_key" "resouce_api_key" {
count = var.number_of_api_keys_to_retain
display_name = replace(var.key_display_name, "{date}", time_static.api_key_rotations[count.index].rfc3339)
description = "Creation of the Confluent Resource API Key managed by Terraform Cloud using Confluent API Key Rotation Module"
owner {
id = var.owner.id
api_version = var.owner.api_version
kind = var.owner.kind
}
managed_resource {
id = var.resource.id
api_version = var.resource.api_version
kind = var.resource.kind
environment {
id = var.resource.environment.id
}
}
lifecycle {
replace_triggered_by = [time_static.api_key_rotations[count.index]]
}
}