Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Provider Resource - Improve Error Outputs #159

Closed
Labels
docsImprovements or additions to documentationinvalidThis doesn't seem right
@jatcod3r

Description

@jatcod3r
# 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>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsImprovements or additions to documentationinvalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp