From b7400c6710cfa43e8be6668ed78de2da00841998 Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Mon, 7 Aug 2023 16:55:57 +0000 Subject: [PATCH] fix: cloud funcions gen2 enable taint on creation failure (#8545) Co-authored-by: Kristof Havasi Signed-off-by: Modular Magician --- .changelog/8545.txt | 3 +++ .../cloudfunctions2/resource_cloudfunctions2_function.go | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 .changelog/8545.txt diff --git a/.changelog/8545.txt b/.changelog/8545.txt new file mode 100644 index 00000000000..f24dd922e3e --- /dev/null +++ b/.changelog/8545.txt @@ -0,0 +1,3 @@ +```release-note:bug +cloudfunctions2: fixed creation failure TF state inconsistency in `google_cloudfunctions2_function` +``` diff --git a/google/services/cloudfunctions2/resource_cloudfunctions2_function.go b/google/services/cloudfunctions2/resource_cloudfunctions2_function.go index 62b093e5160..064f081e87a 100644 --- a/google/services/cloudfunctions2/resource_cloudfunctions2_function.go +++ b/google/services/cloudfunctions2/resource_cloudfunctions2_function.go @@ -607,9 +607,6 @@ func resourceCloudfunctions2functionCreate(d *schema.ResourceData, meta interfac config, res, &opRes, project, "Creating function", userAgent, d.Timeout(schema.TimeoutCreate)) if err != nil { - // The resource didn't actually create - d.SetId("") - return fmt.Errorf("Error waiting to create function: %s", err) }