Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ The infrastructure is managed using Hashicorp Terraform Cloud.
Deployments are triggered from GitHub Actions workflows.

## Setting up your own project

### Linode
* Login to Linode account.
* Create a personal access token. This secret is the value of "token" input variable of the Terraform module.


### Terraform Cloud
* Login to Terraform Cloud.
* Create an organization like "mysite-org".
* 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.
Expand All @@ -19,7 +21,7 @@ Deployments are triggered from GitHub Actions workflows.
* In the workspace, create a workspace variable called "token" with the value of the Linode Personal Access Token.
* Go back to the organization-level variable set you created previously and apply to the workspace specifically.


### GitHub
* Clone this repository. Name it like "mysite-site-terraform".
* 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.
* Change the values of TF_CLOUD_ORGANIZATION and TF_WORKSPACE in .github/workflows/terraform-apply.yml and .github/workflows/terraform-plan.yml.
Expand Down
19 changes: 9 additions & 10 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
resource "linode_instance" "web" {
label = "simple_instance"
image = "linode/ubuntu22.04"
region = "us-central"
type = "g6-standard-1"
authorized_keys = ["ssh-rsa AAAA...Gw== user@example.local"]
root_pass = "this-is-not-a-safe-password"
resource "linode_lke_cluster" "development" {
label = "development"
k8s_version = "1.32"
region = "us-southeast"
tags = ["prod"]

tags = ["foo"]
swap_size = 256
private_ip = true
pool {
type = "g6-standard-1"
count = 3
}
}