We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v1.75.0
When I call GPGKeys.Create() and Terraform Cloud returns an error, I am unable to print the response itself?
GPGKeys.Create()
// Add key to provider options := tfe.GPGKeyCreateOptions{ AsciiArmor: keyData, Type: "gpg-keys", Namespace: org, } key, err := client.GPGKeys.Create(cmd.Context(), tfe.PrivateRegistry, options) if err != nil { log.Printf("Error adding key: %s", err) return } fmt.Printf("Key added successfully: %s\n", key.KeyID)
the curl response is:
❯ curl --header "Authorization: Bearer $TFC_TOKEN" --header "Content-Type: application/vnd.api+json" --request POST --data @gpg-output.json https://app.terraform.io/api/registry/private/v2/gpg-keys {"errors":["could not create GPG key: GPG key REDACTED already exists for namespace REDACTED"]}%
log.Printf("Error adding key: %s", err)
prints:
2025/02/12 08:18:29 Error adding key: 400 Bad Request
The text was updated successfully, but these errors were encountered:
No branches or pull requests
go-tfe version
Description
When I call
GPGKeys.Create()
and Terraform Cloud returns an error, I am unable to print the response itself?Testing plan
Expected Behavior
the curl response is:
Actual Behavior
prints:
2025/02/12 08:18:29 Error adding key: 400 Bad Request
Additional Context
The text was updated successfully, but these errors were encountered: