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: README.md
+17-19Lines changed: 17 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,28 +2,27 @@
2
2
3
3
This project declares the infrastructure currently used by Subspace Network.
4
4
5
-
We use **Terraform** and **DigitalOcean**. Any **project**, **droplet**, **volume**, **attachment** must be defined in this repository to be reviewed and deployed using IAC.
5
+
We use **Terraform** and **AWS**. Any **project**, **instances**, **volume**, **attachment** must be defined in this repository to be reviewed and deployed using IAC.
6
6
7
7
Terraform projects folder structure:
8
8
9
9
```
10
-
└── resources
11
-
└── aries-dev/
12
-
└── aries-test-a/
13
-
└── aries-test-b/
14
-
└── polkadot-archive/
15
-
└── status-page/
16
-
└── telemetry/
17
-
└── common.tf
10
+
resources
11
+
├── README.md
12
+
├── devnet
13
+
├── gemini-3h
14
+
├── leaseweb
15
+
├── mainnet
16
+
├── packer
17
+
├── taurus
18
+
└── telemetry
18
19
```
19
20
20
-
-`common.tf` is located on the resources folder, it contains all the definitions to be used for each project.
21
-
- To re use common definitions a `symlink` is created using `/resources/common.tf` as the source.
22
21
- If you need to **create a new project**:
23
22
- go to the **resources** folder,
24
-
- create a **new folder-project**
25
-
-link common definitions running `ln -s ../common.tf common.tf`.
26
-
- Then you are ready to follow instructions to **init** terraform, **add resources**, **plan** the resource deployment and **apply** the resource deployments in **DigitalOcean**
23
+
- create a **new folder-project**
24
+
-use the terraform.tfvars.example from another project to populate the input variables
25
+
- Then you are ready to follow instructions to **init** terraform, **add resources**, **plan** the resource deployment and **apply** the resource deployments in **AWS**
27
26
28
27
_To apply any updates or new definitions_ you must always work in a separate branch and create a _Pull Request to the main branch_.
29
28
@@ -36,11 +35,11 @@ Install Terraform cli:
36
35
37
36
## Getting started.
38
37
39
-
Start by defining your personal DigitalOcean access token as an env variable, so you won’t have to set your token each time you run Terraform.
40
-
You can find your API token in your [DigitalOcean](https://cloud.digitalocean.com/account/api/tokens) account.
38
+
Start by defining your personal AWS access and secret keys as an env variable, so you won’t have to set your token each time you run Terraform.
41
39
42
40
```
43
-
export DO_TOKEN=9999999999999999aaaaaaaaaaaaaaa
41
+
export AWS_ACCESS_KEY_ID="your_access_key"
42
+
export AWS_SECRET_ACCESS_KEY="your_secret_key"
44
43
```
45
44
46
45
Go to **resources/PROJECT_NAME** directory and run the following commands to init terraform:
@@ -59,8 +58,7 @@ In the **resources/PROJECT_NAME** directory, run the following commands:
59
58
1. Run the **plan** command with the variable values passed in to see Terraform's steps to deploy your project resources.
60
59
61
60
```SH
62
-
terraform plan -var "do_token=${DO_TOKEN}" -out current-plan.tfplan
63
-
# DO NOT FORGET TO EXPORT DO_TOKEN before running this command.
61
+
terraform plan -var-file terraform.tfvars -out current-plan.tfplan
64
62
```
65
63
66
64
2. Run the **apply** command with the generated **current-plan.tfplan**.
0 commit comments