Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
wuxu92 committed Oct 19, 2023
1 parent a155e4b commit a332a31
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions internal/meta/base_meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -581,15 +581,14 @@ func (meta *baseMeta) buildTerraformConfig(backendType string) string {
func (meta *baseMeta) buildProviderConfig() string {
f := hclwrite.NewEmptyFile()

var body *hclwrite.Body
if meta.useAzAPI() {
body = f.Body().AppendNewBlock("provider", []string{"azapi"}).Body()
f.Body().AppendNewBlock("provider", []string{"azapi"}).Body()
} else {
body = f.Body().AppendNewBlock("provider", []string{"azurerm"}).Body()
}
body.AppendNewBlock("features", nil)
for k, v := range meta.providerConfig {
body.SetAttributeValue(k, v)
body := f.Body().AppendNewBlock("provider", []string{"azurerm"}).Body()
body.AppendNewBlock("features", nil)
for k, v := range meta.providerConfig {
body.SetAttributeValue(k, v)
}
}
return string(f.Bytes())
}
Expand Down

0 comments on commit a332a31

Please sign in to comment.