Skip to content

Commit 39bc60f

Browse files
committed
CI: remove hard-coded GCP project id
1 parent b36c0f7 commit 39bc60f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ci/tasks/firewall-rules/configure-windows-firewall-rules.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ if [ "${CONFIGURE_GCP:-}" == "true" ]; then
1414
comma_separated_external_ips="${comma_separated_external_ips%,}"
1515

1616
set +x
17-
echo "${WINDOWS_STEMCELLS_GCP_CREDENTIALS_JSON}" | gcloud auth activate-service-account --key-file - --project cff-bosh-windows-stemcells
17+
gcp_project_name=$(echo "${WINDOWS_STEMCELLS_GCP_CREDENTIALS_JSON}" | jq -r '.project_id')
18+
echo "${WINDOWS_STEMCELLS_GCP_CREDENTIALS_JSON}" | gcloud auth activate-service-account --key-file - --project "${gcp_project_name}"
1819
set -x
19-
gcloud compute firewall-rules update default-allow-winrm --project cff-bosh-windows-stemcells --source-ranges="${comma_separated_external_ips}"
20+
gcloud compute firewall-rules update default-allow-winrm --project "${gcp_project_name}" --source-ranges="${comma_separated_external_ips}"
2021
fi
2122

2223
# Set firewall rules in the AWS project

0 commit comments

Comments
 (0)