Skip to content

Commit

Permalink
Fix the private module path for MMV1 templates (GoogleCloudPlatform#7810
Browse files Browse the repository at this point in the history
)
  • Loading branch information
zli82016 committed Apr 21, 2023
1 parent 924ded3 commit dc726ac
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 5 additions & 1 deletion mmv1/templates/terraform/iam_policy.go.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"google.golang.org/api/cloudresourcemanager/v1"

transport_tpg "github.com/hashicorp/terraform-provider-google<%= "-" + version unless version == 'ga' -%>/google<%= "-" + version unless version == 'ga' -%>/transport"
<% if version == 'private' -%>
transport_tpg "internal/terraform-next/google-private/transport"
<% else -%>
transport_tpg "github.com/hashicorp/terraform-provider-google<%= "-" + version unless version == 'ga' -%>/google<%= "-" + version unless version == 'ga' -%>/transport"
<% end -%>
)
<% resource_name = product_ns + object.name -%>
<%
Expand Down
4 changes: 4 additions & 0 deletions mmv1/templates/terraform/operation.go.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ import (
<% end -%>
"fmt"
"time"
<% if version == 'private' -%>
transport_tpg "internal/terraform-next/google-private/transport"
<% else -%>
transport_tpg "github.com/hashicorp/terraform-provider-google<%= "-" + version unless version == 'ga' -%>/google<%= "-" + version unless version == 'ga' -%>/transport"
<% end -%>
)

type <%= product_name -%>OperationWaiter struct {
Expand Down
6 changes: 5 additions & 1 deletion mmv1/templates/terraform/resource.erb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging"
transport_tpg "github.com/hashicorp/terraform-provider-google<%= "-" + version unless version == 'ga' -%>/google<%= "-" + version unless version == 'ga' -%>/transport"
<% if version == 'private' -%>
transport_tpg "internal/terraform-next/google-private/transport"
<% else -%>
transport_tpg "github.com/hashicorp/terraform-provider-google<%= "-" + version unless version == 'ga' -%>/google<%= "-" + version unless version == 'ga' -%>/transport"
<% end -%>
<% if object.gettable_properties.reject { |p| p.ignore_read }.any? { |prop| prop.flatten_object } -%>
"google.golang.org/api/googleapi"
Expand Down

0 comments on commit dc726ac

Please sign in to comment.