mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: Add Terraform Provider for agent resources (#368)
* ci: Update DataDog GitHub branch to fallback to GITHUB_REF This was detecting branches, but not our "main" branch before. Hopefully this fixes it! * Add basic Terraform Provider * Rename post files to upload * Add tests for resources * Skip instance identity test * Add tests for ensuring agent get's passed through properly * Fix linting errors * Add echo path * Fix agent authentication * Update codersdk/files.go Co-authored-by: Bryan <bryan@coder.com> Co-authored-by: Bryan <bryan@coder.com>
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
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:
|
||||
@@ -10,7 +12,12 @@ bin/coderd:
|
||||
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)
|
||||
|
||||
peerbroker/proto: peerbroker/proto/peerbroker.proto
|
||||
protoc \
|
||||
--go_out=. \
|
||||
|
||||
Reference in New Issue
Block a user