Closed jpmeijers closed 1 year ago
If I use a different Application ID as env var, than provided on the command line, I get this error:
$ export TTNV3_APP_ID="rugged-edge"
$ ttn-lw-migrate application --source ttnv3 "jpm-rak10701" --dry-run
Error: error:go.thethings.network/lorawan-stack-migrate/cmd:export (export device `eui-db72be9c06fa6328`)
error:go.thethings.network/lorawan-stack-migrate/cmd:export (export device `eui-db72be9c06fa6328`)
device_id=eui-db72be9c06fa6328
correlation_id=25f6d13f18f048cfb694279072e31423
--- error:pkg/identityserver/store:end_device_not_found (end device with id `eui-db72be9c06fa6328` not found in application with id `rugged-edge`)
application_id=rugged-edge
device_id=eui-db72be9c06fa6328
correlation_id=42b3451016dc40379f9cc32866fc6f1d
Summary
If I want to migrate devices from TTS, I need to set the application ID both as an environment variable as well as provide it on the command line as an argument. This duplication feels redundant, and makes using the migration tool more difficult. It would be better if the environment variable is not required.
Why do we need this?
Make using the tool easier.
What is already there? What do you see now?
Application ID both as a environment variable, as well as command line argument.
What is missing? What do you want to see?
Less duplication
Environment
How do you propose to implement this?
Only use the application ID provided as a command line argument.
How do you propose to test this?
...
Can you do this yourself and submit a Pull Request?
...