You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -25,16 +25,14 @@ Terraform's primary job is to create, modify, and destroy servers and other reso
25
25
26
26
## The Linode Provider
27
27
28
-
Terraform is a general orchestration tool that can interface with a number of different cloud platforms. These integrations are referred to as *providers*. The Terraform provider for Linode was [officially released](https://blog.linode.com/2018/10/30/now-available-linode-terraform-provider/) in October 2018.
29
-
30
-
{{< note >}}
31
-
The Linode provider relies on Linode's [APIv4](/docs/products/tools/api/), so an API access token is needed to use it. See [Use Terraform to Provision Linode Environments](/docs/guides/how-to-build-your-infrastructure-using-terraform-and-linode/) for instructions on getting an API token and installing Terraform and the Linode provider on your computer.
32
-
{{< /note >}}
28
+
Terraform is a general orchestration tool that can interface with a number of different cloud platforms. These integrations are referred to as *providers*. The Terraform provider for Linode was [officially released](https://blog.linode.com/2018/10/30/now-available-linode-terraform-provider/) in October 2018. A version history, including the latest provider release number, can be found on [Terraform's Registry](https://registry.terraform.io/providers/linode/linode/latest).
33
29
34
30
The Linode provider can be used to create Linode instances, Images, domain records, Block Storage Volumes, StackScripts, and other resources. Terraform's [official Linode provider documentation](https://www.terraform.io/docs/providers/linode/index.html) details each resource that can be managed.
35
31
32
+
The Linode provider relies on Linode's [APIv4](/docs/products/tools/api/), and an API access token is needed to use it. See [Use Terraform to Provision Linode Environments](/docs/guides/how-to-build-your-infrastructure-using-terraform-and-linode/) for instructions on getting an API token and installing Terraform and the Linode provider on your computer.
33
+
36
34
{{< note >}}
37
-
[Terraform’s Linode Provider](https://github.com/linode/terraform-provider-linode)has been updated and now requires Terraform version 0.12+. To learn how to safely upgrade to Terraform version 0.12+, see [Terraform’s official documentation](https://www.terraform.io/upgrade-guides/0-12.html). View [Terraform v0.12’s changelog](https://github.com/hashicorp/terraform/blob/v0.12.0/CHANGELOG.md) for a full list of new features and version incompatibility notes.
35
+
As of May 22, 2019, [Terraform’s Linode Provider](https://github.com/linode/terraform-provider-linode) requires Terraform version 0.12+. To learn how to safely upgrade to Terraform version 0.12+, see [Terraform’s official documentation](https://www.terraform.io/upgrade-guides/0-12.html). View [Terraform v0.12’s changelog](https://github.com/hashicorp/terraform/blob/v0.12.0/CHANGELOG.md) for a full list of Terraform versions, features, and incompatibility notes.
38
36
{{< /note >}}
39
37
40
38
## Infrastructure as Code
@@ -57,44 +55,46 @@ The next sections will illustrate core Terraform concepts with examples written
57
55
58
56
Here's a simple example of a complete Terraform configuration in HCL:
59
57
58
+
{{< note >}}
59
+
The SSH key in this example is truncated for brevity.
The SSH key in this example was truncated for brevity.
86
-
{{< /note >}}
86
+
This example Terraform file, with the Terraform file extension `.tf`, represents the creation of a single Linode instance labeled `example_instance_label`. This example file is prefixed with a mandatory `provider` block, which sets up the Linode provider must be listed in your configuration.
87
87
88
-
This example Terraform file, with the Terraform file extension `.tf`, represents the creation of a single Linode instance labeled `example_instance_label`. This example file is prefixed with a mandatory `provider` block, which sets up the Linode provider and which you must list somewhere in your configuration.
88
+
The `provider` block is followed by a *resource* declaration. The `example_instance` string that follows the `linode_instance` resource type declaration is Terraform's name for the resource. You cannot declare more than one Terraform resource with the same name and resource type. Resource declarations correspond with the components of your Linode infrastructure: Linode instances, Block Storage Volumes, etc.
89
89
90
-
The `provider` block is followed by a *resource* declaration. Resource declarations correspond with the components of your Linode infrastructure: Linode instances, Block Storage Volumes, etc.
90
+
Resources can accept arguments. The `label` argument specifies the label for the Linode instance in the Linode Manager. This name is independent of Terraform's name for the resource (though you can assign the same value to both). The Terraform name is only recorded in Terraform's [state](#state) and is not communicated to the Linode API. Labels for Linode instances in the same Linode account must be unique.
91
91
92
-
Resources can accept arguments. `region` and `type` are required arguments for the `linode_instance` resource. A root password must be assigned to every Linode, but the `root_pass` Terraform argument is optional; if it is not specified, a random password will be generated.
92
+
`region` and `type` are required arguments for the `linode_instance` resource. The `authorized_keys` argument allows you to optionally provide one or more SSH public keys to deploy for the *root* user. A root password must be assigned to every Linode, but the `root_pass` Terraform argument is optional; if it is not specified, a random password will be generated.
93
93
94
-
{{< note >}}
95
-
The `example_instance` string that follows the `linode_instance` resource type declaration is Terraform's name for the resource. You cannot declare more than one Terraform resource with the same name and resource type.
94
+
{{< note title="Root Access & Non-Root Users" >}}
95
+
It is considered a best practice to limit root user access on any compute instance. For security best practices and configuration steps after deployment, see our [Set Up and Secure a Linode](https://techdocs.akamai.com/cloud-computing/docs/set-up-and-secure-a-compute-instance) guide.
96
96
97
-
The `label` argument specifies the label for the Linode instance in the Linode Manager. This name is independent of Terraform's name for the resource (though you can assign the same value to both). The Terraform name is only recorded in Terraform's [state](#state) and is not communicated to the Linode API. Labels for Linode instances in the same Linode account must be unique.
97
+
Additionally, non-root users can not be created upon initial deployment using the Linode Terraform Provider. See our [Linux Users and Groups](/docs/guides/linux-users-and-groups/#creating-and-deleting-user-accounts) guide for steps on creating and configuring user accounts on a Linode instance.
0 commit comments