Please follow these instructions to install Terraform binary on your machine.
- Create a new project in GCP console (link). Let's assume it's called "grr-terraform-demo".
- Enable billing for the project (link).
- Enable Compute Engine and Cloud SQL APIs (link).
- In Cloud Platform Console, navigate to the Create service account key page.
- From the Service account dropdown, select Compute Engine default service account, and leave JSON selected as the key type.
- Click Create, which downloads your credentials as a file named
[PROJECT_ID]-[UNIQUE_ID].json
. - In the same shell where you're going to run Terraform (see below), run the following:
export GCLOUD_KEYFILE_JSON=/absolute/path/to/downloaded-file.json
cd
to the folder with Terraform configuration files (and where this README
file is).
If it's the first time you run Terraform with this set of configuration files, run:
terraform init
Then run (grr-terraform-demo
is the name of a project that you've previously
set up):
terraform apply -var 'gce_project=grr-terraform-demo'
Run the following to get the URL of a newly deployed GRR AdminUI:
terraform output
Tip: you can use Terraform variables to specify the number of generated Windows and Linux clients:
terraform apply -var 'gce_project=grr-terraform-demo' -var 'windows_client_count=4' -var 'linux_client_count=3'