Skip to content

Commit 858c284

Browse files
committed
Make sure keys in schema are underscored
1 parent 3601cf7 commit 858c284

File tree

1 file changed

+4
-4
lines changed
  • pkg/translate/terraform_provider

1 file changed

+4
-4
lines changed

pkg/translate/terraform_provider/funcs.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ func RenderLocationSchemaGetter(names *NameProvider, spec *properties.Normalizat
514514
}
515515

516516
var attributes []attributeCtx
517-
for name, data := range spec.Locations {
517+
for _, data := range spec.Locations {
518518
var schemaType string
519519
if len(data.Vars) == 0 {
520520
schemaType = "rsschema.BoolAttribute"
@@ -523,9 +523,9 @@ func RenderLocationSchemaGetter(names *NameProvider, spec *properties.Normalizat
523523
}
524524

525525
var variableAttrs []attributeCtx
526-
for variableName, variable := range data.Vars {
526+
for _, variable := range data.Vars {
527527
attribute := attributeCtx{
528-
Name: variableName,
528+
Name: variable.Name.Underscore,
529529
Description: variable.Description,
530530
SchemaType: "rsschema.StringAttribute",
531531
Required: false,
@@ -547,7 +547,7 @@ func RenderLocationSchemaGetter(names *NameProvider, spec *properties.Normalizat
547547
}
548548

549549
attribute := attributeCtx{
550-
Name: name,
550+
Name: data.Name.Underscore,
551551
SchemaType: schemaType,
552552
Description: data.Description,
553553
Required: false,

0 commit comments

Comments
 (0)