File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ output "zone" {
2121}
2222
2323output "credentials" {
24- value = jsondecode ( base64decode (google_service_account_key. gke_cluster_access_key . private_key ) )
24+ value = base64decode (google_service_account_key. gke_cluster_access_key . private_key )
2525 sensitive = true
2626}
2727
Original file line number Diff line number Diff line change 1+ resource "humanitec_resource_account" "cluster_account" {
2+ id = " ${ var . prefix } cluster"
3+ name = " ${ var . prefix } cluster"
4+ type = " gcp"
5+
6+ credentials = var. k8s_credentials
7+ }
8+
19resource "humanitec_resource_definition" "k8s_cluster" {
210 driver_type = " humanitec/k8s-cluster-gke"
311 id = " ${ var . prefix } cluster"
412 name = " ${ var . prefix } cluster"
513 type = " k8s-cluster"
614
15+ driver_account = humanitec_resource_account. cluster_account . id
716 driver_inputs = {
817 values_string = jsonencode ({
918 " name" = var.k8s_cluster_name
1019 " loadbalancer" = var.k8s_loadbalancer
1120 " project_id" = var.k8s_project_id
1221 " zone" = var.k8s_region
13- }),
14- secrets_string = jsonencode ({
15- " credentials" = var.k8s_credentials
1622 })
1723 }
1824}
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ variable "k8s_region" {
1616 description = " The region the cluster is in."
1717}
1818variable "k8s_credentials" {
19- type = map ( any )
19+ type = string
2020 description = " The credentials used to establish a connection to the cluster."
2121}
2222variable "environment" {
@@ -31,4 +31,4 @@ variable "prefix" {
3131 type = string
3232 description = " A prefix that will be attached to all IDs created in Humanitec."
3333 default = " "
34- }
34+ }
You can’t perform that action at this time.
0 commit comments