Skip to content

Commit d50fbbd

Browse files
mrethersstephan-rayner
authored andcommitted
Fixed the generator resource names to be HCL compliant
1 parent e77ff3e commit d50fbbd

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)