gcloudUserLogin method

Future<bool> gcloudUserLogin()

Login to gcloud with a user account, even when Oracular is configured with a service-account key for application credentials.

This is used only for IAM grant escalation, where a human project Owner may need to grant roles to the generated service account. The normal gcloudLogin path intentionally activates the configured service account when one exists.

Implementation

Future<bool> gcloudUserLogin() async {
  info('Signing in to Google Cloud with a user account...');
  final int result = await _runner.runStreaming('gcloud', <String>[
    'auth',
    'login',
    '--update-adc',
  ]);
  return result == 0;
}