Skip to content

Commit

Permalink
switch terraform SDK to v0.12-early9 (#2968)
Browse files Browse the repository at this point in the history
  • Loading branch information
katbyte authored Apr 25, 2019
1 parent cf21949 commit 9a2c02d
Show file tree
Hide file tree
Showing 940 changed files with 106,359 additions and 27,098 deletions.
2 changes: 1 addition & 1 deletion azurerm/data_source_batch_certificate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ resource "azurerm_batch_account" "test" {
resource "azurerm_batch_certificate" "test" {
resource_group_name = "${azurerm_resource_group.test.name}"
account_name = "${azurerm_batch_account.test.name}"
certificate = "${base64encode(file("testdata/batch_certificate.pfx"))}"
certificate = "${filebase64("testdata/batch_certificate.pfx")}"
format = "Pfx"
password = "terraform"
thumbprint = "42C107874FD0E4A9583292A2F1098E8FE4B2EDDA"
Expand Down
2 changes: 1 addition & 1 deletion azurerm/data_source_batch_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ resource "azurerm_batch_account" "test" {
resource "azurerm_batch_certificate" "test" {
resource_group_name = "${azurerm_resource_group.test.name}"
account_name = "${azurerm_batch_account.test.name}"
certificate = "${base64encode(file("testdata/batch_certificate.pfx"))}"
certificate = "${filebase64("testdata/batch_certificate.pfx")}"
format = "Pfx"
password = "terraform"
thumbprint = "42C107874FD0E4A9583292A2F1098E8FE4B2EDDA"
Expand Down
2 changes: 1 addition & 1 deletion azurerm/resource_arm_api_management_certificate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ resource "azurerm_api_management_certificate" "test" {
name = "example-cert"
api_management_name = "${azurerm_api_management.test.name}"
resource_group_name = "${azurerm_resource_group.test.name}"
data = "${base64encode(file("testdata/keyvaultcert.pfx"))}"
data = "${filebase64("testdata/keyvaultcert.pfx")}"
password = ""
}
`, rInt, location, rInt)
Expand Down
10 changes: 5 additions & 5 deletions azurerm/resource_arm_api_management_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,13 +464,13 @@ resource "azurerm_api_management" "test" {
}
certificate {
encoded_certificate = "${base64encode(file("testdata/api_management_api_test.pfx"))}"
encoded_certificate = "${filebase64("testdata/api_management_api_test.pfx")}"
certificate_password = "terraform"
store_name = "CertificateAuthority"
}
certificate {
encoded_certificate = "${base64encode(file("testdata/api_management_api_test.pfx"))}"
encoded_certificate = "${filebase64("testdata/api_management_api_test.pfx")}"
certificate_password = "terraform"
store_name = "Root"
}
Expand All @@ -482,22 +482,22 @@ resource "azurerm_api_management" "test" {
hostname_configuration {
proxy {
host_name = "api.terraform.io"
certificate = "${base64encode(file("testdata/api_management_api_test.pfx"))}"
certificate = "${filebase64("testdata/api_management_api_test.pfx")}"
certificate_password = "terraform"
default_ssl_binding = true
negotiate_client_certificate = false
}
proxy {
host_name = "api2.terraform.io"
certificate = "${base64encode(file("testdata/api_management_api2_test.pfx"))}"
certificate = "${filebase64("testdata/api_management_api2_test.pfx")}"
certificate_password = "terraform"
negotiate_client_certificate = true
}
portal {
host_name = "portal.terraform.io"
certificate = "${base64encode(file("testdata/api_management_portal_test.pfx"))}"
certificate = "${filebase64("testdata/api_management_portal_test.pfx")}"
certificate_password = "terraform"
}
}
Expand Down
4 changes: 2 additions & 2 deletions azurerm/resource_arm_application_gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1826,7 +1826,7 @@ resource "azurerm_application_gateway" "test" {
ssl_certificate {
name = "${local.ssl_certificate_name}"
data = "${file("testdata/application_gateway_test.pfx")}"
data = "${filebase64("testdata/application_gateway_test.pfx")}"
password = "terraform"
}
}
Expand Down Expand Up @@ -1905,7 +1905,7 @@ resource "azurerm_application_gateway" "test" {
ssl_certificate {
name = "${local.ssl_certificate_name}"
data = "${file("testdata/application_gateway_test_2.pfx")}"
data = "${filebase64("testdata/application_gateway_test_2.pfx")}"
password = "hello-world"
}
}
Expand Down
8 changes: 4 additions & 4 deletions azurerm/resource_arm_batch_certificate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ resource "azurerm_batch_account" "test" {
resource "azurerm_batch_certificate" "test" {
resource_group_name = "${azurerm_resource_group.test.name}"
account_name = "${azurerm_batch_account.test.name}"
certificate = "${base64encode(file("testdata/batch_certificate.pfx"))}"
certificate = "${filebase64("testdata/batch_certificate.pfx")}"
format = "Pfx"
password = "terraform"
thumbprint = "42C107874FD0E4A9583292A2F1098E8FE4B2EDDA"
Expand All @@ -155,7 +155,7 @@ resource "azurerm_batch_account" "test" {
resource "azurerm_batch_certificate" "test" {
resource_group_name = "${azurerm_resource_group.test.name}"
account_name = "${azurerm_batch_account.test.name}"
certificate = "${base64encode(file("testdata/batch_certificate.pfx"))}"
certificate = "${filebase64("testdata/batch_certificate.pfx")}"
format = "Pfx"
thumbprint = "42C107874FD0E4A9583292A2F1098E8FE4B2EDDA"
thumbprint_algorithm = "SHA1"
Expand All @@ -179,7 +179,7 @@ resource "azurerm_batch_account" "test" {
resource "azurerm_batch_certificate" "test" {
resource_group_name = "${azurerm_resource_group.test.name}"
account_name = "${azurerm_batch_account.test.name}"
certificate = "${base64encode(file("testdata/batch_certificate.cer"))}"
certificate = "${filebase64("testdata/batch_certificate.cer")}"
format = "Cer"
thumbprint = "312D31A79FA0CEF49C00F769AFC2B73E9F4EDF34"
thumbprint_algorithm = "SHA1"
Expand All @@ -203,7 +203,7 @@ resource "azurerm_batch_account" "test" {
resource "azurerm_batch_certificate" "test" {
resource_group_name = "${azurerm_resource_group.test.name}"
account_name = "${azurerm_batch_account.test.name}"
certificate = "${base64encode(file("testdata/batch_certificate.cer"))}"
certificate = "${filebase64("testdata/batch_certificate.cer")}"
format = "Cer"
password = "should not have a password for Cer"
thumbprint = "312D31A79FA0CEF49C00F769AFC2B73E9F4EDF34"
Expand Down
4 changes: 2 additions & 2 deletions azurerm/resource_arm_batch_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -871,15 +871,15 @@ resource "azurerm_batch_account" "test" {
resource "azurerm_batch_certificate" "testcer" {
resource_group_name = "${azurerm_resource_group.test.name}"
account_name = "${azurerm_batch_account.test.name}"
certificate = "${base64encode(file("testdata/batch_certificate.cer"))}"
certificate = "${filebase64("testdata/batch_certificate.cer")}"
format = "Cer"
thumbprint = "312d31a79fa0cef49c00f769afc2b73e9f4edf34" # deliberately using lowercase here as verification
thumbprint_algorithm = "SHA1"
}
resource "azurerm_batch_certificate" "testpfx" {
resource_group_name = "${azurerm_resource_group.test.name}"
account_name = "${azurerm_batch_account.test.name}"
certificate = "${base64encode(file("testdata/batch_certificate.pfx"))}"
certificate = "${filebase64("testdata/batch_certificate.pfx")}"
format = "Pfx"
password = "terraform"
thumbprint = "42C107874FD0E4A9583292A2F1098E8FE4B2EDDA"
Expand Down
6 changes: 3 additions & 3 deletions azurerm/resource_arm_key_vault_certificate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ resource "azurerm_key_vault_certificate" "test" {
key_vault_id = "${azurerm_key_vault.test.id}"
certificate {
contents = "${base64encode(file("testdata/keyvaultcert.pfx"))}"
contents = "${filebase64("testdata/keyvaultcert.pfx")}"
password = ""
}
Expand Down Expand Up @@ -470,7 +470,7 @@ resource "azurerm_key_vault_certificate" "test" {
vault_uri = "${azurerm_key_vault.test.vault_uri}"
certificate {
contents = "${base64encode(file("testdata/keyvaultcert.pfx"))}"
contents = "${filebase64("testdata/keyvaultcert.pfx")}"
password = ""
}
Expand Down Expand Up @@ -504,7 +504,7 @@ resource "azurerm_key_vault_certificate" "import" {
key_vault_id = "${azurerm_key_vault.test.id}"
certificate {
contents = "${base64encode(file("testdata/keyvaultcert.pfx"))}"
contents = "${filebase64("testdata/keyvaultcert.pfx")}"
password = ""
}
Expand Down
34 changes: 0 additions & 34 deletions azurerm/resource_arm_loadbalancer_backend_address_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,40 +103,6 @@ func TestAccAzureRMLoadBalancerBackEndAddressPool_removal(t *testing.T) {
})
}

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

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

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMLoadBalancerDestroy,
Steps: []resource.TestStep{
{
Config: testAccAzureRMLoadBalancerBackEndAddressPool_basic(ri, addressPoolName, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMLoadBalancerExists("azurerm_lb.test", &lb),
testCheckAzureRMLoadBalancerBackEndAddressPoolExists(addressPoolName, &lb),
deleteAddressPoolState,
),
ExpectNonEmptyPlan: true,
},
{
Config: testAccAzureRMLoadBalancerBackEndAddressPool_basic(ri, addressPoolName, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMLoadBalancerExists("azurerm_lb.test", &lb),
testCheckAzureRMLoadBalancerBackEndAddressPoolExists(addressPoolName, &lb),
),
},
},
})
}

func TestAccAzureRMLoadBalancerBackEndAddressPool_disappears(t *testing.T) {
var lb network.LoadBalancer
ri := tf.AccRandTimeInt()
Expand Down
34 changes: 0 additions & 34 deletions azurerm/resource_arm_loadbalancer_nat_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,40 +145,6 @@ func TestAccAzureRMLoadBalancerNatPool_update(t *testing.T) {
})
}

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

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

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMLoadBalancerDestroy,
Steps: []resource.TestStep{
{
Config: testAccAzureRMLoadBalancerNatPool_basic(ri, natPoolName, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMLoadBalancerExists("azurerm_lb.test", &lb),
testCheckAzureRMLoadBalancerNatPoolExists(natPoolName, &lb),
deleteNatPoolState,
),
ExpectNonEmptyPlan: true,
},
{
Config: testAccAzureRMLoadBalancerNatPool_basic(ri, natPoolName, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMLoadBalancerExists("azurerm_lb.test", &lb),
testCheckAzureRMLoadBalancerNatPoolExists(natPoolName, &lb),
),
},
},
})
}

func TestAccAzureRMLoadBalancerNatPool_disappears(t *testing.T) {
var lb network.LoadBalancer
ri := tf.AccRandTimeInt()
Expand Down
34 changes: 0 additions & 34 deletions azurerm/resource_arm_loadbalancer_nat_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,40 +147,6 @@ func TestAccAzureRMLoadBalancerNatRule_update(t *testing.T) {
})
}

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

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

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMLoadBalancerDestroy,
Steps: []resource.TestStep{
{
Config: testAccAzureRMLoadBalancerNatRule_basic(ri, natRuleName, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMLoadBalancerExists("azurerm_lb.test", &lb),
testCheckAzureRMLoadBalancerNatRuleExists(natRuleName, &lb),
deleteNatRuleState,
),
ExpectNonEmptyPlan: true,
},
{
Config: testAccAzureRMLoadBalancerNatRule_basic(ri, natRuleName, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMLoadBalancerExists("azurerm_lb.test", &lb),
testCheckAzureRMLoadBalancerNatRuleExists(natRuleName, &lb),
),
},
},
})
}

func TestAccAzureRMLoadBalancerNatRule_disappears(t *testing.T) {
var lb network.LoadBalancer
ri := tf.AccRandTimeInt()
Expand Down
34 changes: 0 additions & 34 deletions azurerm/resource_arm_loadbalancer_outbound_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,40 +145,6 @@ func TestAccAzureRMLoadBalancerOutboundRule_update(t *testing.T) {
})
}

func TestAccAzureRMLoadBalancerOutboundRule_reapply(t *testing.T) {
var lb network.LoadBalancer
ri := tf.AccRandTimeInt()
outboundRuleName := fmt.Sprintf("OutboundRule-%d", ri)

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

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMLoadBalancerDestroy,
Steps: []resource.TestStep{
{
Config: testAccAzureRMLoadBalancerOutboundRule_basic(ri, outboundRuleName, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMLoadBalancerExists("azurerm_lb.test", &lb),
testCheckAzureRMLoadBalancerOutboundRuleExists(outboundRuleName, &lb),
deleteOutboundRuleState,
),
ExpectNonEmptyPlan: true,
},
{
Config: testAccAzureRMLoadBalancerOutboundRule_basic(ri, outboundRuleName, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMLoadBalancerExists("azurerm_lb.test", &lb),
testCheckAzureRMLoadBalancerOutboundRuleExists(outboundRuleName, &lb),
),
},
},
})
}

func TestAccAzureRMLoadBalancerOutboundRule_disappears(t *testing.T) {
var lb network.LoadBalancer
ri := tf.AccRandTimeInt()
Expand Down
34 changes: 0 additions & 34 deletions azurerm/resource_arm_loadbalancer_probe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,40 +176,6 @@ func TestAccAzureRMLoadBalancerProbe_updateProtocol(t *testing.T) {
})
}

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

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

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMLoadBalancerDestroy,
Steps: []resource.TestStep{
{
Config: testAccAzureRMLoadBalancerProbe_basic(ri, probeName, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMLoadBalancerExists("azurerm_lb.test", &lb),
testCheckAzureRMLoadBalancerProbeExists(probeName, &lb),
deleteProbeState,
),
ExpectNonEmptyPlan: true,
},
{
Config: testAccAzureRMLoadBalancerProbe_basic(ri, probeName, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMLoadBalancerExists("azurerm_lb.test", &lb),
testCheckAzureRMLoadBalancerProbeExists(probeName, &lb),
),
},
},
})
}

func TestAccAzureRMLoadBalancerProbe_disappears(t *testing.T) {
var lb network.LoadBalancer
ri := tf.AccRandTimeInt()
Expand Down
Loading

0 comments on commit 9a2c02d

Please sign in to comment.