-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
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
TERRA-96 ⁃ astra_private_link fails with json: cannot unmarshal string into Go value of type astra.Errors
#198
Comments
json: cannot unmarshal string into Go value of type astra.Errors
json: cannot unmarshal string into Go value of type astra.Errors
Please email/Slack me if the full debug log is needed, but couldn't see anything more interesting there. |
@phact I don't know if hashicorp/terraform-plugin-go#237 could be related, possibly solving this? Seems like it might be an error in the response not being handled properly? |
Re-creating the http rest call manually, with an invalid gcp project id, returns error 400 with
Update: The GCP project ID should be there when the module runs, it has to be some other error message being returned that I can't see :| |
I tried running this rest call on the actual prod db and prod project now and got an error 500 back:
I'm getting the same error when I try to add it through the AstraDB admin UI. |
@oscar-b the error you get
is because the Go client used by this provider to interact with the Astra DevOps API has an incorrect response mapping, as you have painfully figured out. Unfortunately, when this happens, I have to do basically what you did, to figure out which DevOps API call triggered the response, then fix the Go client to have the correct response definition. It usually means the response was not successful, and was expected to be a properly formatted JSON object, but the response is actually just plain text, hence the failure to unmarshal. So there are generally 2 issues when you see this. The first is that the DevOps API response doesn't unmarshal into JSON, which hides the real issue. Once I fix the unmarhsaling, then I can see what the real issue is and I can figure out how to resolve that. I'm hoping to get some time today to take a look at this one. |
@emerkle826 just fyi, I opened a support ticket for this as well as the same thing happens in the Astra DB UI, I can't add the GCP project in the private endpoint configuration. |
@emerkle826 Sorry, didn't update this ticket, but the underlying issue was solved (something with the Google side of things, support opened a ticket with GCP to solve it). But I guess the issue here still stands, that the provider fails on certain error conditions from the API that isn't proper JSON. |
@oscar-b Thanks for the update. Sorry I haven't replied much lately. I've been swamped with other things. I'll leave this ticket open to address the Error issue as you suggest. |
Was the REST endpoint you used
or
Both appear to do the same thing in DevOps API, but the Terraform code currently only uses the |
The marshaling error should be fixed in v2.1.11 as I fixed both places where private-link allowed principals are handled in the client. |
Hi there,
Please provide the following details with your issue report.
Terraform Version
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
Debug Output
Expected Behavior
Created a private link.
Actual Behavior
It failed.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
Important Factoids
Not that I know of.
References
Maybe #197
┆Issue is synchronized with this Jira Task by Unito
┆Issue Number: TERRA-96
┆Priority: Major
The text was updated successfully, but these errors were encountered: