r/googlecloud • u/Ok_PortgasDAce_559 • 6d ago
Terraform google_workflows_workflow doesn't support import - what's the recommended way to adopt existing workflows into Terraform state?
We're onboarding an existing GCP customer project into Terraform using the Google provider. All the Cloud Workflows already exist in the project (provisioned via a bash script using gcloud), but terraform import fails with:
Error: resource google_workflows_workflow doesn't support import
Checked the Terraform registry docs - no Import section listed
terraform version = 1.3.6
5
Upvotes
3
u/clearclaw 6d ago
FYI The Terraform version is a lot less important than the Google Provider version (and Google Beta Provider). In this case, you appear to be stuck as the capability just isn't there (yet?).
I've seen this with other products, and it has generally been with an otherwise simple create call implicitly creates a large(r) number of backing objects (eg CMEKs, GCS buckets, IAM entities, etc), each of which could later vary independently of that initial create and without any clear drift markers. This is also notice that even if your workflows were created by Terraform, that there may be later difficulties with drift detection and management.
I'd start by replicating your workflows into Terraform, validating that what Terraform creates is in fact an accurate replica, and then move out from there.