Skip to content

Commit 7bf9689

Browse files
committed
add comments
1 parent 057fad6 commit 7bf9689

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

mmv1/templates/tgc_next/custom_expand/dataproc_batch.go.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ func expand{{$.GetPrefix}}{{$.TitlelizeProperty}}(v interface{}, d tpgresource.T
44
}
55
m := make(map[string]string)
66
for k, val := range v.(map[string]interface{}) {
7+
# In CAI asset, the property has prefix "spark:" (e.g. spark:spark.dynamicAllocation.enabled)
78
modifiedK := fmt.Sprintf("spark:%s", k)
89
m[modifiedK] = val.(string)
910
}

mmv1/templates/tgc_next/custom_flatten/dataproc_batch.go.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ func flatten{{$.GetPrefix}}{{$.TitlelizeProperty}}(v interface{}, d *schema.Reso
22
if properties, ok := v.(map[string]interface{}); ok {
33
propertiesCopy := make(map[string]interface{})
44
for k, v := range properties {
5+
# Remove the prefix "spark:" in property. Otherwise, terraform apply will fail with the error from API.
56
modifiedK := strings.TrimPrefix(k, "spark:")
67
propertiesCopy[modifiedK] = v
78
}

0 commit comments

Comments
 (0)