tfe-tfc-migration-tool icon indicating copy to clipboard operation
tfe-tfc-migration-tool copied to clipboard

Is it possible to perform migration if SSH keys are not defined?

Open mslosarz opened this issue 1 year ago • 0 comments

I'm trying to perform migration where source and destination organization doesn't nave SSH keys defined. Is it possible to perform migration without ssh keys? Is there any flag where I can define scope of migration?

Current migration result is:

INFO:SSHKeysWorker:Migrating SSH keys...
Traceback (most recent call last):
  File "migration.py", line 97, in <module>
    main(migrator, args.delete_all, args.no_confirmation, args.migrate_all_state, args.migrate_sensitive_data, args.migrate_select_items, TFE_VERIFY_SOURCE)
  File "migration.py", line 37, in main
    migrator.do_migration(migrate_all_state, migrate_select_items, tfe_verify_source)
  File "/home/slusi/Development/ops-test/tfe-tfc-migration-tool/tfc_migrate/migrator.py", line 87, in do_migration
    ssh_keys_map, ssh_key_name_map, ssh_key_to_file_path_map = self.ssh_keys.migrate()
  File "/home/slusi/Development/ops-test/tfe-tfc-migration-tool/tfc_migrate/ssh_keys.py", line 62, in migrate
    new_ssh_key = self._api_target.ssh_keys.create(new_ssh_key_payload)["data"]
  File "/home/linuxbrew/.linuxbrew/Cellar/python/3.7.6_1/lib/python3.7/site-packages/terrasnek/ssh_keys.py", line 37, in create
    return self._create(self._org_api_v2_base_url, payload)
  File "/home/linuxbrew/.linuxbrew/Cellar/python/3.7.6_1/lib/python3.7/site-packages/terrasnek/endpoint.py", line 323, in _create
    return self._post(url, data=payload)
  File "/home/linuxbrew/.linuxbrew/Cellar/python/3.7.6_1/lib/python3.7/site-packages/terrasnek/endpoint.py", line 256, in _post
    raise TFCHTTPNotFound(err)
terrasnek.exceptions.TFCHTTPNotFound: {'errors': [{'status': '404', 'title': 'not found'}]}

mslosarz avatar Jul 27 '22 10:07 mslosarz