Skip to content

Commit 61309a1

Browse files
committed
Fixed the generator resource names to be HCL compliant
1 parent 068c895 commit 61309a1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/generate/postprocessing/preferred_resource_name.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,8 @@ func CleanResourceName(name string) string {
6868
if cleaned[0] >= '0' && cleaned[0] <= '9' {
6969
cleaned = "_" + cleaned
7070
}
71+
if cleaned[0] == '-' {
72+
cleaned = "_" + cleaned
73+
}
7174
return cleaned
7275
}

0 commit comments

Comments
 (0)