Skip to content

Commit

Permalink
Change config file extension to .tf.json
Browse files Browse the repository at this point in the history
  • Loading branch information
kachawla committed May 9, 2023
1 parent 161b71e commit 1abf860
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/recipes/driver/terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ func (d *terraformDriver) generateJsonConfig(ctx context.Context, workingDir, re
}

// Write the JSON data to a file in the working directory
configFilePath := fmt.Sprintf("%s/main.json", workingDir)
// JSON configuration syntax for Terraform requires the file to be named with .tf.json suffix.
// https://developer.hashicorp.com/terraform/language/syntax/json
configFilePath := fmt.Sprintf("%s/main.tf.json", workingDir)
file, err := os.Create(configFilePath)
if err != nil {
return fmt.Errorf("Error creating file: %w", err)
Expand Down

0 comments on commit 1abf860

Please sign in to comment.