How to deploy in GCP with Terraform
To set up / Forensic Acquisition and Investigation in GCP you can deploy via our Terraform script. The Terraform script automates the process of configuring the platform stack. Visit the GCP Marketplace listing here or Github to download the latest Terraform code.
Once you have downloaded the Terraform code from the Marketplace listing above, continue on to the steps below.
-
Install Terraform, if you have not already.
-
Install GCloud CLI, if you have not already.
-
Create a project and generate some service account credentials for the project, exporting the credentials.json. To create and use a service account, the user account will need Service Account User and Service Account Admin roles. The service account itself will need to have the following roles:
- Compute Admin
- Service Account User
- Storage Admin
- Cloud Filestore Editor
- Role Administrator
- Security Admin
-
Ensure the following APIs are enabled in the project:
- Compute Engine (compute.googleapis.com)
- Cloud Build (cloudbuild.googleapis.com)
- Cloud Filestore (file.googleapis.com)
- Secret Manager (secretmanager.googleapis.com)
- Cloud Resource Manager (cloudresourcemanager.googleapis.com)
- IAM Service Account Credentials (iamcredentials.googleapis.com)
- Cloud Storage (storage.googleapis.com)
-
Run
gcloud auth activate-service-account --key-file <key_file>where key_file is the path to your GCP service account credentials.json. -
Run
gcloud config set project <project_id> -
Extract gcp.zip This is the ZIP that was provided by / Forensic Acquisition and Investigation Sales, or downloaded from the GCP Marketplace, or cloned from https://github.com/cado-security/Deployment-Templates/tree/main/gcp
-
Change directories into gcp/ which was extracted in the previous step.
-
Customize the file
gcpVars.tfvarsby filling in values:Parameter Name Description Example unique_nameA string to ensure that resources created by Cado are unique cadocredentials_filePath to your GCP service account credentials json ../credentials.jsonproject_idID of the project Cado will be deployed into cado-12839regionThe region which Cado will be deployed to us-east1imageThe link of the image provided by Sales or the public release URL https://www.googleapis.com/compute/v1/projects/cado-public/global/images/cadoresponse-xxxtagsTags to be applied to your Cado instance {tag1 = "cado-test"}vm_sizeSize of main instance n2-standard-16vol_sizeSize of main instance local disk in GB 100GB Recommended. Preservation data is stored on the Filestore. allowed_ipsList of incoming IPs [“1.2.3.6/32”]tipThe Filestore minimum size is 1024GB. The platform will roughly need to be sized to be 20% of the amount of data you intend to be on the platform at once. For example, to have 5TB of disk images imported you will need approximately 1000GB of disk space. Projects can always be deleted to recover space.
capacity_gbis the setting to change this. -
Deploy by running the following commands in the directory
gcp/terraform initfollowed byterraform plan -var-file=gcpVars.tfvars. Once you confirm the plan looks correct, you can then runterraform apply -var-file=gcpVars.tfvars -
Find your / Forensic Acquisition and Investigation instance in the Compute Engine portal, navigate to its public IP address in the browser
-
Login with:
- Username: admin
- Password: <instance_id> (found in the Compute Engine console for your instance e.g. 8784481508256766876)