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
#bridgecrew:skip=BC_AWS_NETWORKING_48: Skiping `Ensure all EIP addresses allocated to a VPC are attached to EC2 instances` because it is incorrectly flagging that this instance does not belong to a VPC even though subnet_id is configured.
// Verify we're getting back the outputs we expect
150
148
assert.Contains(t, securityGroupARN, "arn:aws:ec2", "SG ID should contains substring 'arn:aws:ec2'")
151
149
}
150
+
151
+
// Test the Terraform module in examples/complete using Terratest.
152
+
funcTestDisabled(t*testing.T) {
153
+
rand.Seed(time.Now().UnixNano())
154
+
155
+
randId:=strconv.Itoa(rand.Intn(100000))
156
+
attributes:= []string{randId}
157
+
158
+
terraformOptions:=&terraform.Options{
159
+
// The path to where our Terraform code is located
160
+
TerraformDir: "../../examples/complete",
161
+
Upgrade: true,
162
+
// Variables to pass to our Terraform code using -var-file options
163
+
VarFiles: []string{"fixtures.us-east-2.tfvars"},
164
+
Vars: map[string]interface{}{
165
+
"attributes": attributes,
166
+
"enabled": "false",
167
+
},
168
+
}
169
+
170
+
// At the end of the test, run `terraform destroy` to clean up any resources that were created
171
+
deferterraform.Destroy(t, terraformOptions)
172
+
173
+
terraform.Init(t, terraformOptions)
174
+
plan:=terraform.Plan(t, terraformOptions)
175
+
planContainsNoChanges:=strings.Contains(plan, "No changes.") ||strings.Contains(plan, "0 to add, 0 to change, 0 to destroy.") ||!strings.Contains(plan, "Plan")
0 commit comments