- Notifications
You must be signed in to change notification settings - Fork3
Description
# Deployment Detailsterraform {required_providers {coderd={ source="coder/coderd" version="~> 0.0.8" } }}provider"coderd" {url="coder.****"token="******"}
Very minor issue, but figured that the error outputs could be more informative. When the URL is missing the scheme, it'll fail with:
│ Error: default_organization_id│ │ with provider["registry.terraform.io/coder/coderd"],│ on main.tf line 1,in provider"coderd":│ 1: provider"coderd" {│ │ failed to get default organization ID: Get"/api/v2/users/me": unsupported protocol scheme""
At first, I didn't realize that not adding in a URL scheme was invalid per theTF Registry doc's example. I didn't see what was missing until I noticed ourcoder.com docs showed it. So the registry docs should be updated to match or maybe describe that a scheme should be passed in.
Additionally, if I set the URL to "http://coder.****", it errors out with:
│ Error: default_organization_id│ │ with provider["registry.terraform.io/coder/coderd"],│ on main.tf line 1,in provider"coderd":│ 1: provider"coderd" {│ │ failed to get default organization ID: invalid character'<' lookingfor beginning of value
I think this is happening because of the variableCODER_REDIRECT_TO_ACCESS_URL
. My HTTP endpoint is disabled, and myCODER_ACCESS_URL
uses an HTTPS scheme. After disabling it, the provider starts functioning as intended. It looks like the provider isn't following the redirect unless this is intended. I believe this is returning from the provider's side, hence why it's giving aninvalid character '<'
error:
jatcod3r~ % curl -X GET http://coder.******<a href="https://coder.******">Temporary Redirect</a>.