diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 374d6491af..476f9e3f6f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -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" } } diff --git a/.devcontainer/scripts/postCreate.sh b/.devcontainer/scripts/postCreate.sh index 2536a6bf74..1740fb78ec 100644 --- a/.devcontainer/scripts/postCreate.sh +++ b/.devcontainer/scripts/postCreate.sh @@ -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 @@ -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 diff --git a/tests/google/directory/test_resources_directory.py b/tests/google/directory/test_resources_directory.py index 205fc45486..e16a951b64 100644 --- a/tests/google/directory/test_resources_directory.py +++ b/tests/google/directory/test_resources_directory.py @@ -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", ) } diff --git a/tests/google/forms/test_resource_forms.py b/tests/google/forms/test_resource_forms.py index ce67eb4d56..f71c8b5227 100644 --- a/tests/google/forms/test_resource_forms.py +++ b/tests/google/forms/test_resource_forms.py @@ -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: diff --git a/tests/google/sheets/test_resources_sheets.py b/tests/google/sheets/test_resources_sheets.py index b38ae8625d..77f520ac00 100644 --- a/tests/google/sheets/test_resources_sheets.py +++ b/tests/google/sheets/test_resources_sheets.py @@ -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: diff --git a/tests/google/sheets/test_sensors_sheets.py b/tests/google/sheets/test_sensors_sheets.py index 340eb47677..4e4a27e826 100644 --- a/tests/google/sheets/test_sensors_sheets.py +++ b/tests/google/sheets/test_sensors_sheets.py @@ -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" ) }, )