Skip to content

Commit

Permalink
Use stable order while writing terraform.tfvars
Browse files Browse the repository at this point in the history
  • Loading branch information
mr0re1 committed Mar 23, 2023
1 parent d644e55 commit 3d29341
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/modulewriter/hcl_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ func writeHclAttributes(vars map[string]cty.Value, dst string) error {
hclBody := hclFile.Body()

// for each variable
for k, v := range vars {
for _, k := range orderKeys(vars) {
// Write attribute
hclBody.SetAttributeValue(k, v)
hclBody.SetAttributeValue(k, vars[k])
}

// Write file
Expand Down

0 comments on commit 3d29341

Please sign in to comment.