Skip to content

Commit

Permalink
Fix Cloud Run v2 resources creation failure state inconsistency (#10298
Browse files Browse the repository at this point in the history
…) (#17711)

[upstream:28bed1de09cc598290c344eb8af95a63ed34b982]

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Mar 27, 2024
1 parent a503511 commit 695e9b1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .changelog/10298.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
```release-note:bug
cloudrunv2: fixed Terraform state inconsistency when resource `google_cloud_run_v2_job` creation fails
```
```release-note:bug
cloudrunv2: fixed Terraform state inconsistency when resource `google_cloud_run_v2_service` creation fails
```
3 changes: 0 additions & 3 deletions google/services/cloudrunv2/resource_cloud_run_v2_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -823,9 +823,6 @@ func resourceCloudRunV2JobCreate(d *schema.ResourceData, meta interface{}) error
config, res, &opRes, project, "Creating Job", userAgent,
d.Timeout(schema.TimeoutCreate))
if err != nil {
// The resource didn't actually create
d.SetId("")

return fmt.Errorf("Error waiting to create Job: %s", err)
}

Expand Down
3 changes: 0 additions & 3 deletions google/services/cloudrunv2/resource_cloud_run_v2_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1226,9 +1226,6 @@ func resourceCloudRunV2ServiceCreate(d *schema.ResourceData, meta interface{}) e
config, res, &opRes, project, "Creating Service", userAgent,
d.Timeout(schema.TimeoutCreate))
if err != nil {
// The resource didn't actually create
d.SetId("")

return fmt.Errorf("Error waiting to create Service: %s", err)
}

Expand Down

0 comments on commit 695e9b1

Please sign in to comment.