Skip to content

gibbardsteve/ai-squad-tf

Repository files navigation

ai-squad-tf

Terraform for the base resources associated with the ai-squad terraform.

Example tfvars file

project_id                  = "GCP-PROJECT-NAME"
region                      = "RESOURCE-REGION"
impersonate_service_account = "SA-NAME@GCP-PROJECT-NAME-project-name.iam.gserviceaccount.com"

Common Commands

Run terraform commands in the appropriate environment directory.

cd envs/dev

First time in the repo or provider change or backend tfstate change.

terraform init

Format terraform.

terraform fmt -recursive

Validate terraform.

terraform validate

Plan and apply terraform changes.

terraform plan -var-file="dev.tfvars"
terraform apply -var-file="dev.tfvars"

Destroy resources.

terraform destroy -var-file="dev.tfvars"

Pre-commit and Code Quality

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 trivy

Install git hooks

This will automatically run: terraform fmt, terraform validate, tflint and trivy (fails on high and critical issues only)

pre-commit install

Test the hook.

pre-commit run --all-files

Login to the compute engine server

SSH from the cli

gcloud compute ssh <server-name> \
  --zone <zone> \
  --tunnel-through-iap

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages