aws-greengrass-provisioner icon indicating copy to clipboard operation
aws-greengrass-provisioner copied to clipboard

Add variable substitution in topic names

Open janborch opened this issue 4 years ago • 1 comments

Certain variable substitution like ${AWS_IOT_THING_NAME} are already available in the outputTopics/inputTopics entries in the function config file and are very useful when you need to parametrize topics.

Would be great to have a feature to define my own substitution variables, for example in the main deployment config file that could be used in referenced function config files.

--> function.conf

...
outputTopics = 'event/${ORG}/sensor
...

--> deployment.config

...
subtEnv :{
ORG: 'acme'
}
...

or by passing substitution variables over the command line or environment variables java -jar bin/AwsGreengrassProvisioner.jar -g test-zebra -d deployments/morrison-zebra.conf --oem --env ORG:acme

or

export ORG=acme
java -jar bin/AwsGreengrassProvisioner.jar -g test-zebra -d deployments/morrison-zebra.conf --oem 

janborch avatar Oct 16 '20 12:10 janborch

Sorry I missed this. Would this still be useful when v2 support is added? If so, I'll add it there.

timmattison avatar Jan 22 '21 13:01 timmattison