Skip to content

Commit

Permalink
Split tgc converters
Browse files Browse the repository at this point in the history
  • Loading branch information
zli82016 committed Oct 1, 2024
1 parent 02d6c97 commit 0499c49
Show file tree
Hide file tree
Showing 52 changed files with 225 additions and 416 deletions.
153 changes: 77 additions & 76 deletions mmv1/provider/terraform_tgc.go

Large diffs are not rendered by default.

192 changes: 0 additions & 192 deletions mmv1/templates/tgc/resource_converters.go.tmpl

This file was deleted.

9 changes: 9 additions & 0 deletions mmv1/third_party/tgc/cai/string_helpers.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package cai

func ConvertInterfaceToStringArray(values []interface{}) []string {
stringArray := make([]string, len(values))
for i, v := range values {
stringArray[i] = v.(string)
}
return stringArray
}
4 changes: 2 additions & 2 deletions mmv1/third_party/tgc/firebase_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func GetFirebaseProjectCaiObject(d tpgresource.TerraformResourceData, config *tr

func GetFirebaseProjectApiObject(d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]interface{}, error) {
obj := make(map[string]interface{})

nameProp, err := expandFirebaseProjectName(d.Get("name"), d, config)
if err != nil {
return nil, err
Expand Down Expand Up @@ -102,4 +102,4 @@ func expandFirebaseProjectProjectId(v interface{}, d tpgresource.TerraformResour

func expandFirebaseProjectName(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) {
return v, nil
}
}
Loading

0 comments on commit 0499c49

Please sign in to comment.