-- how to translate this coded `resources` which i...
# ask-community
p
-- how to translate this coded
resources
which is using
EnvVar
https://docs.dagster.io/guides/dagster/using-environment-variables-and-secrets#example-1-per-environment-configuration • to loading from YAML (so that the config file can be switched easily, w/o changing the code) • but still with envvar expansion from
.env
file? before I go with a custom approach like dependency-injector support for loading yaml-configs with envvars expansion
y
in yaml, you can specify it as:
Copy code
resources:
  resource_key_name:
    config:
      env: ENVIRONMENT_VARIABLE_NAME
https://docs.dagster.io/guides/dagster/using-environment-variables-and-secrets#in-yaml-or-config-dictionaries
and then in your
.env
file, you’d specify as:
Copy code
ENVIRONMENT_VARIABLE_NAME=...
D 1