Skip to content

Commit 6aa4765

Browse files
florenciacomuzziFlorencia Comuzzi
andauthored
Create cluster (#4)
* break up docs * break up docs (#3) * create cluster --------- Co-authored-by: Florencia Comuzzi <florencia.comuzzi@alticeusa.com>
1 parent 10feabb commit 6aa4765

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

SETUP.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ The infrastructure is managed using Hashicorp Terraform Cloud.
44
Deployments are triggered from GitHub Actions workflows.
55

66
## Setting up your own project
7+
8+
### Linode
79
* Login to Linode account.
810
* Create a personal access token. This secret is the value of "token" input variable of the Terraform module.
911

10-
12+
### Terraform Cloud
1113
* Login to Terraform Cloud.
1214
* Create an organization like "mysite-org".
1315
* Create a Team Token scoped to owners. This secret is the value of TF_API_TOKEN used by GitHub Actions to authenticate to Hashicorp Terraform Cloud.
@@ -19,7 +21,7 @@ Deployments are triggered from GitHub Actions workflows.
1921
* In the workspace, create a workspace variable called "token" with the value of the Linode Personal Access Token.
2022
* Go back to the organization-level variable set you created previously and apply to the workspace specifically.
2123

22-
24+
### GitHub
2325
* Clone this repository. Name it like "mysite-site-terraform".
2426
* Create a TF_API_TOKEN repository secret by going to Settings > Secrets and variables > Actions. This secret is used by GitHub Actions to authenticate to Hashicorp Terraform Cloud during runs.
2527
* Change the values of TF_CLOUD_ORGANIZATION and TF_WORKSPACE in .github/workflows/terraform-apply.yml and .github/workflows/terraform-plan.yml.

main.tf

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
resource "linode_instance" "web" {
2-
label = "simple_instance"
3-
image = "linode/ubuntu22.04"
4-
region = "us-central"
5-
type = "g6-standard-1"
6-
authorized_keys = ["ssh-rsa AAAA...Gw== user@example.local"]
7-
root_pass = "this-is-not-a-safe-password"
1+
resource "linode_lke_cluster" "development" {
2+
label = "development"
3+
k8s_version = "1.32"
4+
region = "us-southeast"
5+
tags = ["prod"]
86

9-
tags = ["foo"]
10-
swap_size = 256
11-
private_ip = true
7+
pool {
8+
type = "g6-standard-1"
9+
count = 3
10+
}
1211
}

0 commit comments

Comments
 (0)