blob: a80c44373dec1999da6c025a63cfad98a1255323 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
---
lastproofread: '2024-03-03'
---
(terraformvyos)=
# Terraform for VyOS
VyOS supports development infrastructure via Terraform and
provisioning via Ansible. Terraform allows you to automate the
process of deploying instances on many cloud and virtual
platforms. In this article, we will look at using Terraform to
deploy VyOS on platforms - AWS, Azure, and vSphere. For more
details about Terraform, see the [Terraform introduction].
You will need to [install Terraform] before proceeding.
Structure of files in the standard Terraform project:
```none
.
├── main.tf # The main script
├── version.tf # File for the changing version of Terraform.
├── variables.tf # The file of all variables in "main.tf"
└── terraform.tfvars # The value of all variables (passwords, login, IP addresses and so on)
```
General commands that we will use for running Terraform scripts
```none
cd /<your folder> # go to the Terraform project
terraform init # install all add-ons and providers (AWS, Azure, and so on)
terraform plan # show what is changing
terraform apply # run script
yes # apply running
```
% stop_vyoslinter
[install Terraform]: https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli
% start_vyoslinter
[Terraform introduction]: https://developer.hashicorp.com/terraform/intro
|