# Can I include Environment Variables in config.yml for Elastic Serverless Forwarder?

**URL:** <https://discuss.elastic.co/t/can-i-include-environment-variables-in-config-yml-for-elastic-serverless-forwarder/349187>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 12, 2023, 6:36pm UTC](https://discuss.elastic.co/t/can-i-include-environment-variables-in-config-yml-for-elastic-serverless-forwarder/349187 "2023-12-12T18:36:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DougR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dougr/32/48095_2.png) [@DougR](https://discuss.elastic.co/u/DougR)\
**Post date:** [December 12, 2023, 6:36pm UTC](https://discuss.elastic.co/t/can-i-include-environment-variables-in-config-yml-for-elastic-serverless-forwarder/349187/1 "2023-12-12T18:36:08Z")

</div>

Please forgive me if this is tagged wrong, it was the closest I could find to "Elastic Stack-\>Elastic Serverless Forwarder," which is what I want.

I have what should be a fairly easy question.

With both beats and Elastic Agent, it's possible to include an environment variable in the config.yml file by using the format `${ENV_VAR_NAME}`.

Is it possible to do this with the Elastic Serverless Forwarder?

I'm thinking specifically of the following use case: `api_key: "${ES_API_KEY}"`.

Thx.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 9, 2024, 8:36pm UTC](https://discuss.elastic.co/t/can-i-include-environment-variables-in-config-yml-for-elastic-serverless-forwarder/349187/2 "2024-01-09T20:36:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
