Skip to content

Commit

Permalink
update gcs sa location
Browse files Browse the repository at this point in the history
  • Loading branch information
cbini committed Jul 30, 2023
1 parent c1d367a commit 9a14b2c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"containerEnv": {
"PYTHONDONTWRITEBYTECODE": "1",
"USE_GKE_GCLOUD_AUTH_PLUGIN": "True",
"GOOGLE_APPLICATION_CREDENTIALS": "/workspaces/teamster/env/gcloud_service_account_json",
"GOOGLE_APPLICATION_CREDENTIALS": "/etc/secret-volume/gcloud_service_account_json",
"DBT_PROFILES_DIR": "/workspaces/teamster/src/dbt"
}
}
5 changes: 3 additions & 2 deletions .devcontainer/scripts/postCreate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ echo "${DBT_USER_CREDS}" |
sudo tee /etc/secret-volume/dbt_user_creds_json >/dev/null
echo "${DEANSLIST_API_KEY_MAP}" |
sudo tee /etc/secret-volume/deanslist_api_key_map_yaml >/dev/null
echo "${GCLOUD_SERVICE_ACCOUNT_KEY}" >env/gcloud_service_account_json
echo "${GCLOUD_SERVICE_ACCOUNT_KEY}" |
sudo tee /etc/secret-volume/gcloud_service_account_json >/dev/null

# update pip
python -m pip install --no-cache-dir --upgrade pip
Expand All @@ -34,7 +35,7 @@ sudo /usr/local/py-utils/bin/pdm self update
pdm install --no-lock

# authenticate gcloud
gcloud auth activate-service-account --key-file=env/gcloud_service_account_json
gcloud auth activate-service-account --key-file=/etc/secret-volume/gcloud_service_account_json

# set gcloud project & region
gcloud config set project teamster-332318
Expand Down
2 changes: 1 addition & 1 deletion tests/google/directory/test_resources_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def test_resource():
resources={
"directory": GoogleDirectoryResource(
customer_id="C029u7m0n",
service_account_file_path="env/gcloud_service_account_json",
service_account_file_path="/etc/secret-volume/gcloud_service_account_json",
delegated_account="dagster@apps.teamschools.org",
)
}
Expand Down
2 changes: 1 addition & 1 deletion tests/google/forms/test_resource_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def test_resource():
with build_resources(
resources={
"forms": GoogleFormsResource(
service_account_file_path="env/gcloud_service_account_json"
service_account_file_path="/etc/secret-volume/gcloud_service_account_json"
)
}
) as resources:
Expand Down
2 changes: 1 addition & 1 deletion tests/google/sheets/test_resources_sheets.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_gsheet_resource():
with build_resources(
resources={
"gsheets": GoogleSheetsResource(
service_account_file_path="env/gcloud_service_account_json"
service_account_file_path="/etc/secret-volume/gcloud_service_account_json"
)
}
) as resources:
Expand Down
2 changes: 1 addition & 1 deletion tests/google/sheets/test_sensors_sheets.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_sensor():
instance=instance,
resources={
"gsheets": GoogleSheetsResource(
service_account_file_path="env/gcloud_service_account_json"
service_account_file_path="/etc/secret-volume/gcloud_service_account_json"
)
},
)
Expand Down

0 comments on commit 9a14b2c

Please sign in to comment.