Variables in module.json
See original GitHub issueExpected Behavior
Variables should be substituted in both deployment.template.json and module.json
Current Behavior
I can set variables in .env that are used in deployment.template.json but these aren’t populated in module.json file.
We use different environments for dev and prod and hence different container registrys as well. Currently there doesn’t seem to be a way to use variables in module.json, specifically the repository value. It’d be great to use $CONTAINER_REGISTRY_SERVER
in module.json as well as deployment.template.json
Similar to this, an ability for a CI system (e.g. VSTS) to set the tag version in module.json for CI/CD
e.g. module.json could look like
{
"$schema-version": "0.0.1",
"description": "",
"image": {
"repository": "$CONTAINER_REGISTRY_SERVER/myiotmodule",
"tag": {
"version": "$TAG_VERSION",
"platforms": {
"linuxx64": "./Dockerfile"
}
}
},
"language": "csharp"
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
How to refer to variables in a JSON configuration file
Is it possible to use variables within the json file example “security_groups”: “module.nsg.security_groups.id” When I try, it just passes ...
Read more >Using Variables from Python Script when Importing JSON
The contents of the JSON file don't make sense. The value of report is a string that looks like a Python literal. But...
Read more >JSON Module
The json variable provides methods to access fields in json objects and indexes in json arrays. 1.4.1.1. Variable lifetime. The json variables will...
Read more >Save and load Python data with JSON
Reading data from a JSON file ... This function implements the inverse, more or less, of saving the file: an arbitrary variable (f)...
Read more >Python Tutorial: Working with JSON Data using the json Module
In this Python Programming Tutorial, we will be learning how to work with JSON data. We will learn how to load JSON into...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
Top Related Hashnode Post
No results found
Top GitHub Comments
Some formal docs on module.json would be nice. Might expose the various consistency issues too. I too was stumped by this and was just about to go down the path of ditching the use of module.json and iotedgedev.
@adashen to share the schema of module.json