Resin env add adding service variable rather than device-wide -> is this by design?

resin-cli

#1

If I call the below against a multi-container device it ends up adding as a service variable rather than device-wide.
Is this by design and am I missing something?

resin env add --device $uuid something something

I did not find an obvious parameter to set against a specific service, which would also be fine.
https://docs.resin.io/reference/cli/#config-read


#4

@WillFG currently the CLI does not support assigning environment variables to services just yet. You can track this progress of this here: https://github.com/resin-io/resin-cli/issues/855

Alternatively, you can use our SDK to do this, using the method documented here: https://github.com/resin-io/resin-sdk/blob/master/DOCUMENTATION.md#resin.models.service.var.set


#6

Hi Cameron, sorry my question probably was not clear.

The issue I am having is that it is assigning it to a service rather than device wide, which is what I want.

From issue 855 it sounds like it has not been nailed down quite for multi-container apps, so I expect this is a side effect of that.


#8

@CameronDiver I’ve just read the CLI documentation again and it is indeed mentioned: “At the moment the CLI doesn’t fully support multi-container applications, so the following commands will only set service variables for the first service in your application.” so that clears it up.