Skip to content

Commit

Permalink
Fix typo and remove unused field in OutputSQLDBInfo struct
Browse files Browse the repository at this point in the history
  • Loading branch information
yunkon-kim committed Nov 14, 2024
1 parent d075c1c commit 9640af4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/api/rest/handler/sql-db.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ func CreateInfracodeForSqlDb(c echo.Context) error {
req.TfVars.TerrariumID = trId
}

err = tofu.SavTfVarsToFile(req.TfVars, tfVarsPath)
err = tofu.SaveTfVarsToFile(req.TfVars, tfVarsPath)
if err != nil {
err2 := fmt.Errorf("failed to save tfVars to a file")
log.Error().Err(err).Msg(err2.Error())
Expand Down
1 change: 0 additions & 1 deletion pkg/api/rest/model/sql-db.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ type TfVarsSqlDb struct {
type OutputSQLDBInfo struct {
Terrarium Terrarium `json:"terrarium"`
SQLDBDetail SQLDBDetail `json:"sql_db_detail"`
Description string `json:"description"`
}

type Terrarium struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/tofu/tofu.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ func CopyFiles(sourceDir, destDir string) error {
return nil
}

func SavTfVarsToFile(tfVars interface{}, filePath string) error {
func SaveTfVarsToFile(tfVars interface{}, filePath string) error {
tfVarsBytes, err := json.MarshalIndent(tfVars, "", " ")
if err != nil {
return err
Expand Down

0 comments on commit 9640af4

Please sign in to comment.