ff3dbe1ea9
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=131
34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
From 4571116a54ff51683cb695ce795f04f8b318b440 Mon Sep 17 00:00:00 2001
|
|
From: jgleissner <jgleissner@suse.com>
|
|
Date: Wed, 19 Sep 2018 14:37:12 +0200
|
|
Subject: [PATCH] Support use of GCE instance credentials (#109)
|
|
|
|
* Integration of MSI authentication with azurearm cloud driver (#105)
|
|
|
|
* allow empty service_account_private_key in GCE driver
|
|
|
|
Passing an emoty service_account_private_key to libcloud will enable
|
|
authentication using instance credentials, which is used by CaaSP in GCE.
|
|
---
|
|
salt/cloud/clouds/gce.py | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/salt/cloud/clouds/gce.py b/salt/cloud/clouds/gce.py
|
|
index 75109491be..1018e36ed5 100644
|
|
--- a/salt/cloud/clouds/gce.py
|
|
+++ b/salt/cloud/clouds/gce.py
|
|
@@ -134,7 +134,8 @@ def __virtual__():
|
|
|
|
parameters = details['gce']
|
|
pathname = os.path.expanduser(parameters['service_account_private_key'])
|
|
- if salt.utils.cloud.check_key_path_and_mode(
|
|
+ # empty pathname will tell libcloud to use instance credentials
|
|
+ if pathname and salt.utils.cloud.check_key_path_and_mode(
|
|
provider, pathname
|
|
) is False:
|
|
return False
|
|
--
|
|
2.17.1
|
|
|
|
|