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
Copy file name to clipboardExpand all lines: docs/guides/applications/configuration-management/terraform/create-a-multicloud-infrastructure-using-terraform/index.md
+41-38Lines changed: 41 additions & 38 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@ description: 'This guide shows you how to use Multicloud Terraform to provide a
@@ -69,7 +70,7 @@ This guide is written for a non-root user. Commands that require elevated privil
69
70
70
71
## Downloading Terraform on your Linode Server
71
72
72
-
In this section, you install Terraform on an Ubuntu 20.04 Linode. These steps are generally applicable to most Debian-based distributions. You can use the Linode server as the hub for your Terraform-managed infrastructure, however, you can also install Terraform on your computer.
73
+
In this section, you install Terraform on an Ubuntu 24.04 LTS Linode. These steps are generally applicable to most Debian-based distributions. You can use the Linode server as the hub for your Terraform-managed infrastructure, however, you can also install Terraform on your computer.
73
74
74
75
To download Terraform on a Linode server, follow the steps below:
75
76
@@ -87,72 +88,68 @@ To download Terraform on a Linode server, follow the steps below:
87
88
mkdir terraform
88
89
cd terraform
89
90
90
-
1. Download Terraform using the `wget` command or from [Terraform's download page](https://www.terraform.io/downloads.html). This guide is written for the latest Terraform version 0.15.0 (at the time of writing this guide).
91
+
1. Download Terraform using the `wget` command or from [Terraform's download page](https://www.terraform.io/downloads.html). This guide is written for Terraform version 1.12.2 (at the time of this writing).
1. Locate HashiCorp's public GPG key on their [Security page](https://www.hashicorp.com/security) under the “Secure Communications” section. The key ID is `51852D87348FFC4C`.
111
+
1. Locate HashiCorp's public GPG key on their [Security page](https://www.hashicorp.com/security) under the “Secure Communications” section. Replace `51852D87348FFC4C` with the current public key value.
111
112
112
113
gpg --recv-keys 51852D87348FFC4C
113
114
114
115
The following output confirms that the `gpg` key has been successfully imported.
115
116
116
117
{{< output >}}
117
-
gpg: directory '/root/.gnupg' created
118
-
gpg: keybox '/root/.gnupg/pubring.kbx' created
119
118
gpg: /root/.gnupg/trustdb.gpg: trustdb created
120
-
gpg: key 51852D87348FFC4C: public key "HashiCorp Security <[email protected]>" imported
119
+
gpg: key 34365D9472D7468F: public key "HashiCorp Security (hashicorp.com/security)<[email protected]>" imported
121
120
gpg: Total number processed: 1
122
-
gpg: imported: 1
121
+
gpg: imported: 1
123
122
{{< /output >}}
124
123
125
124
1. Use `gpg` to validate the signature file. Use the exact names of the `sig` and `SHA256` files.
The following output confirms that the `sig` file is a good signature from HashiCorp Security.
130
129
131
130
{{< output >}}
132
-
gpg: Signature made Wed Apr 14 15:41:39 2021 UTC
133
-
gpg: using RSA key 91A6E7F85D05C65630BEF18951852D87348FFC4C
134
-
gpg: Good signature from "HashiCorp Security <[email protected]>" [unknown]
131
+
gpg: Signature made Wed 11 Jun 2025 10:34:29 AM UTC
132
+
gpg: using RSA key 374EC75B485913604A831CC7C820C6D5CD27AB87
133
+
gpg: Good signature from "HashiCorp Security (hashicorp.com/security) <[email protected]>" [unknown]
135
134
{{< /output >}}
136
135
137
136
1. Ensure the RSA key displayed in the output of the last step matches the fingerprint shown on the [Terraform Security page](https://www.hashicorp.com/security). The fingerprint is located in the same place as the GPG key in the "Secure Communications" section.
138
137
139
138
1. Verify the checksum of the `zip` archive. For the following command, use the exact name of the `SHA256SUMS` file.
140
139
141
-
sha256sum -c terraform_0.15.0_SHA256SUMS 2>&1 | grep OK
140
+
sha256sum -c terraform_1.12.2_SHA256SUMS 2>&1 | grep OK
142
141
143
142
The `sha256sum` program displays the name of the `zip` file along with the status. If the status is **NOT**`OK`, then the `zip` file is corrupt and must be downloaded again.
144
143
145
144
{{< output >}}
146
-
147
-
terraform_0.15.0_linux_amd64.zip: OK
148
-
149
-
{{< /output >}}
145
+
terraform_1.12.2_linux_amd64.zip: OK
146
+
{{< /output >}}
150
147
151
148
### Installing and Configuring Terraform on the Linode Server
152
149
153
150
1. Unzip the `terraform_*_linux_amd64.zip` to your `terraform` directory.
154
151
155
-
unzip terraform_0.15.0_linux_amd64.zip
152
+
unzip terraform_1.12.2_linux_amd64.zip
156
153
157
154
{{< note respectIndent=false >}}
158
155
If you receive an error that indicates `unzip` is missing from your system, install the `unzip` package using the following command `sudo apt install unzip` and try again.
@@ -204,13 +201,19 @@ The following steps explain how you can construct a multicloud configuration con
204
201
205
202
1. At the top of the file, add a `terraform` block to define the [Linode Provider](https://registry.terraform.io/providers/linode/linode/latest/docs), followed by the declaration of the Linode provider itself. Within the provider block, add the `token` declaration. See Linode’s guide on [Getting Started with the Linode API](/docs/products/tools/api/get-started/#get-an-access-token) to learn how to create an API token, if you have not done so already.
206
203
204
+
{{< note title ="Linode Provider Version 3.0.0" >}}
205
+
As of June, 2025, the Linode Terraform Provider version is 3.0.0. To determine the current version, see the [Linode Namespace](https://registry.terraform.io/namespaces/linode) in the Terraform Registry.
206
+
207
+
The Linode Terraform Provider version 3.0.0 requires `terraform` version 1.0 or greater. See [Terraform's developer documentation](https://developer.hashicorp.com/terraform/language/v1.1.x/upgrade-guides/1-0) for guidance on upgrading to version 1.0.
208
+
{{< /note >}}
209
+
207
210
{{< file "~/terraform/linode-terraform.tf" >}}
208
211
209
212
terraform {
210
213
required_providers {
211
214
linode = {
212
215
source = "linode/linode"
213
-
version = "1.16.0"
216
+
version = "3.0.0"
214
217
}
215
218
}
216
219
}
@@ -227,7 +230,7 @@ provider "linode" {
227
230
{{< file "~/terraform/linode-terraform.tf" >}}
228
231
229
232
resource "linode_instance" "terraform" {
230
-
image = "linode/ubuntu20.04"
233
+
image = "linode/ubuntu24.04"
231
234
label = "Terraform-Example"
232
235
group = "Terraform"
233
236
region = "us-east"
@@ -247,7 +250,7 @@ terraform {
247
250
required_providers {
248
251
linode = {
249
252
source = "linode/linode"
250
-
version = "1.16.0"
253
+
version = "3.0.0"
251
254
}
252
255
}
253
256
}
@@ -259,7 +262,7 @@ provider "linode" {
259
262
}
260
263
261
264
resource "linode_instance" "terraform" {
262
-
image = "linode/ubuntu20.04"
265
+
image = "linode/ubuntu24.04"
263
266
label = "terraform-example"
264
267
group = "terraform"
265
268
region = "us-east"
@@ -390,12 +393,12 @@ This guide describes all three steps in detail.
@@ -557,12 +560,12 @@ Terraform can modify a resource without affecting the other elements of your inf
557
560
558
561
The following example illustrates how to simultaneously add a new Linode and change the AWS database table.
559
562
560
-
1. Edit the `linode-terraform.tf` file, and add the following snippet to the end of the file. This defines a 1GB Linode running Ubuntu 20.04 as a new resource.
563
+
1. Edit the `linode-terraform.tf` file, and add the following snippet to the end of the file. This defines a 1GB Linode running Ubuntu 24.04 as a new resource.
@@ -32,10 +32,12 @@ If you would like to stop billing for the resources created in this guide, [remo
32
32
33
33
1. You should have Terraform installed in your development environment, and have a working knowledge of Terraform resource configuration and the [Linode provider](https://www.terraform.io/docs/providers/linode/index.html). For more information on how to install and use Terraform, check out our [Use Terraform to Provision Linode Environments](/docs/guides/how-to-build-your-infrastructure-using-terraform-and-linode/) guide.
34
34
35
-
{{< note respectIndent=false >}}
36
-
[Terraform’s Linode Provider](https://github.com/terraform-providers/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
+
{{< note title ="Linode Provider Version 3.0.0" >}}
36
+
As of June, 2025, the [Linode Terraform Provider](https://github.com/linode/terraform-provider-linode/) version is 3.0.0. To determine the current version, see the [Linode Namespace](https://registry.terraform.io/namespaces/linode) in the Terraform Registry.
37
+
38
+
The Linode Terraform Provider version 3.0.0 requires `terraform` version 1.0 or greater. See [Terraform's developer documentation](https://developer.hashicorp.com/terraform/language/v1.1.x/upgrade-guides/1-0) for guidance on upgrading to version 1.0.
37
39
38
-
The examples in this guide were written to be compatible with [Terraform version 0.11](https://www.terraform.io/docs/configuration-0-11/terraform.html) and will be updated in the near future.
40
+
The examples in this guide were originally written to be compatible with [Terraform version 0.11](https://www.terraform.io/docs/configuration-0-11/terraform.html).
39
41
{{< /note >}}
40
42
41
43
1. Terraform requires an API access token. Follow the [Getting Started with the Linode API](/docs/products/tools/api/get-started/#get-an-access-token) guide to obtain a token.
@@ -36,8 +36,10 @@ This guide covers the creation of a Terraform module used to deploy a Linode ins
36
36
37
37
1. Install Terraform on your local computer using the steps found in the **Install Terraform** section of the [Use Terraform to Provision Linode Environments](/docs/guides/how-to-build-your-infrastructure-using-terraform-and-linode/#install-terraform) guide. Your Terraform project directory should be named `linode_stackscripts`.
38
38
39
-
{{< note respectIndent=false >}}
40
-
[Terraform’s Linode Provider](https://github.com/terraform-providers/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.
39
+
{{< note title ="Linode Provider Version 3.0.0" >}}
40
+
As of June, 2025, the [Linode Terraform Provider](https://github.com/linode/terraform-provider-linode/) version is 3.0.0. To determine the current version, see the [Linode Namespace](https://registry.terraform.io/namespaces/linode) in the Terraform Registry.
41
+
42
+
The Linode Terraform Provider version 3.0.0 requires `terraform` version 1.0 or greater. See [Terraform's developer documentation](https://developer.hashicorp.com/terraform/language/v1.1.x/upgrade-guides/1-0) for guidance on upgrading to version 1.0.
41
43
{{< /note >}}
42
44
43
45
2. Terraform requires an API access token. Follow the [Getting Started with the Linode API](/docs/products/tools/api/get-started/#get-an-access-token) guide to obtain a token.
@@ -242,7 +244,7 @@ variable "stackscript_data" {
242
244
243
245
- Modules must include a description for each input variable to help document your configuration’s usage. This will make it easier for anyone else to use this module.
244
246
245
-
- Every variable can contain a default value. The default value is only used if no other value is provided. For example, if you have a favorite Linux distribution, you may want to provide it as your image variable’s default value. In this case, `linode/ubuntu18.04` is set as the default value.
247
+
- Every variable can contain a default value. The default value is only used if no other value is provided. For example, if you have a preferred Linux distribution, you may want to provide it as your image variable’s default value. In this case, `linode/ubuntu18.04` is set as the default value.
246
248
247
249
- You can declare a `type` for each variable. If no `type` is provided, the variable will default to `type = "string"`.
0 commit comments