Skip to content

Commit 4a8a884

Browse files
committed
Add missing test helper for IP Spaces
Signed-off-by: Dainius <Didainius@users.noreply.github.com>
1 parent 7ceddd5 commit 4a8a884

File tree

2 files changed

+27
-11
lines changed

2 files changed

+27
-11
lines changed

vcfa/provider.go

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,20 @@ var globalDataSourceMap = map[string]*schema.Resource{
4040
"vcfa_supervisor_zone": datasourceVcfaSupervisorZone(), // 1.0
4141
"vcfa_region": datasourceVcfaRegion(), // 1.0
4242
"vcfa_ip_space": datasourceVcfaIpSpace(), // 1.0
43+
"vcfa_region_zone": datasourceVcfaRegionZone(), // 1.0
44+
"vcfa_org_vdc": datasourceVcfaOrgVdc(), // 1.0
4345
"vcfa_tier0_gateway": datasourceVcfaTier0Gateway(), // 1.0
4446
"vcfa_provider_gateway": datasourceVcfaProviderGateway(), // 1.0
4547
}
4648

4749
var globalResourceMap = map[string]*schema.Resource{
48-
"vcfa_vcenter": resourceVcfaVcenter(), // 1.0
49-
"vcfa_org": resourceVcfaOrg(), // 1.0
50-
"vcfa_nsx_manager": resourceVcfaNsxManager(), // 1.0
51-
"vcfa_region": resourceVcfaRegion(), // 1.0
52-
"vcfa_ip_space": resourceVcfaIpSpace(), // 1.0
53-
"vcfa_tm_version": datasourceVcfaTmVersion(), // 1.0
54-
"vcfa_supervisor": datasourceVcfaSupervisor(), // 1.0
55-
"vcfa_supervisor_zone": datasourceVcfaSupervisorZone(), // 1.0
56-
"vcfa_region_zone": datasourceVcfaRegionZone(), // 1.0
57-
"vcfa_org_vdc": datasourceVcfaOrgVdc(), // 1.0
58-
"vcfa_provider_gateway": resourceVcfaProviderGateway(), // 1.0
50+
"vcfa_vcenter": resourceVcfaVcenter(), // 1.0
51+
"vcfa_org": resourceVcfaOrg(), // 1.0
52+
"vcfa_nsx_manager": resourceVcfaNsxManager(), // 1.0
53+
"vcfa_region": resourceVcfaRegion(), // 1.0
54+
"vcfa_ip_space": resourceVcfaIpSpace(), // 1.0
55+
"vcfa_org_vdc": resourceVcfaOrgVdc(), // 1.0
56+
"vcfa_provider_gateway": resourceVcfaProviderGateway(), // 1.0
5957
}
6058

6159
// Provider returns a terraform.ResourceProvider.

vcfa/vcfa_common_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,21 @@ resource "vcfa_region" "region" {
118118
}
119119
`, "vcfa_region.region"
120120
}
121+
122+
func getIpSpaceHcl(t *testing.T, regionHclRef, nameSuffix, octet3 string) (string, string) {
123+
return `
124+
resource "vcfa_ip_space" "test-` + nameSuffix + `" {
125+
name = "` + t.Name() + nameSuffix + `"
126+
description = "Made using Terraform"
127+
region_id = ` + regionHclRef + `.id
128+
external_scope = "43.12.` + octet3 + `.0/30"
129+
default_quota_max_subnet_size = 24
130+
default_quota_max_cidr_count = 1
131+
default_quota_max_ip_count = 1
132+
internal_scope {
133+
name = "scope3"
134+
cidr = "32.0.` + octet3 + `.0/24"
135+
}
136+
}
137+
`, `vcfa_ip_space.test-` + nameSuffix
138+
}

0 commit comments

Comments
 (0)