Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Compiling Terraform Provider with Docker for OSX

Compiling Terraform Provider with Docker for OSX

Create binary terraform-provider-aws in current directory:

docker run \
  --rm \
  -v $(pwd):/go/src/github.com/terraform-providers/terraform-provider-aws \
  -w /go/src/github.com/terraform-providers/terraform-provider-aws \
  -e GOOS=darwin \
  -e GOARCH=amd64 \
  golang:latest \
  bash -c "apt-get update && apt-get install -y zip && make build && cp -f /go/bin/darwin_amd64/terraform-provider-aws ."

Copy binary to project directory .terraform/plugins/darwin_amd64 and run terraform init to update lock file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.