Registry / gcp / cdktf-cdktf-provider-google

cdktf-cdktf-provider-google

JSON →
library16.12.1pypypiunverified

CDKTF (CDK for Terraform) prebuilt bindings for the Google Cloud Platform (GCP) provider. Version 16.12.1 targets Terraform provider google ~> 6.0. Released frequently, follows cdktf provider releases.

pip install cdktf-cdktf-provider-google
INSTALL
IMPORT
SIG · CDKTF-CDKTF-PROVID
C
cdktf-cdktf-provider-google
gcppythonv16.12.1
Install
19.0s avg
Import
Disk
362MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v16.12.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 310.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 19.0s · import 0.000s · 311MB
362MB installed
● package 362MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

google
from cdktf_cdktf_provider_google import google
import cdktf_cdktf_provider_google
The provider is imported as a module named 'google', not the pypi package name.
ComputeInstance
from cdktf_cdktf_provider_google.compute_instance import ComputeInstance
from cdktf_cdktf_provider_google import ComputeInstance
Resources are in submodules; direct import fails.
DataGoogleComputeInstance
from cdktf_cdktf_provider_google.data_google_compute_instance import DataGoogleComputeInstance
from cdktf_cdktf_provider_google import DataGoogleComputeInstance
Data sources also in submodules.

Minimal stack creating a GCE instance and synthesizing Terraform JSON.

from cdktf import App, TerraformStack from cdktf_cdktf_provider_google import google from cdktf_cdktf_provider_google.compute_instance import ComputeInstance app = App() stack = TerraformStack(app, "quickstart") google.GoogleProvider(stack, "provider", project="my-project", region="us-central1") ComputeInstance(stack, "vm", name="test", machine_type="e2-micro", zone="us-central1-a", boot_disk={"initialize_params": {"image": "debian-cloud/debian-11"}}, network_interface=[{"network": "default"}]) app.synth()
Debug
Known issues
breakingVersion 16.x drops support for Python 3.8 (requires ~=3.9).
fix
Upgrade to Python 3.9+.
affects: >=16.0.0
breakingBreaking changes between major provider versions (e.g., from 5.x to 6.x) reflect upstream Terraform provider changes. Always pin provider version and run `cdktf diff` after upgrades.
fix
Check upstream Terraform google provider changelog and update resource configs accordingly.
affects: All versions
gotchaProperty names use snake_case in Python, not camelCase as in HCL. Common mistake: `machineType` instead of `machine_type`.
fix
Use snake_case for all resource properties. Refer to CDKTF documentation for bindings.
affects: All versions
gotchaResource constructor expects `id` as second positional argument (the construct ID). Omitting it or reordering arguments causes cryptic errors.
fix
Always provide `id` argument: `Resource(stack, 'id', ...)`.
affects: All versions
Upgrade
Version history
16.12.1latest on PyPI · released Dec 10, 2025
Audit
Dependencies
cdktfrequiredRequired to construct and deploy stacks using this provider.
constructsrequiredBase library for CDKTF constructs.
Agent activity
46 hits · last 30 days
node
40
OpenAI (training)
1
Resources
cdktf-cdktf-provider-google — pip install cdktf-cdktf-provider-google · libregistry