Skip to content

Commit

Permalink
correct GCP key
Browse files Browse the repository at this point in the history
  • Loading branch information
abidknashtech committed Nov 13, 2023
1 parent 81dbe4c commit b1af8d5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion deployment/gcpresources/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -162,5 +162,5 @@ resource "google_secret_manager_secret" "car-demo-secret" {
resource "google_secret_manager_secret_version" "car-demo-secret-1" {

secret = google_secret_manager_secret.car-demo-secret.id
secret_data = "{\"mysql-db-username\": \"${var.user_name}\", \"mysql-db-userpassword\": \"${var.user_password}\", \"gcp_json_key\": \"${var.gcp_json_key}\"}"
secret_data = "{\"mysql-db-username\": \"${var.user_name}\", \"mysql-db-userpassword\": \"${var.user_password}\", \"gcp-json-key\": \"${file("key.json")}\"}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,3 @@ variable user_password {
description = "The password for the default user. If not set, a random one will be generated and available in the generated_user_password output variable."
default = "JavaDBs#password2023"
}

variable gcp_json_key {
description = "GCP Json key"
default = "{}"
}
6 changes: 3 additions & 3 deletions inventory-service/gcp-deploy-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
valueFrom:
secretKeyRef:
name: secret-to-be-created
key: gcp_json_key
key: gcp-json-key
optional: false
envFrom:
- configMapRef:
Expand Down Expand Up @@ -99,11 +99,11 @@ spec:
key: car-demo-secret
version: latest
property: mysql-db-userpassword
- secretKey: "gcp_json_key"
- secretKey: "gcp-json-key"
remoteRef:
key: car-demo-secret
version: latest
property: gcp_json_key
property: gcp-json-key

- secretKey: "MY_SQL_SECRETS"
remoteRef:
Expand Down

0 comments on commit b1af8d5

Please sign in to comment.