Deploying the image
Deploy the GCP vSensor VM using the Vectra template and `gcloud infra-manager`.
You will receive a template file from Vectra. Save both to a locally accessible directory from where you will run the gcloud deployment command.
<VERSION>_example.tf- Save a new copy of this and edit it to customize the deployment for your needs.
This template contains instructions and syntax for the deployment command.
Below is a sample edited
<VERSION>_example.tffile.In this case, the file was called
9.7_example.tf.
####################################################################################
# This configuration deploys resources necessary for the Vectra Sensor product. #
# #
# This template can be deployed with the `gcloud` commandline tool. #
# Please save this file into an empty directory of your choosing. #
# Before deploying the template, update the arguments in this file to #
# the desired values. The comment above each argument should explain the argument. #
# #
# Then, from within the directory, run: (replacing the placeholders in <>) #
# $ gcloud infra-manager deployments apply \ #
# --service-account <your_service_account> \ #
# --project <your_project> \ #
# projects/<your_project>/locations/<your_region>/deployments/<deployment_name> \ #
# --local-source=./ #
# #
# You may also use Terraform on its own if you are familiar with using Terraform. #
# #
####################################################################################
# the label of the module ("my_test_brain") is only used internally by terraform,
# so you can set it to anything
module "my_test_sensor" {
source = "https://cognito-public-deployment-tools.s3.us-west-2.amazonaws.com/GCPSensor/9.7.zip"
# Name of the resources to be created (will be appended to; e.g. the name `vectra-brain` will create `vectra-brain-vm` and `vectra-brain-os`)
name = "sensor-resources"
# IP address or hostname of the brain to register with
brain-ip = "192.0.2.16"
# Token for registration with headend, 32 letters long
registration-token = "pxthwxzgzlxpyqxqqygvcdkzkbmnzrzp"
# SSH public key for vectra user (format: ssh-rsa XXXX)
ssh-key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAtruncatedforvisibilityreasons"
# Project in which to deploy (project ID)
project = "example-dev"
# Region in which to deploy
region = "us-east4"
# Zone in which to deploy (actual zone, not just region)
zone = "us-east4-a"
# Size of sensor VM, must be one of e2-standard-2, e2-standard-4, e2-standard-8, e2-standard-16, e2-standard-32
size = "n2-highmem-96"
# Base image provided by Vectra
image = "projects/vectra-shared-images/global/images/vectra-gcp-embryo-9-6"
# Management subnetwork for VM (subnetwork selflink, such as projects/PROJ/regions/REG/subnetworks/SUBNET)
subnetwork = "projects/example-dev/regions/us-east4/subnetworks/mgt"
# Traffic subnetwork for VM (subnetwork selflink, such as projects/PROJ/regions/REG/subnetworks/SUBNET)
traffic-subnetwork = "projects/example-dev/regions/us-east4/subnetworks/traffic"
# Traffic network for VM (network selflink, such as projects/PROJ/global/networks/NET)
traffic-network = "projects/example-dev/global/networks/traffic"
}After editing the
<VERSION>_example.tffile you are now ready to deploy the Sensor.Perform the deployment using the
gcloud infra-manager deployments applycommand. Be sure to specify the service account created for Infrastructure Manager.
If the deployment fails, you can view the logs by going to Infrastructure Manager in the Google Cloud console, and clicking on the deployment that failed. (The example shown is for a Brain, but this screen looks the same for a Sensor.)

For example, this deployment failed because the image was not yet shared with the example customer:

If you have failed deployments for any reason, you can simply delete them by name as in this example:
You can list deployments as follows:
gcloud infra-manager deployments list -–project <PROJECT> --location <REGION>
To see resources created with a deployment, you can click on the Resources tab on the deployment page in the GCP console.
Last updated
Was this helpful?