@@ -23,7 +23,7 @@ PreCheck: func() { testAccPreCheck(t, "{{.test_type}}", "{{$.class_version}}") }
2323 Steps: []resource.TestStep {
2424 // Create with minimum config and verify default APIC values
2525 {
26- Config: testConfig{{$ .resourceClassName }}Min{{if .class_name }}DependencyWith{{capitalize .class_name }}{{end }}AllowExisting{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
26+ Config: testConfig{{$ .resourceClassName }}Min{{if .class_name }}DependencyWith{{capitalize .class_name }}{{end }}AllowExisting + testConfigDataSourceSystem,
2727 ExpectNonEmptyPlan: {{.class_in_parent }},
2828 Check: resource.ComposeAggregateTestCheckFunc (
2929 {{- range $key , $value := $ .resource_required }}{{$contains := definedInMap $key $ .default }}
@@ -89,7 +89,7 @@ PreCheck: func() { testAccPreCheck(t, "{{.test_type}}", "{{$.class_version}}") }
8989 Steps: []resource.TestStep {
9090 // Create with minimum config and verify default APIC values
9191 {
92- Config: testConfig{{$ .resourceClassName }}Min{{if .class_name }}DependencyWith{{capitalize .class_name }}{{end }}AllowExisting{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
92+ Config: testConfig{{$ .resourceClassName }}Min{{if .class_name }}DependencyWith{{capitalize .class_name }}{{end }}AllowExisting + testConfigDataSourceSystem,
9393 ExpectError: regexp.MustCompile (" Object Already Exists" ),
9494 },
9595 },
@@ -102,7 +102,7 @@ PreCheck: func() { testAccPreCheck(t, "{{.test_type}}", "{{$.class_version}}") }
102102 Steps: []resource.TestStep {
103103 // Create with minimum config and verify default APIC values
104104 {
105- Config: testConfig{{$ .resourceClassName }}Min{{if .class_name }}DependencyWith{{capitalize .class_name }}{{end }}AllowExisting{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
105+ Config: testConfig{{$ .resourceClassName }}Min{{if .class_name }}DependencyWith{{capitalize .class_name }}{{end }}AllowExisting + testConfigDataSourceSystem,
106106 ExpectNonEmptyPlan: {{.class_in_parent }},
107107 Check: resource.ComposeAggregateTestCheckFunc (
108108 {{- range $key , $value := $ .resource_required }}{{$contains := definedInMap $key $ .default }}
@@ -168,7 +168,7 @@ PreCheck: func() { testAccPreCheck(t, "{{.test_type}}", "{{$.class_version}}") }
168168 Steps: []resource.TestStep {
169169 // Create with minimum config and verify default APIC values
170170 {
171- Config: testConfig{{$ .resourceClassName }}Min{{if .class_name }}DependencyWith{{capitalize .class_name }}{{end }}{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
171+ Config: testConfig{{$ .resourceClassName }}Min{{if .class_name }}DependencyWith{{capitalize .class_name }}{{end }} + testConfigDataSourceSystem,
172172 ExpectNonEmptyPlan: {{.class_in_parent }},
173173 Check: resource.ComposeAggregateTestCheckFunc (
174174 {{- range $key , $value := $ .resource_required }}{{$contains := definedInMap $key $ .default }}
@@ -218,7 +218,7 @@ PreCheck: func() { testAccPreCheck(t, "{{.test_type}}", "{{$.class_version}}") }
218218 },
219219 // Update with all config and verify default APIC values
220220 {
221- Config: testConfig{{$ .resourceClassName }}All{{ if .class_name }}DependencyWith{{capitalize .class_name }}{{end }}{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
221+ Config: testConfig{{$ .resourceClassName }}All{{ if .class_name }}DependencyWith{{capitalize .class_name }}{{end }} + testConfigDataSourceSystem,
222222 ExpectNonEmptyPlan: {{.class_in_parent }},
223223 Check: resource.ComposeAggregateTestCheckFunc (
224224 {{- range $key , $value := $ .resource_required }}{{$contains := definedInMap $key $ .all }}
@@ -268,7 +268,7 @@ PreCheck: func() { testAccPreCheck(t, "{{.test_type}}", "{{$.class_version}}") }
268268 },
269269 // Update with minimum config and verify config is unchanged
270270 {
271- Config: testConfig{{$ .resourceClassName }}Min{{if .class_name }}DependencyWith{{capitalize .class_name }}{{end }}{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
271+ Config: testConfig{{$ .resourceClassName }}Min{{if .class_name }}DependencyWith{{capitalize .class_name }}{{end }} + testConfigDataSourceSystem,
272272 ExpectNonEmptyPlan: {{.class_in_parent }},
273273 Check: resource.ComposeAggregateTestCheckFunc (
274274 {{- range $key , $value := $ .resource_required }}
@@ -300,7 +300,7 @@ PreCheck: func() { testAccPreCheck(t, "{{.test_type}}", "{{$.class_version}}") }
300300 },
301301 // Update with empty strings config or default value
302302 {
303- Config: testConfig{{$ .resourceClassName }}Reset{{ if .class_name }}DependencyWith{{capitalize .class_name }}{{end }}{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
303+ Config: testConfig{{$ .resourceClassName }}Reset{{ if .class_name }}DependencyWith{{capitalize .class_name }}{{end }} + testConfigDataSourceSystem,
304304 ExpectNonEmptyPlan: {{.class_in_parent }},
305305 Check: resource.ComposeAggregateTestCheckFunc (
306306 {{- range $key , $value := $ .resource_required }}
@@ -368,7 +368,7 @@ PreCheck: func() { testAccPreCheck(t, "{{.test_type}}", "{{$.class_version}}") }
368368 {{- if $ .children }}
369369 // Update with children
370370 {
371- Config: testConfig{{$ .resourceClassName }}Children{{ if .class_name }}DependencyWith{{capitalize .class_name }}{{end }}{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
371+ Config: testConfig{{$ .resourceClassName }}Children{{ if .class_name }}DependencyWith{{capitalize .class_name }}{{end }} + testConfigDataSourceSystem,
372372 ExpectNonEmptyPlan: {{.class_in_parent }},
373373 Check: resource.ComposeAggregateTestCheckFunc (
374374 {{- range $key , $value := $ .resource_required }}
@@ -503,7 +503,7 @@ PreCheck: func() { testAccPreCheck(t, "{{.test_type}}", "{{$.class_version}}") }
503503 },
504504 // Update with children removed from config
505505 {
506- Config: testConfig{{$ .resourceClassName }}ChildrenRemoveFromConfig{{ if .class_name }}DependencyWith{{capitalize .class_name }}{{end }}{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
506+ Config: testConfig{{$ .resourceClassName }}ChildrenRemoveFromConfig{{ if .class_name }}DependencyWith{{capitalize .class_name }}{{end }} + testConfigDataSourceSystem,
507507 ExpectNonEmptyPlan: {{.class_in_parent }},
508508 Check: resource.ComposeAggregateTestCheckFunc (
509509 {{- range $key , $value := .min }}
@@ -615,7 +615,7 @@ PreCheck: func() { testAccPreCheck(t, "{{.test_type}}", "{{$.class_version}}") }
615615 },
616616 // Update with children first child removed
617617 {
618- Config: testConfig{{$ .resourceClassName }}ChildrenRemoveOne{{ if .class_name }}DependencyWith{{capitalize .class_name }}{{end }}{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
618+ Config: testConfig{{$ .resourceClassName }}ChildrenRemoveOne{{ if .class_name }}DependencyWith{{capitalize .class_name }}{{end }} + testConfigDataSourceSystem,
619619 ExpectNonEmptyPlan: {{.class_in_parent }},
620620 Check: resource.ComposeAggregateTestCheckFunc (
621621 {{- range $key , $value := .min }}
@@ -752,7 +752,7 @@ PreCheck: func() { testAccPreCheck(t, "{{.test_type}}", "{{$.class_version}}") }
752752 },
753753 // Update with all children removed
754754 {
755- Config: testConfig{{$ .resourceClassName }}ChildrenRemoveAll{{ if .class_name }}DependencyWith{{capitalize .class_name }}{{end }}{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
755+ Config: testConfig{{$ .resourceClassName }}ChildrenRemoveAll{{ if .class_name }}DependencyWith{{capitalize .class_name }}{{end }} + testConfigDataSourceSystem,
756756 ExpectNonEmptyPlan: {{.class_in_parent }},
757757 Check: resource.ComposeAggregateTestCheckFunc (
758758 {{- range $key , $value := .min }}
@@ -863,7 +863,7 @@ PreCheck: func() { testAccPreCheck(t, "{{.test_type}}", "{{$.class_version}}") }
863863 {{- if $ .custom_type }}
864864 // Update with minimum config and custom type semantic equivalent values
865865 {
866- Config: testConfig{{$ .resourceClassName }}CustomTypeDependencyWith{{capitalize .class_name }}{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
866+ Config: testConfig{{$ .resourceClassName }}CustomTypeDependencyWith{{capitalize .class_name }} + testConfigDataSourceSystem,
867867 ExpectNonEmptyPlan: {{.class_in_parent }},
868868 Check: resource.ComposeAggregateTestCheckFunc (
869869 {{- range $key , $value := $ .custom_type }}
@@ -879,7 +879,7 @@ PreCheck: func() { testAccPreCheck(t, "{{.test_type}}", "{{$.class_version}}") }
879879 {{- if $ .legacy_attributes }}
880880 // Update with legacy attribute config
881881 {
882- Config: testConfig{{$ .resourceClassName }}LegacyAttributesWith{{capitalize .class_name }}{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
882+ Config: testConfig{{$ .resourceClassName }}LegacyAttributesWith{{capitalize .class_name }} + testConfigDataSourceSystem,
883883 ExpectNonEmptyPlan: {{.class_in_parent }},
884884 },
885885 {{- end }}
@@ -893,7 +893,7 @@ PreCheck: func() { testAccPreCheck(t, "{{.test_type}}", "{{$.class_version}}") }
893893 Steps: []resource.TestStep {
894894 // Create with legacy attribute config
895895 {
896- Config: testConfig{{$ .resourceClassName }}LegacyAttributesWith{{capitalize .class_name }}{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
896+ Config: testConfig{{$ .resourceClassName }}LegacyAttributesWith{{capitalize .class_name }} + testConfigDataSourceSystem,
897897 ExpectNonEmptyPlan: false,
898898 },
899899 },
@@ -910,7 +910,7 @@ func TestAccResource{{.resourceClassName}}(t *testing.T) {
910910 Steps: []resource.TestStep {
911911 // Create with minimum config and verify default APIC values
912912 {
913- Config: testConfig{{.resourceClassName }}MinAllowExisting{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
913+ Config: testConfig{{.resourceClassName }}MinAllowExisting + testConfigDataSourceSystem,
914914 Check: resource.ComposeAggregateTestCheckFunc (
915915 {{- range $key , $value := $ .resource_required }}{{$contains := definedInMap $key $ .default }}
916916 {{- if not $contains }}
@@ -964,7 +964,7 @@ func TestAccResource{{.resourceClassName}}(t *testing.T) {
964964 Steps: []resource.TestStep {
965965 // Create with minimum config and verify default APIC values
966966 {
967- Config: testConfig{{.resourceClassName }}MinAllowExisting{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
967+ Config: testConfig{{.resourceClassName }}MinAllowExisting + testConfigDataSourceSystem,
968968 Check: resource.ComposeAggregateTestCheckFunc (
969969 {{- range $key , $value := $ .resource_required }}{{$contains := definedInMap $key $ .default }}
970970 {{- if not $contains }}
@@ -1004,7 +1004,7 @@ func TestAccResource{{.resourceClassName}}(t *testing.T) {
10041004 Steps: []resource.TestStep {
10051005 // Create with minimum config and verify default APIC values
10061006 {
1007- Config: testConfig{{.resourceClassName }}Min{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
1007+ Config: testConfig{{.resourceClassName }}Min + testConfigDataSourceSystem,
10081008 Check: resource.ComposeAggregateTestCheckFunc (
10091009 {{- range $key , $value := .resource_required }}{{$contains := definedInMap $key $ .default }}
10101010 {{- if not $contains }}
@@ -1047,7 +1047,7 @@ func TestAccResource{{.resourceClassName}}(t *testing.T) {
10471047 },
10481048 // Update with all config and verify default APIC values
10491049 {
1050- Config: testConfig{{.resourceClassName }}All{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
1050+ Config: testConfig{{.resourceClassName }}All + testConfigDataSourceSystem,
10511051 Check: resource.ComposeAggregateTestCheckFunc (
10521052 {{- range $key , $value := .resource_required }}{{$contains := definedInMap $key $ .all }}
10531053 {{- if not $contains }}
@@ -1092,7 +1092,7 @@ func TestAccResource{{.resourceClassName}}(t *testing.T) {
10921092 },
10931093 // Update with minimum config and verify config is unchanged
10941094 {
1095- Config: testConfig{{.resourceClassName }}Min{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
1095+ Config: testConfig{{.resourceClassName }}Min + testConfigDataSourceSystem,
10961096 Check: resource.ComposeAggregateTestCheckFunc (
10971097 {{- range $key , $value := .resource_required }}{{$contains := definedInMap $key $ .all }}
10981098 {{- if not $contains }}
@@ -1145,7 +1145,7 @@ func TestAccResource{{.resourceClassName}}(t *testing.T) {
11451145 },
11461146 // Update with empty strings config or default value
11471147 {
1148- Config: testConfig{{.resourceClassName }}Reset{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
1148+ Config: testConfig{{.resourceClassName }}Reset + testConfigDataSourceSystem,
11491149 Check: resource.ComposeAggregateTestCheckFunc (
11501150 {{- range $key , $value := $ .resource_required }}
11511151 {{- if eq $key " target_dn" }}
@@ -1199,7 +1199,7 @@ func TestAccResource{{.resourceClassName}}(t *testing.T) {
11991199 {{- if $ .children }}
12001200 // Update with children
12011201 {
1202- Config: testConfig{{.resourceClassName }}Children{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
1202+ Config: testConfig{{.resourceClassName }}Children + testConfigDataSourceSystem,
12031203 Check: resource.ComposeAggregateTestCheckFunc (
12041204 {{- range $key , $value := .min }}
12051205 {{- if eq $key " target_dn" }}
@@ -1316,7 +1316,7 @@ func TestAccResource{{.resourceClassName}}(t *testing.T) {
13161316 },
13171317 // Update with children removed from config
13181318 {
1319- Config: testConfig{{.resourceClassName }}ChildrenRemoveFromConfig{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
1319+ Config: testConfig{{.resourceClassName }}ChildrenRemoveFromConfig + testConfigDataSourceSystem,
13201320 Check: resource.ComposeAggregateTestCheckFunc (
13211321 {{- range $key , $value := .min }}
13221322 {{- if eq $key " target_dn" }}
@@ -1427,7 +1427,7 @@ func TestAccResource{{.resourceClassName}}(t *testing.T) {
14271427 },
14281428 // Update with children first child removed
14291429 {
1430- Config: testConfig{{.resourceClassName }}ChildrenRemoveOne{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
1430+ Config: testConfig{{.resourceClassName }}ChildrenRemoveOne + testConfigDataSourceSystem,
14311431 Check: resource.ComposeAggregateTestCheckFunc (
14321432 {{- range $key , $value := .min }}
14331433 {{- if eq $key " target_dn" }}
@@ -1583,7 +1583,7 @@ func TestAccResource{{.resourceClassName}}(t *testing.T) {
15831583 },
15841584 // Update with all children removed
15851585 {
1586- Config: testConfig{{.resourceClassName }}ChildrenRemoveAll{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
1586+ Config: testConfig{{.resourceClassName }}ChildrenRemoveAll + testConfigDataSourceSystem,
15871587 Check: resource.ComposeAggregateTestCheckFunc (
15881588 {{- range $key , $value := .min }}
15891589 {{- if eq $key " target_dn" }}
@@ -1726,7 +1726,7 @@ func TestAccResource{{.resourceClassName}}(t *testing.T) {
17261726 {{- if $ .legacy_attributes }}
17271727 // Update with legacy attribute config
17281728 {
1729- Config: testConfig{{$ .resourceClassName }}LegacyAttributes{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
1729+ Config: testConfig{{$ .resourceClassName }}LegacyAttributes + testConfigDataSourceSystem,
17301730 },
17311731 {{- end }}
17321732 },
@@ -1739,7 +1739,7 @@ func TestAccResource{{.resourceClassName}}(t *testing.T) {
17391739 Steps: []resource.TestStep {
17401740 // Create with legacy attribute config
17411741 {
1742- Config: testConfig{{$ .resourceClassName }}LegacyAttributes{{ if $ .version_mismatch }} + testConfigDataSourceSystem{{ end }} ,
1742+ Config: testConfig{{$ .resourceClassName }}LegacyAttributes + testConfigDataSourceSystem,
17431743 },
17441744 },
17451745 CheckDestroy: testCheckResourceDestroy,
0 commit comments