Skip to content

Commit

Permalink
Move tgc handwritten resource converters to specific service packages (
Browse files Browse the repository at this point in the history
  • Loading branch information
zli82016 authored and BBBmau committed Oct 23, 2024
1 parent f1c3a30 commit 13d8863
Show file tree
Hide file tree
Showing 53 changed files with 230 additions and 419 deletions.
2 changes: 2 additions & 0 deletions mmv1/products/firebase/Project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ custom_code:
constants: 'templates/terraform/constants/firebase_project.go.tmpl'
pre_create: 'templates/terraform/pre_create/firebase_project.go.tmpl'
exclude_sweeper: true
# The generated resource converter is not used. Instead, a handwritten converter is used.
exclude_tgc: true
examples:
- name: 'firebase_project_basic'
primary_resource_id: 'default'
Expand Down
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
}
Loading

0 comments on commit 13d8863

Please sign in to comment.