diff --git a/.k8s/1password/items.yaml b/.k8s/1password/items.yaml index 528af3bf36..20e00c52ce 100644 --- a/.k8s/1password/items.yaml +++ b/.k8s/1password/items.yaml @@ -350,3 +350,11 @@ metadata: namespace: dagster-cloud spec: itemPath: vaults/Data Team/items/Overgrad API - Camden +--- +apiVersion: onepassword.com/v1 +kind: OnePasswordItem +metadata: + name: op-slack-api + namespace: dagster-cloud +spec: + itemPath: vaults/Data Team/items/Slack API - Teamster diff --git a/src/teamster/code_locations/kipptaf/dagster-cloud.yaml b/src/teamster/code_locations/kipptaf/dagster-cloud.yaml index 15985663bc..916d70178f 100644 --- a/src/teamster/code_locations/kipptaf/dagster-cloud.yaml +++ b/src/teamster/code_locations/kipptaf/dagster-cloud.yaml @@ -709,3 +709,8 @@ locations: secretKeyRef: name: op-overgrad-api-kippnewark key: credential + - name: SLACK_TOKEN + valueFrom: + secretKeyRef: + name: op-slack-api + key: credential diff --git a/src/teamster/code_locations/kipptaf/definitions.py b/src/teamster/code_locations/kipptaf/definitions.py index 1cd3ad5f44..87b79ee1bd 100644 --- a/src/teamster/code_locations/kipptaf/definitions.py +++ b/src/teamster/code_locations/kipptaf/definitions.py @@ -32,6 +32,7 @@ BIGQUERY_RESOURCE, GCS_RESOURCE, OVERGRAD_RESOURCE, + SLACK_RESOURCE, SSH_COUCHDROP, get_dbt_cli_resource, get_io_manager_gcs_avro, @@ -110,6 +111,7 @@ "overgrad": OVERGRAD_RESOURCE, "ps_enrollment": resources.POWERSCHOOL_ENROLLMENT_RESOURCE, "schoolmint_grow": resources.SCHOOLMINT_GROW_RESOURCE, + "slack": SLACK_RESOURCE, "smartrecruiters": resources.SMARTRECRUITERS_RESOURCE, "ssh_adp_workforce_now": resources.SSH_RESOURCE_ADP_WORKFORCE_NOW, "ssh_clever": resources.SSH_RESOURCE_CLEVER, diff --git a/src/teamster/core/resources.py b/src/teamster/core/resources.py index 1b8946ade2..860e02f1c2 100644 --- a/src/teamster/core/resources.py +++ b/src/teamster/core/resources.py @@ -1,6 +1,7 @@ from dagster import EnvVar from dagster_dbt import DbtCliResource from dagster_gcp import BigQueryResource, GCSResource +from dagster_slack import SlackResource from teamster import GCS_PROJECT_NAME from teamster.core.io_managers.gcs import GCSIOManager @@ -28,6 +29,8 @@ OVERGRAD_RESOURCE = OvergradResource(api_key=EnvVar("OVERGRAD_API_KEY"), page_limit=100) +SLACK_RESOURCE = SlackResource(token=EnvVar("SLACK_TOKEN")) + SSH_COUCHDROP = SSHResource( remote_host=EnvVar("COUCHDROP_SFTP_HOST"), username=EnvVar("COUCHDROP_SFTP_USERNAME"),