Skip to content

Commit

Permalink
Remove alias ip range from beta feature for compute instance
Browse files Browse the repository at this point in the history
  • Loading branch information
rosbo committed Sep 28, 2017
1 parent 764fb6b commit b5e1bf4
Show file tree
Hide file tree
Showing 5 changed files with 4,770 additions and 91 deletions.
4 changes: 0 additions & 4 deletions google/resource_compute_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ var InstanceVersionedFeatures = []Feature{
Version: v0beta,
Item: "min_cpu_platform",
},
{
Version: v0beta,
Item: "network_interface.*.alias_ip_range",
},
}

func stringScopeHashcode(v interface{}) int {
Expand Down
10 changes: 5 additions & 5 deletions google/resource_compute_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ func TestAccComputeInstance_minCpuPlatform(t *testing.T) {
}

func TestAccComputeInstance_primaryAliasIpRange(t *testing.T) {
var instance computeBeta.Instance
var instance compute.Instance
instanceName := fmt.Sprintf("terraform-test-%s", acctest.RandString(10))

resource.Test(t, resource.TestCase{
Expand All @@ -764,7 +764,7 @@ func TestAccComputeInstance_primaryAliasIpRange(t *testing.T) {
resource.TestStep{
Config: testAccComputeInstance_primaryAliasIpRange(instanceName),
Check: resource.ComposeTestCheckFunc(
testAccCheckComputeBetaInstanceExists("google_compute_instance.foobar", &instance),
testAccCheckComputeInstanceExists("google_compute_instance.foobar", &instance),
testAccCheckComputeInstanceHasAliasIpRange(&instance, "", "/24"),
),
},
Expand All @@ -773,7 +773,7 @@ func TestAccComputeInstance_primaryAliasIpRange(t *testing.T) {
}

func TestAccComputeInstance_secondaryAliasIpRange(t *testing.T) {
var instance computeBeta.Instance
var instance compute.Instance
instanceName := fmt.Sprintf("terraform-test-%s", acctest.RandString(10))

resource.Test(t, resource.TestCase{
Expand All @@ -784,7 +784,7 @@ func TestAccComputeInstance_secondaryAliasIpRange(t *testing.T) {
resource.TestStep{
Config: testAccComputeInstance_secondaryAliasIpRange(instanceName),
Check: resource.ComposeTestCheckFunc(
testAccCheckComputeBetaInstanceExists("google_compute_instance.foobar", &instance),
testAccCheckComputeInstanceExists("google_compute_instance.foobar", &instance),
testAccCheckComputeInstanceHasAliasIpRange(&instance, "inst-test-secondary", "172.16.0.0/24"),
),
},
Expand Down Expand Up @@ -1245,7 +1245,7 @@ func testAccCheckComputeInstanceHasMinCpuPlatform(instance *computeBeta.Instance
}
}

func testAccCheckComputeInstanceHasAliasIpRange(instance *computeBeta.Instance, subnetworkRangeName, iPCidrRange string) resource.TestCheckFunc {
func testAccCheckComputeInstanceHasAliasIpRange(instance *compute.Instance, subnetworkRangeName, iPCidrRange string) resource.TestCheckFunc {
return func(s *terraform.State) error {
for _, networkInterface := range instance.NetworkInterfaces {
for _, aliasIpRange := range networkInterface.AliasIpRanges {
Expand Down
Loading

0 comments on commit b5e1bf4

Please sign in to comment.