-
Notifications
You must be signed in to change notification settings - Fork 914
feat: Add Terraform Provider for agent resources #368
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
Changes from all commits
48bcf2c
eb50cda
773e38f
89ca1d7
29b5740
604e995
f8cab49
8f19f85
444109d
108f1b5
70cdcf4
7594657
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
INSTALL_DIR=$(shell go env GOPATH)/bin | ||
GOOS=$(shell go env GOOS) | ||
GOARCH=$(shell go env GOARCH) | ||
|
||
bin/coder: | ||
mkdir -p bin | ||
go build -o bin/coder cmd/coder/main.go | ||
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o bin/coder-$(GOOS)-$(GOARCH) cmd/coder/main.go | ||
.PHONY: bin/coder | ||
|
||
bin/coderd: | ||
mkdir -p bin | ||
go build -o bin/coderd cmd/coderd/main.go | ||
.PHONY: bin/coderd | ||
|
||
build: site/out bin/coder bin/coderd | ||
bin/terraform-provider-coder: | ||
mkdir -p bin | ||
go build -o bin/terraform-provider-coder cmd/terraform-provider-coder/main.go | ||
.PHONY: bin/terraform-provider-coder | ||
|
||
build: site/out bin/coder bin/coderd bin/terraform-provider-coder | ||
.PHONY: build | ||
|
||
# Runs migrations to output a dump of the database. | ||
|
@@ -59,6 +66,11 @@ install: | |
@echo "-- CLI available at $(shell ls $(INSTALL_DIR)/coder*)" | ||
.PHONY: install | ||
|
||
install/terraform-provider-coder: bin/terraform-provider-coder | ||
$(eval OS_ARCH := $(shell go env GOOS)_$(shell go env GOARCH)) | ||
mkdir -p ~/.terraform.d/plugins/coder.com/internal/coder/0.2/$(OS_ARCH) | ||
cp bin/terraform-provider-coder ~/.terraform.d/plugins/coder.com/internal/coder/0.2/$(OS_ARCH) | ||
Comment on lines
+71
to
+72
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice 👍 Not a blocker or needed but eventually we'll need a nice way to set the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Opened an issue to track here: #376 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, awesome! |
||
|
||
peerbroker/proto: peerbroker/proto/peerbroker.proto | ||
protoc \ | ||
--go_out=. \ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/hashicorp/terraform-plugin-sdk/v2/plugin" | ||
|
||
"github.com/coder/coder/provisioner/terraform/provider" | ||
) | ||
|
||
func main() { | ||
plugin.Serve(&plugin.ServeOpts{ | ||
ProviderFunc: provider.New, | ||
}) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the foundation for cross-compilation coming in 🎉