Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: Add API endpoints for the workspace agent #379

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

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test values
  • Loading branch information
kylecarbs committed Feb 28, 2022
commit 0d3de1870c6dda29bc0ba36aad6fd01a8e4b68c5
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ GOARCH=$(shell go env GOARCH)

bin/coder:
mkdir -p bin
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o bin/coder-$(GOOS)-$(GOARCH) cmd/coder/main.go
CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o bin/coder-$(GOOS)-$(GOARCH) cmd/coder/main.go
.PHONY: bin/coder

bin/coderd:
Expand Down
7 changes: 6 additions & 1 deletion coderd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,13 @@ func Root() *cobra.Command {
Scheme: "http",
Host: address,
}
realAccessURL, err := url.Parse("https://v2--kyle.master.cdr.dev/")
if err != nil {
return xerrors.Errorf("parse real access url: %s", err)
}

handler, closeCoderd := coderd.New(&coderd.Options{
AccessURL: accessURL,
AccessURL: realAccessURL,
Logger: logger,
Database: databasefake.New(),
Pubsub: database.NewPubsubInMemory(),
Expand Down
3 changes: 2 additions & 1 deletion provisioner/terraform/provision.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,10 @@ func (t *terraform) runTerraformPlan(ctx context.Context, terraform *tfexec.Terr
}
switch authTypeValue {
case "google-instance-identity":
instanceID, _ := block["instance_id"].ConstantValue.(string)
agent.Auth = &proto.Agent_GoogleInstanceIdentity{
GoogleInstanceIdentity: &proto.GoogleInstanceIdentityAuth{
InstanceId: block["instance_id"].ConstantValue.(string),
InstanceId: instanceID,
},
}
default:
Expand Down