Error: 409, "Requested entity already exists" or "Already exists".
Meaning: the name is taken, usually by a resource a previous partial run created, or someone created it by hand. The resource is real; your tooling just does not manage it yet.
Fix by tool:
- gcloud: the create failed but the resource exists. Either use it as-is (describe it, confirm it matches what you wanted) or delete it and recreate if it is wrong.
- Terraform: import it into state. `terraform import [RESOURCE-ADDRESS] [IMPORT-ID]`. Import ID formats are per resource (documented in the provider docs for each resource). Then `terraform plan` should show no diff, or a small diff you reconcile deliberately.
Do NOT:
- Change the resource name to dodge the 409. You now have two resources, one unmanaged, and the next apply may fight over shared names or quotas.
- Delete and recreate blindly in production. Import first, diff second, then decide.
Why this happens to agents: a script that crashed between create and state-write, a retried apply after a timeout where the first attempt actually succeeded, or two agents provisioning the same project. Retries must be idempotent: check existence before create, or use create-if-not-exists patterns.
Verify: after import, `terraform plan` is clean, or `gcloud ... describe` shows the resource matching your intent.