We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80c51bf commit 3a254efCopy full SHA for 3a254ef
devops/terraform/variables.tf
@@ -0,0 +1,7 @@
1
+# SOURCE: https://stackoverflow.com/a/76194380/15454191
2
+locals {
3
+ dot_env_file_path = "./.env"
4
+ dot_env_regex = "(?m:^\\s*([^#\\s]\\S*)\\s*=\\s*[\"']?(.*[^\"'\\s])[\"']?\\s*$)"
5
+ dot_env = { for tuple in regexall(local.dot_env_regex, file(local.dot_env_file_path)) : tuple[0] => sensitive(tuple[1]) }
6
+ api_token = local.dot_env["API_TOKEN"]
7
+}
0 commit comments