Terraform for the base resources associated with the ai-squad terraform.
project_id = "GCP-PROJECT-NAME"
region = "RESOURCE-REGION"
impersonate_service_account = "SA-NAME@GCP-PROJECT-NAME-project-name.iam.gserviceaccount.com"Run terraform commands in the appropriate environment directory.
cd envs/devFirst time in the repo or provider change or backend tfstate change.
terraform initFormat terraform.
terraform fmt -recursiveValidate terraform.
terraform validatePlan and apply terraform changes.
terraform plan -var-file="dev.tfvars"
terraform apply -var-file="dev.tfvars"Destroy resources.
terraform destroy -var-file="dev.tfvars"The following tools must be installed to ensure code meets the standards required to submit to the repo.
brew install pre-commit
brew install tflint
brew install trivyInstall git hooks
This will automatically run: terraform fmt, terraform validate, tflint and trivy (fails on high and critical issues only)
pre-commit installTest the hook.
pre-commit run --all-filesSSH from the cli
gcloud compute ssh <server-name> \
--zone <zone> \
--tunnel-through-iap