I want to be able to set specific tags to the log groups created through this plugin based on annotations and labels but at least based on environment variables of the fluentd pod / container.
Steps to replicate
These are different variations i have tried achieving this:
Problem
I want to be able to set specific tags to the log groups created through this plugin based on annotations and labels but at least based on environment variables of the fluentd pod / container.
Steps to replicate
These are different variations i have tried achieving this:
log_group_aws_tags '{"Key": #{ENV["DEFAULT_KEY"]} }'
log_group_aws_tags %({"Key": "#{ENV['DEFAULT_KEY']}"})
log_group_aws_tags "{'Key': '${ENV['DEFAULT_KEY}']'}"
log_group_aws_tags "{'Key': '${ENV[\'DEFAULT_KEY}\']'}"
log_group_aws_tags "{'Key': '${ENV.DEFAULT_KEY}'}"
log_group_aws_tags "{'Key': '${ENV['DEFAULT_KEY']}'}"
I made sure, the following works - and it did.
log_group_aws_tags "{'Key': 'Value'}"
Expected Behavior or What you need to ask
I wanted to see the new log group created with the value of the environment variable.
Using Fluentd and CloudWatchLogs plugin versions
fluentd 1.16.3
Dependent gem versions
fluent-gem list
,td-agent-gem list
or your Gemfile.lock