Skip to content

Commit

Permalink
fix(gce): fix camel case naming for service_account
Browse files Browse the repository at this point in the history
Fixes: GH # 428
  • Loading branch information
a-dubs committed Sep 25, 2024
1 parent c468a92 commit 2c78910
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1!9.3.2
1!9.3.3
8 changes: 5 additions & 3 deletions pycloudlib/gce/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,10 @@ def __init__(
self.instance_counter = count()
# Prefer service_account_email from pycloudlib.toml and fallback to
# the credentials listed in GOOGLE_APPLICATION_CREDENTIALS otherwise
self.service_account_email = service_account_email or self.config.get(
"service_account_email", credentials.service_account_email
self.service_account_email = (
service_account_email
or self.config.get("service_account_email")
or getattr(credentials, "service_account_email", None)
)

def released_image(
Expand Down Expand Up @@ -430,7 +432,7 @@ def launch(
config.update(kwargs)

if self.service_account_email:
config["serviceAccounts"] = [{"email": self.service_account_email}]
config["service_accounts"] = [{"email": self.service_account_email}]

if user_data:
user_metadata = {"key": "user-data", "value": user_data}
Expand Down

0 comments on commit 2c78910

Please sign in to comment.