# Google Cloud Inbound Integration

## Cloud Integration with Google Cloud Platform

### Settings in Google Cloud Platform Console

Open your Google Cloud Platform Console and perform the following steps:

Procedure: Add permissions to a VM Instance Service Account

1. Choose from the top left corner and select Compute Engine VM instance.

2. Select the VM instance you want to authorize with Avantra, scroll down, and note the name shown under Service account.

3. Choose from the top left corner and select IAM & admin Service accounts.

4. Select the user from Step 2 and choose menu:[Create key] in the Actions column. Choose JSON and push the Create button. This generates a JSON file with a private key that is downloaded to your computer. Push Close.

### Service Authentication settings for Google Cloud Platform in the UI

Open Avantra WebUI and perform the following steps:

Procedure: Creating Google Cloud Platform Cloud Authentication

1. Open Configuration Integrations and choose New Google Cloud Platform.

2. Fill in a Name, an optional Description and select a Customer. Push the Finish button.

3. Select the newly created entry and push Open.

4. Open the file downloaded in Step 4 of Procedure: Add permissions to a VM Instance Service Account, copy its content and paste it into the field Service Account (JSON).

5. Push the Save button.

### Synchronization of GCP Server Instances in the UI

Open Avantra WebUI and perform the following steps:

1. Login to the Avantra UI as the `admin` user.

2. Choose Administration Synchronizations and select New Inbound synchronization.

3. For External Service choose `GCP Compute Engine`, fill in a Name, for example `GCP Synchronization`, and push the Create button.

4. In the newly created item, choose for GCP Service Account your service account that you want to use.

5. For GCP Zone you can either specify one or all zones will be checked automatically.

6. In Filter, you may define one or more filter rules to restrict the set of instances considered for the synchronization.

   By default, the value of the `Name` tag is used for the value Physical Server Name in Avantra, and the private IP address is used for FQDN or IP Address.

   Push the Apply followed by the Test Query button whenever you make changes and want to verify the filter.

7. For System Type choose `Server`, and choose a Default Customer and a Default System Role. You can override these default settings on a per Server level as described below.

8. Select the value `yes` for Start Monitoring. Set the flags for Create Server and Update Server (if desired). Push the Apply button and afterwards the Sync button. Confirm that you have tested your query properly.

9. If you want to synchronize periodically, set the flag next to Activate background synchronization and choose an appropriate value for the synchronization interval. Push the Apply button.

10. Select System Servers to verify the synchronization.