You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/data-sources/env_ensure.md
+24-5
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,10 @@ description: |-
6
6
Ensures that a given environment variable is set to a non-empty value.
7
7
If the environment variable is unset or if it is set to an empty string,
8
8
it will trigger a Terraform-level error.
9
+
Not every Terraform provider checks to ensure that the environment variables it
10
+
requires are properly set before performing work, leading to late-stage errors.
11
+
This will force an error to occur early in the execution if the environment
12
+
variable is not set, or if its value doesn't match the expected patttern.
9
13
Maps to the corefunc.EnvEnsure() https://pkg.go.dev/github.com/northwood-labs/terraform-provider-corefunc/corefunc#EnvEnsure Go method, which can be used in
10
14
Terratest https://terratest.gruntwork.io.
11
15
---
@@ -17,6 +21,11 @@ Ensures that a given environment variable is set to a non-empty value.
17
21
If the environment variable is unset or if it is set to an empty string,
18
22
it will trigger a Terraform-level error.
19
23
24
+
Not every Terraform provider checks to ensure that the environment variables it
25
+
requires are properly set before performing work, leading to late-stage errors.
26
+
This will force an error to occur early in the execution if the environment
27
+
variable is not set, or if its value doesn't match the expected patttern.
28
+
20
29
Maps to the [`corefunc.EnvEnsure()`](https://pkg.go.dev/github.com/northwood-labs/terraform-provider-corefunc/corefunc#EnvEnsure) Go method, which can be used in
21
30
[Terratest](https://terratest.gruntwork.io).
22
31
@@ -45,13 +54,19 @@ data "corefunc_env_ensure" "aws_pager" {
45
54
name = "AWS_PAGER"
46
55
}
47
56
48
-
# `aws_pager_value` is the read-only attribute containing the value of the
49
-
# environment variable
50
-
output "aws_pager_value" {
51
-
value = data.corefunc_env_ensure.aws_pager.value
57
+
#=> [Error] Problem with Environment Variable: environment variable
0 commit comments