-
Notifications
You must be signed in to change notification settings - Fork 197
Closed
Labels
Team:Elastic-Agent-Control-PlaneLabel for the Agent Control Plane teamLabel for the Agent Control Plane teamdocumentationImprovements or additions to documentationImprovements or additions to documentation
Description
With #2261 if a customer provides an env var that doesn't exist, the input does not get included in the rendered configuration. This is a fantastic feature.
What would be really great is if we offered an alternative syntax for the env provider which made the env var optional during rendering:
${env.foo?}
${env.?foo}
${?env.foo}
$?{env.foo}
${optional.env.foo}
If the optional env var is not available, it would be lovely if only that setting didn't render. For example in the fleet policy
hosts:
- ${env.mysql}
interval: ${optional.env.mysql_interval}
if mysql exists but mysql_interval does not, agent would render
hosts:
- ${env.mysql}
Metadata
Metadata
Assignees
Labels
Team:Elastic-Agent-Control-PlaneLabel for the Agent Control Plane teamLabel for the Agent Control Plane teamdocumentationImprovements or additions to documentationImprovements or additions to documentation