Skip to content

Commit

Permalink
Merge pull request #109 from yunkon-kim/241114-21
Browse files Browse the repository at this point in the history
Fix typo and remove unused field in OutputSQLDBInfo struct
  • Loading branch information
yunkon-kim authored Nov 14, 2024
2 parents d075c1c + 9640af4 commit f82a9de
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 f82a9de

Please sign in to comment.