Skip to content

Commit 8cd6b36

Browse files
Update terraform.md
1 parent 1eef5f3 commit 8cd6b36

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

terraform.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,45 @@
22

33
## GENERAL
44

5+
<details><summary><b>DOWNLOAD PROVIDERS FOR AIRGAPPED</b></summary>
6+
7+
```bash
8+
cat main.tf
9+
provider "null" {}
10+
11+
resource "null_resource" "example" {
12+
triggers = {
13+
timestamp = timestamp()
14+
}
15+
}
16+
```
17+
18+
```bash
19+
terraform providers mirror /tmp/tf-providers
20+
21+
tree /tmp/tf-providers
22+
/tmp/tf-providers
23+
└── registry.terraform.io
24+
└── hashicorp
25+
└── null
26+
├── 3.2.4.json
27+
├── index.json
28+
└── terraform-provider-null_3.2.4_linux_amd64.zip
29+
30+
4 directories, 3 files
31+
```
32+
33+
```bash
34+
# COPY TO AIRGAPPED MACHINE
35+
rsync -av /tmp/tf-providers/ \
36+
sthings@airgap:/home/sthings/.terraform.d/plugins/
37+
38+
# INIT TERRAFORM
39+
terraform init -plugin-dir=/home/sthings/.terraform.d/plugins
40+
```
41+
42+
</details>
43+
544
<details><summary><b>INSTALL TERRAFORM CLI (AS BINARY)</b></summary>
645

746
```bash

0 commit comments

Comments
 (0)