Comments (2)
Yep you have the syntax correct, you can also do it in a single command like this:
VERSION=$VERSION AWS_REGION=$AWS_REGION AWS_ACCT_ID=$AWS_ACCT_ID yq -i '
.version = strenv(VERSION) |
.region = strenv(AWS_REGION) |
.accountId = strenv(AWS_ACCT_ID)
' deploy-config.yaml
from yq.
btw, the reason
VERSION=1
yq -i '.version = env(VERSION)' deploy-config.yaml
doesn't work is because you didn't export the variable. If you like, you can do:
export VERSION=1
yq -i '.version = env(VERSION)' deploy-config.yaml
from yq.
Related Issues (20)
- brew install yq@3: No available formula with the name "yq@3". Did you mean yq? HOT 2
- Unable to merge command output HOT 1
- yq --null-output produces two json documents instead of one HOT 2
- pathlogical behavior when stdout is redirected to /dev/null HOT 1
- Adding inline comments to filters for readability HOT 2
- make build build: command not found HOT 1
- TOML table arrays dropped when defined before parent object properties HOT 2
- Rejects empty TOML tables HOT 2
- first head_comment is removed from output HOT 2
- Make `--color` and `--prettyPrint` work together HOT 1
- tag uses object and not field HOT 1
- join(",") not working as expected HOT 2
- https://mikefarah.gitbook.io/yq/recipes#export-as-environment-variables-script-or-any-custom-format doesn't work HOT 1
- Option to format indices in generated properties HOT 2
- Error while parsing TOML file with an empty table HOT 1
- Unexpected output when deleting maps HOT 4
- Cannot get the merge alias of a map HOT 4
- CSV conversion to JSON splits string on : to become a subfield. HOT 2
- How to remove an entry matching a `name` key? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yq.