File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
mmv1/templates/terraform/samples/base_configs Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1717
1818package {{ $ .Res.PackageName }}_test
1919
20+ {{ $needsPlancheck := false }}
21+ {{ range $s := $ .Res.TestSamples }}
22+ {{ if gt (len $s .TestSteps ) 1 }}
23+ {{ $needsPlancheck = true }}
24+ {{ end }}
25+ {{ end }}
26+
2027import (
2128 " fmt"
2229 " log"
@@ -26,8 +33,8 @@ import (
2633 " time"
2734
2835 " github.com/hashicorp/terraform-plugin-testing/helper/resource"
29- " github.com/hashicorp/terraform-plugin-testing/plancheck"
30- " github.com/hashicorp/terraform-plugin-testing/terraform"
36+ {{ if $needsPlancheck }} " github.com/hashicorp/terraform-plugin-testing/plancheck"
37+ {{ end }} " github.com/hashicorp/terraform-plugin-testing/terraform"
3138
3239 " {{ $.ImportPath }}/acctest"
3340 " {{ $.ImportPath }}/envvar"
You can’t perform that action at this time.
0 commit comments