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: README.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,14 +42,42 @@ The following environment variables can be configured:
42
42
* falls back to the default `AWS_ACCESS_KEY_ID` mock value
43
43
*`AWS_ACCESS_KEY_ID`: AWS Access Key ID to use for multi account setups (default: `test` -> account ID: `000000000000`)
44
44
*`SKIP_ALIASES`: Allows to skip generating AWS provider overrides for specified aliased providers, e.g. `SKIP_ALIASES=aws_secrets,real_aws`
45
+
*`ADDITIONAL_TF_OVERRIDE_LOCATIONS`: Comma-separated list of folder paths that will also receive a temporary `localstack_providers_override.tf` file
45
46
46
47
## Usage
47
48
48
49
The `tflocal` command has the same usage as the `terraform` command. For detailed usage,
49
50
please refer to the man pages of `terraform --help`.
50
51
52
+
### Validation errors when using local terraform modules
53
+
54
+
Note that if your project uses local terraform modules, and those modules reference providers, those folders *also* need to receive a temporary `localstack_providers_override.tf` file. Without it, you would get an error that looks like this when starting to process code from inside the module
55
+
56
+
```
57
+
╷
58
+
│ Error: No valid credential sources found
59
+
│
60
+
│ with module.lambda.provider["registry.terraform.io/hashicorp/aws"],
61
+
│ on ../../providers.tf line 11, in provider "aws":
62
+
│ 11: provider "aws" {
63
+
│
64
+
│ Please see https://registry.terraform.io/providers/hashicorp/aws
65
+
│ for more information about providing credentials.
66
+
│
67
+
│ Error: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, access disabled to EC2 IMDS via client option, or "AWS_EC2_METADATA_DISABLED" environment variable
68
+
```
69
+
70
+
To address this issue, you may include a comma-separated list of folder paths that will recieve additional override files via an environment variable
71
+
72
+
```
73
+
ADDITIONAL_TF_OVERRIDE_LOCATIONS=/path/to/module1,path/to/module2 tflocal plan
74
+
```
75
+
76
+
[See this issue for more discussion](https://github.com/localstack/terraform-local/issues/67)
77
+
51
78
## Change Log
52
79
80
+
* v0.21.0: Add ability to drop an override file in additional locations
0 commit comments