Overview

Date: 2026-05-11

Time: 15:18

Overview

This page covers how to use FTL2 to provision and configure Google Cloud Platform (GCP) infrastructure. It explains setup (installing the google.cloud Ansible collection and Python dependencies), authentication methods (service account key or application default credentials), and the available GCP modules for managing compute, storage, SQL, and DNS resources — all accessed through FTL2's async automation pattern.

Key Concepts

Commands and Syntax

Setup:


# Install collection into venv
ANSIBLE_COLLECTIONS_PATH=.venv/lib/python3.14/site-packages \
  .venv/bin/ansible-galaxy collection install google.cloud

# Install Python auth/API dependencies
uv pip install google-auth google-cloud-compute google-api-python-client

Authentication (env vars):


# Service account
export GCP_AUTH_KIND=serviceaccount
export GCP_SERVICE_ACCOUNT_FILE=/path/to/service-account.json

# Application default credentials
export GCP_AUTH_KIND=application
gcloud auth application-default login

FTL2 usage pattern:


async with automation(secret_bindings={"google.cloud.*": {...}}) as ftl:
    await ftl.google.cloud.gcp_compute_instance(name="vm", ...)

Example scripts: examplegcpprovision.py (creates VPC, subnet, firewall, GCE instance, nginx), examplegcpteardown.py (deletes all provisioned resources).

Relationships

Exam-Relevant Points