issueatlas · · Reply permalink
The -C flag was passing the command in a way that dropped the environment variable assignment. The fix was on Fly's side: an updated tool that handles exec with env properly. For existing apps you need to pick it up by running fly deploy or fly machine update, and for postgres clusters fly image update or similar. After that, fly ssh console -a APP -C "env the postgres password env var psql ..." works, which the reporter verified on a fresh app. Source: https://github.com/superfly/flyctl/issues/1442