You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bug that was reported and closed in 0.13 (#25986) seems to be a problem in 1.0.0. After successfully entering terraform init, terraform plan, and terraform apply, I'm seeing a malformed private key in a json file with \n and \n inserted. My commands to generate the secret:
After a subsequent install of K8ssandra in the terraform-created GKE cluster, most of the containers/pods start, except for the medusa container, which complains about the malformed key.
Terraform Version
Terraform v1.0.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/google v3.73.0
+ provider registry.terraform.io/hashicorp/google-beta v3.73.0
Your version of Terraform is out of date! The latest version
is 1.0.1. You can update by downloading from https://www.terraform.io/downloads.html
From reading the modules in the repository you listed, I see that service_account_key ultimately derives from google_service_account_key.service_account_key.private_key in the iam module. The documentation for private_key says that this attribute contains "The private key in JSON format, base64 encoded". The iam module uses base64decode to remove the base64 encoding before returning, and so the expected value for service_account_key is a string containing a JSON representation of an object.
You then asked terraform output to print this output value in JSON format itself, and so Terraform produced a JSON representation of that string which itself contains JSON, as you saw. Terraform seems to be behaving as expected here: it produced a correctly-JSON-encoded representation of the string you specified.
If you want to get just the raw JSON data that is in the service_account_key string then you could use terraform output in -raw mode instead of in -json mode, and then Terraform will just print out that string exactly as the module returned it, without any additional JSON encoding:
terraform output -raw service_account_key
From Terraform's perspective then it will just print out the string saved in that output value.
Since Terraform seems to be behaving as intended here, I'm going to close this issue. If you have any follow-up questions about what I've suggested here, please feel free to start a topic in our community forum. Thanks again!
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
The bug that was reported and closed in 0.13 (#25986) seems to be a problem in 1.0.0. After successfully entering terraform init, terraform plan, and terraform apply, I'm seeing a malformed private key in a json file with \n and \n inserted. My commands to generate the secret:
After a subsequent install of K8ssandra in the terraform-created GKE cluster, most of the containers/pods start, except for the medusa container, which complains about the malformed key.
Terraform Version
Terraform Configuration Files
Refer to:
https://github.com/k8ssandra/k8ssandra-terraform
Debug Output
Crash Output
Expected Behavior
Private key does not contain \n ...
Actual Behavior
Private key has \n, resulting in malformed private key.
Here's an example with sensitive info changed - notice the \n and \n inserted in the generated private key:
Steps to Reproduce
See https://docs.k8ssandra.io/install/gke/, but with one diff: testing with terraform 1.0.0, not the 0.14 version cited.
Additional Context
Can you fix and release in a 1.0.next patch?
References
Similar prior bug reported by another user in 0.13 seems to be an issue again in terraform 1.0.0.
The text was updated successfully, but these errors were encountered: