Terraform Provider for Linode
- Website: https://www.terraform.io
- Documentation: https://www.terraform.io/docs/providers/linode/index.html
- Mailing list: Google Groups
This provider plugin is maintained by Linode.
Using the provider
Additional documentation and examples are provided in the Linode Guide, Using Terraform to Provision Linode Environments.
Building the provider
You'll also need to correctly configure a GOPATH, as well as adding
$GOPATH/bin to your
To compile the provider, run
make build. This will build the provider and put the provider binary in the
Clone this repository to:
mkdir -p $GOPATH/src/github.com/terraform-providers cd $GOPATH/src/github.com/terraform-providers git clone https://github.com/terraform-providers/terraform-provider-linode.git
Enter the provider directory and build the provider
cd $GOPATH/src/github.com/terraform-providers/terraform-provider-linode make build
Testing the provider
In order to test the provider, you can simply run
In order to run the full suite of Acceptance tests, run
make testacc. Acceptance testing will require the
LINODE_TOKEN variable to be populated with a Linode APIv4 Token. See Linode Provider documentation for more details.
Note: Acceptance tests create real resources, and often cost money to run.
There are a number of useful flags and variables to aid in debugging.
LINODE_DEBUG- If truthy, this will emit all HTTP requests and responses to the Linode API. This may include sensitive data such as the account
tax_id(VAT) and the credit card
expiry. Be very cautious about storing this output.
TF_LOG- This instructs Terraform to emit trace level (and higher) logging messages.
TF_SCHEMA_PANIC_ON_ERROR- This forces Terraform to panic if a Schema Set command failed.
These values (along with
LINODE_TOKEN) can be placed in a
.env file in the repository root to avoid repeating them on the command line.
LINODE_TOKEN="__YOUR_APIV4_TOKEN__" TESTARGS="-run TestAccLinodeVolume -count=1" make testacc