Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
zli82016 committed Sep 26, 2024
1 parent 5422306 commit c09666a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
4 changes: 1 addition & 3 deletions mmv1/provider/template_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@ func (td *TemplateData) GenerateTGCIamResourceFile(filePath string, resource api
}

func (td *TemplateData) GenerateFile(filePath, templatePath string, input any, goFormat bool, templates ...string) {
// log.Printf("Generating %s", filePath)

templateFileName := filepath.Base(templatePath)

tmpl, err := template.New(templateFileName).Funcs(google.TemplateFunctions).ParseFiles(templates...)
Expand Down Expand Up @@ -218,7 +216,7 @@ func (td *TemplateData) GenerateFile(filePath, templatePath string, input any, g
}

if goFormat && !strings.Contains(templatePath, "third_party/terraform") {
cmd := exec.Command("goimports", "-w", filePath)
cmd := exec.Command(filePath, "goimports", "-w")
if err := cmd.Run(); err != nil {
log.Fatal(err)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ import (
{{ if eq $.TargetVersionName `ga` }}
"github.com/hashicorp/terraform-provider-google/google/services/composer"
{{- end }}
"github.com/hashicorp/terraform-provider-google/google/services/container"
"github.com/hashicorp/terraform-provider-google/google/services/containeraws"
"github.com/hashicorp/terraform-provider-google/google/services/containerazure"
"github.com/hashicorp/terraform-provider-google/google/services/dataflow"

"github.com/hashicorp/terraform-provider-google/google/tpgiamresource"
)

Expand Down
1 change: 0 additions & 1 deletion mmv1/third_party/tgc/resource_converters.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ package google
import (
"sort"
"github.com/GoogleCloudPlatform/terraform-google-conversion/v5/tfplan2cai/converters/google/resources/cai"
"github.com/GoogleCloudPlatform/terraform-google-conversion/v5/tfplan2cai/converters/google/resources/services/accesscontextmanager"
"github.com/GoogleCloudPlatform/terraform-google-conversion/v5/tfplan2cai/converters/google/resources/services/alloydb"
"github.com/GoogleCloudPlatform/terraform-google-conversion/v5/tfplan2cai/converters/google/resources/services/apigee"
"github.com/GoogleCloudPlatform/terraform-google-conversion/v5/tfplan2cai/converters/google/resources/services/artifactregistry"
Expand Down

0 comments on commit c09666a

Please sign in to comment.