Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13951

Environment variable interpolation does not work with @_here_

$
0
0

I'm setting up hydra config for my python project and struggling a bit to get variable interpolation working in the following context.

Directory structure

├── config/│├── config.yaml│├── deployment.yaml││├── objects.yaml│└── environment│├── dev.yaml│└── prd.yaml

My config.yaml looks like this:

# config.yamldefaults:  - _self_  - deployment: objects

I want to set up my objects.yaml such that it inherits config from the environment group.

THIS WORKS

# objects.yamldefaults:  - _self_  - /environment/dev@_here_file: my-file 

THIS DOES NOT WORK

When I try and get dev from an env variable, it does not work.

defaults:  - _self_  - /environment/${oc.env:CLUSTER_TARGET}@_here_file: my-file 

This is the error I get

In 'deployment/objects': Could not load 'deployment/environment/dev'.


Viewing all articles
Browse latest Browse all 13951

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>