A Terraform provider to manage Leaseweb resources.
Requirements
Terraform 0.12.0 or later is needed to use this plugin.
Go 1.20 or later is needed to build the plugin.
Setup for development
This setup uses docker so you do not need go (or any of the build tools) on
your workstation.
- You need
docker and docker compose.
- Git clone this repository and
cd into it.
- Run
docker compose build
- Run
docker compose up -d
Building the plugin
To build the plugin (in docker):
docker compose exec --env GOOS=$GOOS --env GOARCH=$GOARCH backend go build -o terraform-provider-leaseweb
Using the plugin locally
Move the plugin into the ~/.terraform.d/plugins/terraform.local/local/leaseweb/$VERSION/$GOOS_$GOARCH/ directory.
It can then be used the following way in your config:
terraform {
required_providers {
leaseweb = {
source = "terraform.local/local/leaseweb"
version = "0.3.2"
}
}
}
Building the plugin using a local checkout of the Leaseweb Golang SDK
If you need to do a modification in the SDK and want to test it within the usage of the plugin,
add the following at the end of the go.mod file to point to your local SDK checkout
replace github.com/LeaseWeb/leaseweb-go-sdk => /home/.../leaseweb-go-sdk