Skip to content

Commit

Permalink
allow the modules/generated terraform files to use app variable inste…
Browse files Browse the repository at this point in the history
…ad of reading from happy config
  • Loading branch information
naihsuanshao committed Aug 28, 2023
1 parent 0142e74 commit 467d3f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shared/util/tf/tf_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (tf *TfGenerator) GenerateMain(srcDir, moduleSource string, vars map[string

// These variable depend on the happy config
if _, ok := varMap["app_name"]; ok {
moduleBlockBody.SetAttributeValue("app_name", cty.StringVal(tf.happyConfig.App()))
moduleBlockBody.SetAttributeRaw("app_name", tokens("var.app"))
delete(varMap, "app_name")
}

Expand Down

0 comments on commit 467d3f4

Please sign in to comment.