Skip to content

Commit

Permalink
Colab runtime (#12715) (#20940)
Browse files Browse the repository at this point in the history
[upstream:2351a26ae4510b2aeed7629613579aef0c46b7d9]

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Jan 16, 2025
1 parent 1695c11 commit 23db44f
Show file tree
Hide file tree
Showing 8 changed files with 1,097 additions and 18 deletions.
3 changes: 3 additions & 0 deletions .changelog/12715.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
`google_colab_runtime`
```
5 changes: 3 additions & 2 deletions google/provider/provider_mmv1_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,9 @@ var handwrittenIAMDatasources = map[string]*schema.Resource{
}

// Resources
// Generated resources: 507
// Generated resources: 508
// Generated IAM resources: 261
// Total generated resources: 768
// Total generated resources: 769
var generatedResources = map[string]*schema.Resource{
"google_folder_access_approval_settings": accessapproval.ResourceAccessApprovalFolderSettings(),
"google_organization_access_approval_settings": accessapproval.ResourceAccessApprovalOrganizationSettings(),
Expand Down Expand Up @@ -635,6 +635,7 @@ var generatedResources = map[string]*schema.Resource{
"google_cloud_tasks_queue_iam_binding": tpgiamresource.ResourceIamBinding(cloudtasks.CloudTasksQueueIamSchema, cloudtasks.CloudTasksQueueIamUpdaterProducer, cloudtasks.CloudTasksQueueIdParseFunc),
"google_cloud_tasks_queue_iam_member": tpgiamresource.ResourceIamMember(cloudtasks.CloudTasksQueueIamSchema, cloudtasks.CloudTasksQueueIamUpdaterProducer, cloudtasks.CloudTasksQueueIdParseFunc),
"google_cloud_tasks_queue_iam_policy": tpgiamresource.ResourceIamPolicy(cloudtasks.CloudTasksQueueIamSchema, cloudtasks.CloudTasksQueueIamUpdaterProducer, cloudtasks.CloudTasksQueueIdParseFunc),
"google_colab_runtime": colab.ResourceColabRuntime(),
"google_colab_runtime_template": colab.ResourceColabRuntimeTemplate(),
"google_composer_user_workloads_config_map": composer.ResourceComposerUserWorkloadsConfigMap(),
"google_compute_address": compute.ResourceComputeAddress(),
Expand Down
20 changes: 4 additions & 16 deletions google/services/colab/colab_operation.go
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

// ----------------------------------------------------------------------------
//
// *** AUTO GENERATED CODE *** Type: MMv1 ***
//
// ----------------------------------------------------------------------------
//
// This file is automatically generated by Magic Modules and manual
// changes will be clobbered when the file is regenerated.
//
// Please read more about how to change this file in
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package colab

import (
Expand All @@ -38,8 +23,11 @@ func (w *ColabOperationWaiter) QueryOp() (interface{}, error) {
if w == nil {
return nil, fmt.Errorf("Cannot query operation, it's unset or nil.")
}

region := tpgresource.GetRegionFromRegionalSelfLink(w.CommonOperationWaiter.Op.Name)

// Returns the proper get.
url := fmt.Sprintf("%s%s", w.Config.ColabBasePath, w.CommonOperationWaiter.Op.Name)
url := fmt.Sprintf("https://%s-aiplatform.googleapis.com/v1/%s", region, w.CommonOperationWaiter.Op.Name)

return transport_tpg.SendRequest(transport_tpg.SendRequestOptions{
Config: w.Config,
Expand Down
Loading

0 comments on commit 23db44f

Please sign in to comment.