# How to load env from custom plugin?

**URL:** <https://forum.serverless.com/t/how-to-load-env-from-custom-plugin/21152>\
**Category:** Serverless Framework\
**Created:** [April 28, 2025, 3:48am UTC](https://forum.serverless.com/t/how-to-load-env-from-custom-plugin/21152 "2025-04-28T03:48:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zgid123](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/zgid123/32/8344_2.png) [@zgid123](https://forum.serverless.com/u/zgid123)\
**Post date:** [April 28, 2025, 3:48am UTC](https://forum.serverless.com/t/how-to-load-env-from-custom-plugin/21152/1 "2025-04-28T03:48:02Z")

</div>

Hi,

I have two Environment.yml files. Inside that, we have

```yaml
environment:
  ABC: "${env:ABC}"

```

When I use

```yaml
provider:
  environment: ${file(./Environment.yml):environment}

```

The env from yml will be loaded with the value. But now I need to combine multiple files, so I write a custom plugin to serve my purpose. I wonder how to load the env like method `file`? I read the documents, but still not find out how to do it with custom plugin.

Thanks.
