diff --git a/command/file_runner.go b/command/file_runner.go index 05fabaf..c44ca68 100644 --- a/command/file_runner.go +++ b/command/file_runner.go @@ -31,7 +31,13 @@ func NewFileRunner(filename string, config *config.TfmigrateConfig, option *tfmi return nil, err } - option.IsBackendTerraformCloud = config.IsBackendTerraformCloud + if option != nil { + option.IsBackendTerraformCloud = config.IsBackendTerraformCloud + } else { + option = &tfmigrate.MigratorOption{ + IsBackendTerraformCloud: false, + } + } m, err := mc.Migrator.NewMigrator(option)