Created
September 12, 2024 14:29
-
-
Save astromechza/4405fb7a71d75c2422b66cea372021e9 to your computer and use it in GitHub Desktop.
An example environment provisioner that reads a .env file in the working directory.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- uri: cmd://python3#dotenv | |
type: environment | |
args: | |
- -c | |
- | | |
import json | |
with open('.env') as f: | |
content = f.read().strip() | |
env_map = dict([x.split("=",1) for x in content.strip().splitlines()]) | |
print(json.dumps({"resource_outputs": env_map})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment