diff --git a/pkg/api/rest/handler/sql-db.go b/pkg/api/rest/handler/sql-db.go index b430dbd..cf57f26 100644 --- a/pkg/api/rest/handler/sql-db.go +++ b/pkg/api/rest/handler/sql-db.go @@ -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()) diff --git a/pkg/api/rest/model/sql-db.go b/pkg/api/rest/model/sql-db.go index cb4e648..b13893c 100644 --- a/pkg/api/rest/model/sql-db.go +++ b/pkg/api/rest/model/sql-db.go @@ -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 { diff --git a/pkg/tofu/tofu.go b/pkg/tofu/tofu.go index ef1ae2f..39ebb12 100644 --- a/pkg/tofu/tofu.go +++ b/pkg/tofu/tofu.go @@ -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