» Linode Provider
The Linode provider exposes resources and data sources to interact with Linode services. The provider needs to be configured with the proper credentials before it can be used.
Use the navigation to the left to read about the available data sources.
» Example Usage
# Configure the Linode provider
provider "linode" {
token = "$LINODE_TOKEN"
}
resource "linode_instance" "foobar" {
# ...
}
» Configuration Reference
The following keys can be used to configure the provider.
-
token
- (Required) This is your Linode APIv4 Token.
The Linode Token can also be specified using the LINODE_TOKEN
environment variable.
-
url
- (Optional) The HTTP(S) API address of the Linode API to use.
The Linode API URL can also be specified using the LINODE_URL
environment variable.
-
ua_prefix
- (Optional) An HTTP User-Agent Prefix to prepend in API requests.
The User-Agent Prefix can also be specified using the LINODE_UA_PREFIX
environment variable.
» Linode Guides
Several Linode Guides & Tutorials are available that explore Terraform usage with Linode resources:
- A Beginner's Guide to Terraform
- Introduction to HashiCorp Configuration Language (HCL)
- Use Terraform to Provision Linode Environments
- Deploy a WordPress Site Using Terraform and Linode StackScripts
- Create a NodeBalancer with Terraform
- Import Existing Infrastructure to Terraform
- Create a Terraform Module
- Secrets Management with Terraform
These guides are maintained by Linode and are not officially endorsed by HashiCorp.
» Debugging
The Linode APIv4 wrapper used by this provider accepts a LINODE_DEBUG
environment variable.
If this variable is assigned to 1
, the request and response of all Linode API traffic will be reported through Terraform debugging and logging facilities.
Use of the LINODE_DEBUG
variable in production settings is strongly discouraged with the linode_account
datasource. While Terraform does not directly store sensitive data from this datasource, the Linode Account API endpoint returns sensitive data such as the account tax_id
(VAT) and the credit card last_four
and expiry
. Be very cautious about storing this debug output.