diff --git a/README.md b/README.md index 3f4a88c..cf769c0 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,20 @@ _Hint: If configured properly using the provided setup, a different set of stati ### Initialize Linode Infrastructure - Terraform -First, clone the repo. Then `cd terraform/`. From here, use the following commands to connect Terraform to the Linode account: +First, clone the repo. Then `cd terraform/`. From here, create a `.envrc` file to load a few custom variables into your shell using `direnv`: - echo "export TF_VAR_token=<>" >> .envrc ## Add this manually, don't put your token in a CLI history. + + export TF_VAR_token=TF_VAR_token=<> + export TF_VAR_root_pass=<> + export AWS_ACCESS_KEY_ID=<> + export AWS_SECRET_ACCESS_KEY=<> + +Replace the name and region names in `backend.tf` to match the bucket created to store the .tfstate file. + +Use `direnv` to load the vars and Terraform to the Linode account: + + echo "export TF_VAR_token=<>" >> .envrc ## Add this manually, don't put a token in a CLI history. + direnv allow terraform init