This repo now the Duplo Github Actions to perform releases.
There is a Start Release workflow to kick off the process.
- To build and install, run
make install. - To generate or update documentation, run
make doc.
cd examples/service
terraform init && terraform applyexport TF_LOG_PATH=duplo.log
export TF_LOG=TRACE
terraform init && terraform applyReference documentation here
- Install the VS code GO extension
- Go to VS code debug tab and start a new debug session for the terraform provider. You should see something similar to the output below in the console:
Starting: /Users/{USERNAME}/go/bin/dlv dap --listen=127.0.0.1:55046 --log-dest=3 from /Users/{USERNAME}/Desktop/duplocloud/terraform-provider-duplocloud
DAP server listening at: 127.0.0.1:55046
Type 'dlv help' for list of commands.
Provider started. To attach Terraform CLI, set the TF_REATTACH_PROVIDERS environment variable with the following:
TF_REATTACH_PROVIDERS='{"registry.terraform.io/duplocloud/duplocloud":{"Protocol":"grpc","ProtocolVersion":5,"Pid":79817,"Test":true,"Addr":{"Network":"unix","String":"/var/folders/32/bgvj1ynd6p16109l4t7sx4jm0000gn/T/plugin2604224326"}}}'
- Copy
TF_REATTACH_PROVIDERSto your clipboard and a terminal session to run the terraform commands - Run the terraform apply command like the following:
TF_REATTACH_PROVIDERS='{"registry.terraform.io/duplocloud/duplocloud":{"Protocol":"grpc","ProtocolVersion":5,"Pid":79817,"Test":true,"Addr":{"Network":"unix","String":"/var/folders/32/bgvj1ynd6p16109l4t7sx4jm0000gn/T/plugin2604224326"}}}' terraform apply
- Happy debugging!
Assumptions
- Wsl2 is already installed
- You are using a Ubuntu Linux
- You have pulled the project on Wsl2
- You will need to enable systemd support https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/#set-the-systemd-flag-set-in-your-wsl-distro-settings
Install make on Wsl2:
sudo apt-get install build-essential
make version # make: *** No rule to make target 'version'. Stop.Install go on Wsl2:
sudo apt install golang-go
go version # Test your install: you should see something like "go version go1.18.1 linux/amd64"Build project
- Make sure you are in the directory where the Makefile is located
make install
Install terraform
sudo snap install terraform --classic
terraform version # you should see something like Terraform v1.6.5 ....This project is licensed under the MIT License.