Firefly Documentation Portal
  • Welcome to the Documentation Portal
  • Contacting Firefly support
  • User Guides
    • QuickStart Guide
      • Onboarding
      • Dashboard
      • FAQ
      • Glossary
        • IaC status
    • Exploring the Inventory
    • Compose: Generating new configuration
    • Navigating the IaC Explorer
    • Workflows
      • Guardrails
    • Integrations
      • Integrate your providers and tools
        • Integrate your data sources
          • Integrate PagerDuty
          • Integrate MongoDB Atlas
          • Integrate AWS
            • Integrate AWS using Terraform
            • Integrate AWS using CloudFormation
            • Upgrading AWS integration to event-driven
            • AWS Discovery Status
          • Integrate Google Cloud
            • Integrate Google Cloud using a service account key
            • Integrate Google Cloud using Terraform
            • Google Cloud Discovery Status
          • Integrate Kubernetes
          • Integrate Datadog
          • Integrate New Relic
          • Integrate Okta
          • Integrate GitHub service
          • Integrate Cloudflare
          • Integrate NS1
          • Integrate Microsoft Azure
            • Integrate Microsoft Azure using Terraform
            • Azure Discovery Status
          • Integrate HashiCorp Vault
        • Integrate your IaC remote states
          • Integrate Terraform Cloud
          • Integrate Terraform Enterprise
          • Integrate HashiCorp Consul
          • Integrate remote stacks in Google Cloud Storage
          • Integrate env0
        • Integrate your version control system
          • Integrate GitHub
          • Integrate GitLab
          • Integrate Bitbucket
            • Integrate Bitbucket Data Center
            • Integrate Bitbucket Cloud
          • Integrate AWS CodeCommit
          • Integrate Azure DevOps
        • Send Firefly notifications to your messaging tools
          • Send Firefly notifications to Slack
            • Send notifications to Slack using the Slack App
            • Sending notifications to Slack using a webhook
          • Send Firefly notifications to Microsoft Teams
          • Send Firefly notifications to Torq
          • Send Firefly notifications to webhooks
          • Send Firefly notifications to Opsgenie
          • Send Firefly notifications to PagerDuty
            • Integration Key
            • General Access REST API Key
          • Send Firefly notifications to Google Chat
        • Integrate project management tools
          • Integrate Jira
    • Governance
    • Event-Center
    • How-to Guides
      • Manage assets
        • Codify assets
          • Codify assets to Config Connector
          • Codify assets to Manifest
          • Codify assets to Helm
          • Codify assets to CDK8S
          • Codify assets to Terraform
          • Codify assets to Pulumi
          • Codify assets to CloudFormation
          • Codify assets to CDK
          • Codify assets to Crossplane
          • Codify assets to Ansible
        • Delete unmanaged assets
        • Fix drifts
        • Remove asset Terraform code
        • Excluded drifts
        • IaC-Ignored assets
      • Monitor events
      • Manage notifications
      • Manage user roles
    • Deep Dive articles
      • Disaster recovery
      • Drifts
      • Codification
      • Notifications
      • Governance
      • Event-driven
      • IaC-Ignored assets
  • Appendix
    • Migrating CloudFormation resources to Terraform
    • Terraform Cloud Run Tasks
    • Creating a key pair
    • SSO Configuration
    • Firefly API Documentation
    • Support Matrix
    • Data privacy and AI usage
  • Firefly MCP
  • Firefly Backstage Plugin
Powered by GitBook
On this page
  • Discovering multiple projects in this integration

Was this helpful?

  1. User Guides
  2. Integrations
  3. Integrate your providers and tools
  4. Integrate your data sources
  5. Integrate Google Cloud

Integrate Google Cloud using Terraform

PreviousIntegrate Google Cloud using a service account keyNextGoogle Cloud Discovery Status

Last updated 1 year ago

Was this helpful?

Before you begin

  • Use or later.

  • on your workstation

  • To verify that you fulfilled these prerequisites, run the command in your terminal: gcloud version && terraform init && terraform --version

Procedure

  1. Create a directory for the Terraform file of your Google Cloud Platform project.

  2. At your gcloud CLI, run the command: gcloud config set project <PROJECT_NAME>

  3. In Firefly, select Settings > Integrations > + Add New > Google Cloud > Terraform.

  4. Copy the details created by the wizard, and paste them in the file.

  5. Run the terraform init command in the directory that contains the provided code.

  6. Run the terraform apply command.

Discovering multiple projects in this integration

Use the same service account key to simultaneously integrate multiple Google Cloud projects.

Procedure

  1. .

  2. Select IAM & Admin > Service Accounts.

  3. Copy the principal of the Service account you created in "Creating a service account" (associated email address).

  4. Select a resource - the desired project you would like to integrate or the organization if you want Firefly to discover all the projects in your organization.

  5. Select IAM > GRANT ACCESS.

  6. In the New principals field, paste the principal you copied in step 3.

  7. In the role field, select the following roles and SAVE:

    • roles/iam.securityReviewer

    • roles/storage.objectViewer (conditional to tfstate suffix)

    • roles/viewer

    • roles/logging.configWriter

  • To exclude projects under this service account, enter the rules in the Regex rules field.

  • Make sure the APIs in the list Enabling APIs is enabled for all projects you integrated.

Terraform v0.13
Install gcloud CLI
Log in to the Google Cloud console