Skip to content

Error executing ftmigrate on MacOS 14.0 (ARM) #168

@CommanderK5

Description

@CommanderK5

Hey Folks!

When attempting to use ftmigrate i get the following error:

2024/02/07 16:03:28 [DEBUG] [main] start: tfmigrate apply
2024/02/07 16:03:28 [DEBUG] [main] tfmigrate version: 0.3.20
2024/02/07 16:03:28 [DEBUG] [command] load configuration file: .tfmigrate.hcl
2024/02/07 16:03:28 [DEBUG] [command] config: &config.TfmigrateConfig{MigrationDir:".", IsBackendTerraformCloud:false, History:(*history.Config)(0x14000032bc0)}
2024/02/07 16:03:28 [DEBUG] [command] option: &tfmigrate.MigratorOption{ExecPath:"", PlanOut:"", IsBackendTerraformCloud:false, BackendConfig:[]string(nil)}
2024/02/07 16:03:28 [DEBUG] [history] load migration dir: .
2024/02/07 16:03:28 [DEBUG] [history] load history
2024/02/07 16:03:28 [DEBUG] [history] read storage &local.Storage{config:(*local.Config)(0x1400021f4d0)}
2024/02/07 16:03:28 [TRACE] [history] read history file: []byte{}
2024/02/07 16:03:28 [DEBUG] [history] new empty history
2024/02/07 16:03:28 [INFO] [runner] unapplied migration files: [platform.hcl]
2024/02/07 16:03:28 [INFO] [runner] load migration file: platform.hcl
2024/02/07 16:03:28 [INFO] [migrator] start multi state migrator plan phase for apply
2024/02/07 16:03:28 [DEBUG] [executor@./state/vpc.tfstate.json]$ terraform version
2024/02/07 16:03:28 [TRACE] [executor@./state/vpc.tfstate.json] cmd=(*tfexec.command)(0x14000125848)({
 osExecCmd: (*exec.Cmd)(0x140001462c0)(/opt/homebrew/bin/terraform version),
 stdout: (*bytes.Buffer)(0x140001766c0)(),
 stderr: (*bytes.Buffer)(0x140001766f0)()
})
 
2024/02/07 16:03:28 [DEBUG] [executor@./state/vpc.tfstate.json] failed to run command: (*fs.PathError)(0x14000176720)(fork/exec /opt/homebrew/bin/terraform: not a directory)
2024/02/07 16:03:28 [ERROR] [runner] failed to apply: platform.hcl
2024/02/07 16:03:28 [DEBUG] [runner] length of history records: beforeLen = 0, afterLen = 0
fork/exec /opt/homebrew/bin/terraform: not a directory

Terraform version: 1.6.6
Macos: 14.0
tfmigrate: 0.3.20

I've tried docker-compose sandbox and got the exact same error. Maybe I'm missing something here.

2024/02/07 15:00:22 [INFO] [runner] unapplied migration files: [platform.hcl]
2024/02/07 15:00:22 [INFO] [runner] load migration file: platform.hcl
2024/02/07 15:00:22 [INFO] [migrator] start multi state migrator plan phase for apply
2024/02/07 15:00:22 [ERROR] [runner] failed to apply: platform.hcl
fork/exec /usr/local/bin/terraform: not a directory

I've tried to set different values for TFMIGRATE_EXEC_PATH but no joy so far.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions