Skip to content

Commit c735a3f

Browse files
fix: add required variables to terraform test configuration
The test was failing because required variables `prefix` and `environment` were not being provided in the Terraform options. Added these variables to fix the "No value for required variable" errors. Co-authored-by: Brian - oozou <lycbrian@users.noreply.github.com>
1 parent 030a78e commit c735a3f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/terraform_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ func TestTerraformAWSElastiCacheModule(t *testing.T) {
5757
EnvVars: map[string]string{
5858
"AWS_DEFAULT_REGION": awsRegion,
5959
},
60+
61+
// Variables to pass to our Terraform code using -var options
62+
Vars: map[string]interface{}{
63+
"prefix": "example",
64+
"environment": "example",
65+
},
6066
})
6167

6268
// At the end of the test, run `terraform destroy` to clean up any resources that were created

0 commit comments

Comments
 (0)