Google Cloud
How to Import Google Cloud Resources into Terraform
To import Google Cloud infrastructure into Terraform, scan it with Terraback (
terraback scan all gcp --project my-gcp-project) and run terraback gcp import --method bulk. Terraback generates the resource blocks and the Terraform 1.5+ import blocks for every resource it finds. Pick a resource below for a focused guide.Scan Google Cloud and generate Terraform
terraback scan all gcp --project my-gcp-projectterraback gcp import --method bulkGoogle Cloud import guides
Google Compute Engine InstanceFree
google_compute_instanceGoogle Cloud Storage BucketFreegoogle_storage_bucketGoogle VPC NetworkFreegoogle_compute_networkGoogle Kubernetes Engine (GKE) ClusterProgoogle_container_clusterGoogle Cloud SQL InstanceProgoogle_sql_database_instanceGoogle VPC SubnetworkFreegoogle_compute_subnetworkGoogle Pub/Sub TopicProgoogle_pubsub_topicGoogle Artifact Registry RepositoryProgoogle_artifact_registry_repositoryGoogle BigQuery DatasetProgoogle_bigquery_datasetGoogle BigQuery TableProgoogle_bigquery_tableGoogle Cloud Bigtable InstanceProgoogle_bigtable_instanceGoogle Cloud Build TriggerProgoogle_cloudbuild_triggerGoogle Cloud Functions (2nd gen)Progoogle_cloudfunctions2_functionGoogle Cloud Run ServiceProgoogle_cloud_run_serviceGoogle Cloud Run Job (v2)Progoogle_cloud_run_v2_jobGoogle Cloud Scheduler JobProgoogle_cloud_scheduler_jobGoogle Cloud Tasks QueueProgoogle_cloud_tasks_queueGoogle Cloud Composer EnvironmentProgoogle_composer_environmentGoogle Compute Regional AddressProgoogle_compute_addressGoogle Compute Backend ServiceProgoogle_compute_backend_serviceGoogle Compute Persistent DiskProgoogle_compute_diskGoogle Compute Firewall RuleProgoogle_compute_firewallGoogle Compute Regional Forwarding RuleProgoogle_compute_forwarding_ruleGoogle Compute Global Forwarding RuleProgoogle_compute_global_forwarding_ruleGoogle Compute Health CheckProgoogle_compute_health_checkGoogle Compute ImageProgoogle_compute_imageGoogle Compute Unmanaged Instance GroupProgoogle_compute_instance_groupGoogle Compute Instance TemplateProgoogle_compute_instance_templateGoogle Compute Cloud RouterProgoogle_compute_routerGoogle Compute Cloud NATProgoogle_compute_router_natGoogle Cloud Armor Security PolicyProgoogle_compute_security_policyGoogle Compute Disk SnapshotProgoogle_compute_snapshotGoogle Compute Target HTTPS ProxyProgoogle_compute_target_https_proxyGoogle Compute URL MapProgoogle_compute_url_mapGoogle Compute VPN TunnelProgoogle_compute_vpn_tunnelGoogle Kubernetes Engine Node PoolProgoogle_container_node_poolGoogle Cloud Dataproc ClusterProgoogle_dataproc_clusterGoogle Cloud DNS Managed ZoneProgoogle_dns_managed_zoneGoogle Cloud DNS Record SetProgoogle_dns_record_setGoogle Cloud Filestore InstanceProgoogle_filestore_instanceGoogle Cloud Firestore DatabaseProgoogle_firestore_databaseGoogle Cloud KMS Crypto KeyProgoogle_kms_crypto_keyGoogle Cloud KMS Key RingProgoogle_kms_key_ringGoogle Cloud Logging Project SinkProgoogle_logging_project_sinkGoogle Memorystore for MemcachedProgoogle_memcache_instanceGoogle Cloud Monitoring Alert PolicyProgoogle_monitoring_alert_policyGoogle Cloud Monitoring Notification ChannelProgoogle_monitoring_notification_channelGoogle Memorystore for RedisProgoogle_redis_instanceGoogle Secret Manager SecretProgoogle_secret_manager_secretGoogle IAM Service AccountProgoogle_service_accountGoogle Cloud Spanner InstanceProgoogle_spanner_instanceGoogle Cloud Spanner DatabaseProgoogle_spanner_databaseGoogle Cloud SQL DatabaseProgoogle_sql_databaseGoogle Cloud Workflows WorkflowProgoogle_workflows_workflowGoogle API Gateway GatewayProgoogle_api_gateway_gatewayGoogle API Gateway APIProgoogle_api_gateway_apiGoogle Cloud Bigtable TableProgoogle_bigtable_tableGoogle Binary Authorization PolicyProgoogle_binary_authorization_policyGoogle Certificate Manager CertificateProgoogle_certificate_manager_certificateGoogle Compute Backend BucketProgoogle_compute_backend_bucketGoogle VPC Network PeeringProgoogle_compute_network_peeringGoogle Compute Regional Backend ServiceProgoogle_compute_region_backend_serviceGoogle Compute Target HTTP ProxyProgoogle_compute_target_http_proxyGoogle Compute Target SSL ProxyProgoogle_compute_target_ssl_proxyGoogle Container RegistryProgoogle_container_registryGoogle Eventarc TriggerProgoogle_eventarc_triggerGoogle Firestore IndexProgoogle_firestore_indexGoogle Cloud Monitoring DashboardProgoogle_monitoring_dashboardGoogle Private CA Certificate AuthorityProgoogle_privateca_certificate_authorityGoogle Project IAM Custom RoleProgoogle_project_iam_custom_roleGoogle Pub/Sub SubscriptionProgoogle_pubsub_subscriptionGoogle Secret Manager Secret VersionProgoogle_secret_manager_secret_versionGoogle Service Account KeyProgoogle_service_account_keyGoogle API Gateway API ConfigProgoogle_api_gateway_api_configGoogle Cloud Bigtable App ProfileProgoogle_bigtable_app_profileGoogle Bigtable Table IAM BindingProgoogle_bigtable_table_iam_bindingGoogle Certificate Manager Certificate MapProgoogle_certificate_manager_certificate_mapGoogle Cloud Run Service IAM PolicyProgoogle_cloud_run_service_iam_policyGoogle Regional Target HTTP ProxyProgoogle_compute_region_target_http_proxyGoogle Regional Target HTTPS ProxyProgoogle_compute_region_target_https_proxyGoogle Regional Target TCP ProxyProgoogle_compute_region_target_tcp_proxyGoogle Regional URL MapProgoogle_compute_region_url_mapGoogle Target TCP ProxyProgoogle_compute_target_tcp_proxyGoogle Deployment Manager DeploymentProgoogle_deployment_manager_deploymentGoogle KMS Crypto Key IAM MemberProgoogle_kms_crypto_key_iam_memberGoogle KMS Key Ring IAM MemberProgoogle_kms_key_ring_iam_memberGoogle Project IAM BindingProgoogle_project_iam_bindingGoogle Project IAM MemberProgoogle_project_iam_memberGoogle Spanner Database IAM BindingProgoogle_spanner_database_iam_bindingGoogle Spanner Instance IAM BindingProgoogle_spanner_instance_iam_bindingGoogle Cloud Storage Bucket IAM BindingProgoogle_storage_bucket_iam_bindingImport your whole Google Cloud account in minutes
Terraback supports 80+ Google Cloud resource types and emits clean Terraform plus import blocks, running locally with read-only credentials.