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
Here's an example demonstating how to specify validations when defining your variables:
691
+
Here's an example demonstrating how to specify validations when defining your variables:
692
692
693
693
```yaml
694
694
variables:
@@ -1151,6 +1151,41 @@ variables:
1151
1151
1152
1152
With this variable, you can have a template file named `{{ .RootTerragruntFileName }}` which will generate a file named according to the value of RootTerragruntFileName.
1153
1153
1154
+
## Running tests
1155
+
1156
+
To run all tests:
1157
+
1158
+
```bash
1159
+
go test ./...
1160
+
```
1161
+
1162
+
This will run all tests except AWS-dependent integration tests, which are excluded by default since they require AWS credentials.
1163
+
1164
+
### Running AWS-dependent tests
1165
+
1166
+
Some integration tests require AWS credentials and are tagged with the `aws` build tag. These tests are also prefixed with `TestAWS` for easy targeting. To run these tests:
1167
+
1168
+
1. Set up AWS credentials (e.g., using AWS CLI or environment variables):
1169
+
1170
+
```bash
1171
+
export AWS_ACCESS_KEY_ID=your_access_key
1172
+
export AWS_SECRET_ACCESS_KEY=your_secret_key
1173
+
```
1174
+
1175
+
2. Run tests with the `aws` build tag enabled:
1176
+
1177
+
```bash
1178
+
go test -tags=aws ./...
1179
+
```
1180
+
1181
+
Or target AWS tests specifically by name:
1182
+
1183
+
```bash
1184
+
go test -tags=aws -run '^TestAWS' ./...
1185
+
```
1186
+
1187
+
These AWS tests validate Terragrunt configurations by running `terragrunt validate-all`, which requires valid AWS credentials to access AWS provider APIs.
1188
+
1154
1189
## Alternative project generators
1155
1190
1156
1191
Before creating Boilerplate, we tried a number of other project generators, but none of them met all of our
0 commit comments