Skip to content

Commit 1c5064c

Browse files
authored
fix: Specify project during Cloud Run provision (#17965)
1 parent 5d6e0c6 commit 1c5064c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/prefect/infrastructure/provisioners/cloud_run.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ async def _create_service_account(self):
133133
await self._run_command(
134134
f"gcloud iam service-accounts create {self._service_account_name}"
135135
' --display-name "Prefect Cloud Run Service Account"'
136+
f" --project={self._project}"
136137
)
137138
except subprocess.CalledProcessError as e:
138139
if "already exists" not in e.output.decode("utf-8"):

tests/infrastructure/provisioners/test_cloud_run_v2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ async def test_provision(mock_run_process, prefect_client: PrefectClient):
281281
),
282282
(
283283
"gcloud iam service-accounts create prefect-cloud-run --display-name"
284-
" 'Prefect Cloud Run Service Account'"
284+
" 'Prefect Cloud Run Service Account' --project=test-project"
285285
),
286286
(
287287
"gcloud projects add-iam-policy-binding test-project"

0 commit comments

Comments
 (0)