From 25ee7b50f6e22b8abee60d7462e4c10641cf4dcf Mon Sep 17 00:00:00 2001 From: The Magician Date: Mon, 13 Nov 2023 14:50:30 -0800 Subject: [PATCH] Revert project service data source to pre-5.0.0 (#9464) (#16525) [upstream:721f059649d374ae4a4fac3c1956eab8a5815545] Signed-off-by: Modular Magician --- .changelog/9464.txt | 3 +++ .../data_source_google_project_service.go | 10 +--------- 2 files changed, 4 insertions(+), 9 deletions(-) create mode 100644 .changelog/9464.txt diff --git a/.changelog/9464.txt b/.changelog/9464.txt new file mode 100644 index 00000000000..8fd960358ee --- /dev/null +++ b/.changelog/9464.txt @@ -0,0 +1,3 @@ +```release-note:bug +resourcemanager: made `data_source_google_project_service` no longer return an error when service is not enabled +``` diff --git a/google/services/resourcemanager/data_source_google_project_service.go b/google/services/resourcemanager/data_source_google_project_service.go index 99bfa6c929a..f053aac54d9 100644 --- a/google/services/resourcemanager/data_source_google_project_service.go +++ b/google/services/resourcemanager/data_source_google_project_service.go @@ -30,13 +30,5 @@ func dataSourceGoogleProjectServiceRead(d *schema.ResourceData, meta interface{} return fmt.Errorf("Error constructing id: %s", err) } d.SetId(id) - err = resourceGoogleProjectServiceRead(d, meta) - if err != nil { - return err - } - - if d.Id() == "" { - return fmt.Errorf("%s not found", id) - } - return nil + return resourceGoogleProjectServiceRead(d, meta) }