Connect a GCP project

Connecting a GCP project deploys Clumio's Terraform template into the project, so that Clumio can inventory, back up, and restore your Google Cloud Storage (GCS) data in the regions that you choose. You deploy the template either through Google Cloud Infrastructure Manager or by running Terraform yourself.

Choose a method

Method Use it when
Infrastructure Manager You want Google Cloud to run the deployment for you, from the console.
Terraform You manage GCP infrastructure as code.

Prerequisites

  • Regions: Choose from the supported regions. You can connect each project to one or more of them.

  • Permissions: The identity that runs the deployment needs the permissions to deploy Clumio on the project. With Infrastructure Manager, that identity is a service account that you choose.

  • A Clumio API token: Create one in Clumio under Administration > Access management > API tokens. Copy the token when it's created, because it isn't shown again, and store it securely.

  • A GCP project: The project must be active, with billing enabled.

  • Terraform: Version 1.3.0 or later, if you use the Terraform method.

To start either method in Clumio, open the GCP Connect page and select Add Project:

  • If a GCP project is already connected, or GCP is the first cloud that you connected, go to GCP > Connect.

  • Otherwise, go to Administration > Add data source > GCP, or select + GCP project on the Home page.

Connect with Infrastructure Manager

  1. On GCP Connect, select Add Project > Add via Infrastructure Manager.

  2. On Enter project info, enter the Project ID and select the Regions. Select Next.

  3. On Deploy in Google Cloud, Clumio lists the values to enter in Infrastructure Manager: the Git repository, directory, and ref of the Clumio template, and the Terraform variables, including the API base URL for your Clumio portal. Keep this page open.

  4. In the project, create a service account for the deployment, and grant it the permissions to deploy Clumio and the Infra Manager Agent role (roles/config.agent). To use the service account, you need the Service Account User role (roles/iam.serviceAccountUser) on it.

  5. Select Launch infrastructure manager and create a deployment in Google Cloud:

    • Source: Git, with the repository and directory from step 3. For the Git ref, use the latest tag of the Clumio template.

    • Service account: The service account from step 4.

    • Input values: Each Terraform variable from step 3. For clumio_api_token, enter your Clumio API token.

    For the template's tags, see Tags · clumio-code/terraform-clumio-gcp-template.

  6. When the deployment is Active, return to Clumio and select Done.

The project appears on GCP Connect with the connection type Infrastructure Manager.

Connect with Terraform

  1. On GCP Connect, select Add Project > Add via Terraform. The Clumio provider page opens in the Terraform Registry.

  2. Follow its getting started guide. In your configuration, a clumio_gcp_connection resource registers the project and its regions, and the clumio-code/gcp-template/clumio module deploys to it. Set is_gcs_enabled = true.

  3. Sign in to Google Cloud with an identity that has the permissions to deploy Clumio, for example with gcloud auth application-default login.

  4. Run terraform init, terraform plan, and terraform apply.

The project appears on GCP Connect with the connection type Terraform.

For information about the provider, see Clumio Provider.

What gets deployed

Both methods deploy the same template into the project:

  • A service account that holds the permissions that Clumio uses. Clumio's own service account impersonates it for short-lived access. To use your own service account instead, set customer_service_account_email.

  • Clumio custom roles for GCS inventory, backup, and restore, bound to that service account.

  • A Pub/Sub topic and a Cloud Asset Inventory feed for change notifications.

  • An inventory bridge bucket in each connected region.

  • The Google APIs that the template needs: Cloud Storage, Storage Transfer, Pub/Sub, Cloud Asset Inventory, Storage Insights, and Cloud Monitoring.

After you connect

  • Update the template: With Terraform, run terraform init -upgrade, terraform plan, and terraform apply from your configuration folder. If you authenticate with a service account key file, export GOOGLE_APPLICATION_CREDENTIALS first. With Infrastructure Manager, update the deployment to the latest tag.

  • Remove the connection: Run terraform destroy, or delete the Infrastructure Manager deployment. Either removes the resources from your project and the connection from Clumio. The Google APIs stay enabled, because other workloads might use them. GCP keeps the deleted custom roles for a while, which is why reconnecting needs the iam.roles.undelete permission.

Protect your assets

Troubleshooting

Message Cause Resolution
Account onboarding is in progress. This process may take up to 10 minutes to complete. Please try again shortly. This is the first GCP connection for your Clumio account or region, and Clumio is still setting up. Wait a few minutes and run the deployment again. If it still fails after 10 minutes, contact Clumio support with your project ID and regions.
Error 403: Permission denied on resource … The identity that runs the deployment is missing permissions. Give the identity the permissions to deploy Clumio, wait a minute for them to take effect, and run the deployment again.
401 Unauthorized The Clumio API token is not valid for the API base URL. Check that the token is active under Administration > Access management > API tokens, and that the API base URL matches the Clumio portal where you created the token.
×

Loading...