Skip to content

Commit

Permalink
switch terraform SDK to v0.12-early4 (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
katbyte authored Apr 18, 2019
1 parent 941cb34 commit 47f2dd7
Show file tree
Hide file tree
Showing 665 changed files with 69,515 additions and 19,822 deletions.
4 changes: 2 additions & 2 deletions azurestack/data_source_network_interface_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ resource "azurestack_network_interface" "test" {
private_ip_address_allocation = "dynamic"
}
tags {
tags = {
environment = "staging"
}
}
Expand Down Expand Up @@ -119,7 +119,7 @@ resource "azurestack_network_interface" "test" {
private_ip_address_allocation = "dynamic"
}
tags {
tags = {
environment = "staging"
}
}
Expand Down
2 changes: 1 addition & 1 deletion azurestack/data_source_network_security_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ resource "azurestack_network_security_group" "test" {
location = "${azurestack_resource_group.test.location}"
resource_group_name = "${azurestack_resource_group.test.name}"
tags {
tags = {
environment = "staging"
}
}
Expand Down
2 changes: 1 addition & 1 deletion azurestack/data_source_public_ip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ resource "azurestack_public_ip" "test" {
domain_name_label = "acctest-%d"
idle_timeout_in_minutes = 30
tags {
tags = {
environment = "test"
}
}
Expand Down
2 changes: 1 addition & 1 deletion azurestack/data_source_resource_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ resource "azurestack_resource_group" "test" {
name = "%s"
location = "%s"
tags {
tags = {
env = "test"
}
}
Expand Down
2 changes: 1 addition & 1 deletion azurestack/data_source_storage_account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ resource "azurestack_storage_account" "test" {
account_tier = "Standard"
account_replication_type = "LRS"
tags {
tags = {
environment = "production"
}
}
Expand Down
4 changes: 2 additions & 2 deletions azurestack/resource_arm_availability_set_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ resource "azurestack_availability_set" "test" {
location = "${azurestack_resource_group.test.location}"
resource_group_name = "${azurestack_resource_group.test.name}"
tags {
tags = {
environment = "Production"
cost_center = "MSFT"
}
Expand All @@ -285,7 +285,7 @@ resource "azurestack_availability_set" "test" {
location = "${azurestack_resource_group.test.location}"
resource_group_name = "${azurestack_resource_group.test.name}"
tags {
tags = {
environment = "staging"
}
}
Expand Down
4 changes: 2 additions & 2 deletions azurestack/resource_arm_dns_a_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ resource "azurestack_dns_a_record" "test" {
ttl = 300
records = ["1.2.3.4", "1.2.4.5"]
tags {
tags = {
environment = "Production"
cost_center = "MSFT"
}
Expand All @@ -240,7 +240,7 @@ resource "azurestack_dns_a_record" "test" {
ttl = 300
records = ["1.2.3.4", "1.2.4.5"]
tags {
tags = {
environment = "staging"
}
}
Expand Down
4 changes: 2 additions & 2 deletions azurestack/resource_arm_dns_zone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ resource "azurestack_dns_zone" "test" {
name = "acctestzone%d.com"
resource_group_name = "${azurestack_resource_group.test.name}"
tags {
tags = {
environment = "Production"
cost_center = "MSFT"
}
Expand All @@ -160,7 +160,7 @@ resource "azurestack_dns_zone" "test" {
name = "acctestzone%d.com"
resource_group_name = "${azurestack_resource_group.test.name}"
tags {
tags = {
environment = "staging"
}
}
Expand Down
34 changes: 0 additions & 34 deletions azurestack/resource_arm_loadbalancer_backend_address_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,40 +65,6 @@ func TestAccAzureStackLoadBalancerBackEndAddressPool_removal(t *testing.T) {
})
}

func TestAccAzureStackLoadBalancerBackEndAddressPool_reapply(t *testing.T) {
var lb network.LoadBalancer
ri := acctest.RandInt()
addressPoolName := fmt.Sprintf("%d-address-pool", ri)

deleteAddressPoolState := func(s *terraform.State) error {
return s.Remove("azurestack_lb_backend_address_pool.test")
}

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackLoadBalancerDestroy,
Steps: []resource.TestStep{
{
Config: testAccAzureStackLoadBalancerBackEndAddressPool_basic(ri, addressPoolName, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureStackLoadBalancerExists("azurestack_lb.test", &lb),
testCheckAzureStackLoadBalancerBackEndAddressPoolExists(addressPoolName, &lb),
deleteAddressPoolState,
),
ExpectNonEmptyPlan: true,
},
{
Config: testAccAzureStackLoadBalancerBackEndAddressPool_basic(ri, addressPoolName, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureStackLoadBalancerExists("azurestack_lb.test", &lb),
testCheckAzureStackLoadBalancerBackEndAddressPoolExists(addressPoolName, &lb),
),
},
},
})
}

func TestAccAzureStackLoadBalancerBackEndAddressPool_disappears(t *testing.T) {
var lb network.LoadBalancer
ri := acctest.RandInt()
Expand Down
34 changes: 0 additions & 34 deletions azurestack/resource_arm_loadbalancer_nat_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,40 +105,6 @@ func TestAccAzureStackLoadBalancerNatPool_update(t *testing.T) {
})
}

func TestAccAzureStackLoadBalancerNatPool_reapply(t *testing.T) {
var lb network.LoadBalancer
ri := acctest.RandInt()
natPoolName := fmt.Sprintf("NatPool-%d", ri)

deleteNatPoolState := func(s *terraform.State) error {
return s.Remove("azurestack_lb_nat_pool.test")
}

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackLoadBalancerDestroy,
Steps: []resource.TestStep{
{
Config: testAccAzureStackLoadBalancerNatPool_basic(ri, natPoolName, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureStackLoadBalancerExists("azurestack_lb.test", &lb),
testCheckAzureStackLoadBalancerNatPoolExists(natPoolName, &lb),
deleteNatPoolState,
),
ExpectNonEmptyPlan: true,
},
{
Config: testAccAzureStackLoadBalancerNatPool_basic(ri, natPoolName, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureStackLoadBalancerExists("azurestack_lb.test", &lb),
testCheckAzureStackLoadBalancerNatPoolExists(natPoolName, &lb),
),
},
},
})
}

func TestAccAzureStackLoadBalancerNatPool_disappears(t *testing.T) {
var lb network.LoadBalancer
ri := acctest.RandInt()
Expand Down
34 changes: 0 additions & 34 deletions azurestack/resource_arm_loadbalancer_nat_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,40 +107,6 @@ func TestAccAzureStackLoadBalancerNatRule_update(t *testing.T) {
})
}

func TestAccAzureStackLoadBalancerNatRule_reapply(t *testing.T) {
var lb network.LoadBalancer
ri := acctest.RandInt()
natRuleName := fmt.Sprintf("NatRule-%d", ri)

deleteNatRuleState := func(s *terraform.State) error {
return s.Remove("azurestack_lb_nat_rule.test")
}

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackLoadBalancerDestroy,
Steps: []resource.TestStep{
{
Config: testAccAzureStackLoadBalancerNatRule_basic(ri, natRuleName, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureStackLoadBalancerExists("azurestack_lb.test", &lb),
testCheckAzureStackLoadBalancerNatRuleExists(natRuleName, &lb),
deleteNatRuleState,
),
ExpectNonEmptyPlan: true,
},
{
Config: testAccAzureStackLoadBalancerNatRule_basic(ri, natRuleName, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureStackLoadBalancerExists("azurestack_lb.test", &lb),
testCheckAzureStackLoadBalancerNatRuleExists(natRuleName, &lb),
),
},
},
})
}

func TestAccAzureStackLoadBalancerNatRule_disappears(t *testing.T) {
var lb network.LoadBalancer
ri := acctest.RandInt()
Expand Down
34 changes: 0 additions & 34 deletions azurestack/resource_arm_loadbalancer_probe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,40 +136,6 @@ func TestAccAzureStackLoadBalancerProbe_updateProtocol(t *testing.T) {
})
}

func TestAccAzureStackLoadBalancerProbe_reapply(t *testing.T) {
var lb network.LoadBalancer
ri := acctest.RandInt()
probeName := fmt.Sprintf("probe-%d", ri)

deleteProbeState := func(s *terraform.State) error {
return s.Remove("azurestack_lb_probe.test")
}

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackLoadBalancerDestroy,
Steps: []resource.TestStep{
{
Config: testAccAzureStackLoadBalancerProbe_basic(ri, probeName, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureStackLoadBalancerExists("azurestack_lb.test", &lb),
testCheckAzureStackLoadBalancerProbeExists(probeName, &lb),
deleteProbeState,
),
ExpectNonEmptyPlan: true,
},
{
Config: testAccAzureStackLoadBalancerProbe_basic(ri, probeName, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureStackLoadBalancerExists("azurestack_lb.test", &lb),
testCheckAzureStackLoadBalancerProbeExists(probeName, &lb),
),
},
},
})
}

func TestAccAzureStackLoadBalancerProbe_disappears(t *testing.T) {
var lb network.LoadBalancer
ri := acctest.RandInt()
Expand Down
34 changes: 0 additions & 34 deletions azurestack/resource_arm_loadbalancer_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,40 +202,6 @@ func TestAccAzureStackLoadBalancerRule_update(t *testing.T) {
})
}

func TestAccAzureStackLoadBalancerRule_reapply(t *testing.T) {
var lb network.LoadBalancer
ri := acctest.RandInt()
lbRuleName := fmt.Sprintf("LbRule-%s", acctest.RandStringFromCharSet(8, acctest.CharSetAlpha))

deleteRuleState := func(s *terraform.State) error {
return s.Remove("azurestack_lb_rule.test")
}

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackLoadBalancerDestroy,
Steps: []resource.TestStep{
{
Config: testAccAzureStackLoadBalancerRule_basic(ri, lbRuleName, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureStackLoadBalancerExists("azurestack_lb.test", &lb),
testCheckAzureStackLoadBalancerRuleExists(lbRuleName, &lb),
deleteRuleState,
),
ExpectNonEmptyPlan: true,
},
{
Config: testAccAzureStackLoadBalancerRule_basic(ri, lbRuleName, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureStackLoadBalancerExists("azurestack_lb.test", &lb),
testCheckAzureStackLoadBalancerRuleExists(lbRuleName, &lb),
),
},
},
})
}

func TestAccAzureStackLoadBalancerRule_disappears(t *testing.T) {
var lb network.LoadBalancer
ri := acctest.RandInt()
Expand Down
6 changes: 3 additions & 3 deletions azurestack/resource_arm_loadbalancer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ resource "azurestack_lb" "test" {
location = "${azurestack_resource_group.test.location}"
resource_group_name = "${azurestack_resource_group.test.name}"
tags {
tags = {
Environment = "production"
Purpose = "AcceptanceTests"
}
Expand All @@ -242,7 +242,7 @@ resource "azurestack_lb" "test" {
location = "${azurestack_resource_group.test.location}"
resource_group_name = "${azurestack_resource_group.test.name}"
tags {
tags = {
Environment = "production"
Purpose = "AcceptanceTests"
}
Expand All @@ -262,7 +262,7 @@ resource "azurestack_lb" "test" {
location = "${azurestack_resource_group.test.location}"
resource_group_name = "${azurestack_resource_group.test.name}"
tags {
tags = {
Purpose = "AcceptanceTests"
}
}
Expand Down
2 changes: 1 addition & 1 deletion azurestack/resource_arm_local_network_gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ resource "azurestack_local_network_gateway" "test" {
gateway_address = "127.0.0.1"
address_space = ["127.0.0.0/8"]
tags {
tags = {
environment = "acctest"
}
}
Expand Down
Loading

0 comments on commit 47f2dd7

Please sign in to comment.