terraform basics
Requirements
Make sure following is done:
Prepare
-
make a directory for your project
mkdir myfirstproject
-
cd myfirstproject
-
create
main.tf
<- creates the terraform main file
terraform {
required_providers {
grid = {
source = "threefoldtech/grid"
version = "<version-dev>" // provide version if you want to deploy with a version other than latest
}
}
}
provider "grid" {
mnemonics = "FROM THE CREATE TWIN STEP"
network = "dev" # or test to use testnet
}
- to initialize the repo
terraform init
basic commands
- to execute a terraform file
terraform apply
- to see the output
terraform output
- can be used to get the relevant output variables e.g public ip, planetary network ip, wireguard configurations ..
- to see the state
terraform show
- to destroy
terraform destroy
Find your Node
we have two options here(using the scheduler or searching for a node in the capacity explorer)
- Use the scheduler, scheduler will help you find a node that matches your criteria
- You do the capacity planning your self and make sure you choose a node which has enough capacity and is available (up and running).
Check Exploring Capacity to know which nodes fits your deployment criteria.