ExtractElasticBeanstalkAppEnvironment

nicolaw 14th January 2019 at 2:37pm
AWS jq JSON
jq -r '."AWS::ElasticBeanstalk::Ext"."_ContainerConfigFileContent".optionsettings."aws:elasticbeanstalk:application:environment"[]|select(contains("DYNATRACE_"))|split("=")|[.[0], @sh "\(.[1])"]|join("=")' /var/lib/cfn-init/data/metadata.json
DYNATRACE_TENANT='dfhs8976'
DYNATRACE_TOKEN='hfe98n74n3v687nynw5envwynvreoyitretlywtv908547ycn5pcnpw45'