Merge pull request #4583 from hashicorp/b-fix-azurerm

provider/azurerm: Additional fixes for upstream breaking changes
This commit is contained in:
Paul Hinze 2016-01-08 14:54:42 -06:00
commit f4e138f2db
7 changed files with 14 additions and 14 deletions

View File

@ -95,7 +95,7 @@ func testCheckAzureRMAvailabilitySetDestroy(s *terraform.State) error {
name := rs.Primary.Attributes["name"]
resourceGroup := rs.Primary.Attributes["resource_group_name"]
resp, err := conn.Get(resourceGroup, name)
resp, err := conn.Get(resourceGroup, name, "")
if err != nil {
return nil

View File

@ -176,7 +176,7 @@ func resourceArmNetworkSecurityGroupRead(d *schema.ResourceData, meta interface{
resGroup := id.ResourceGroup
name := id.Path["networkSecurityGroups"]
resp, err := secGroupClient.Get(resGroup, name)
resp, err := secGroupClient.Get(resGroup, name, "")
if resp.StatusCode == http.StatusNotFound {
d.SetId("")
return nil
@ -220,7 +220,7 @@ func resourceArmNetworkSecurityGroupRuleHash(v interface{}) int {
func securityGroupStateRefreshFunc(client *ArmClient, resourceGroupName string, securityGroupName string) resource.StateRefreshFunc {
return func() (interface{}, string, error) {
res, err := client.secGroupClient.Get(resourceGroupName, securityGroupName)
res, err := client.secGroupClient.Get(resourceGroupName, securityGroupName, "")
if err != nil {
return nil, "", fmt.Errorf("Error issuing read request in securityGroupStateRefreshFunc to Azure ARM for network security group '%s' (RG: '%s'): %s", securityGroupName, resourceGroupName, err)
}

View File

@ -182,7 +182,7 @@ func testCheckAzureRMNetworkSecurityGroupExists(name string) resource.TestCheckF
conn := testAccProvider.Meta().(*ArmClient).secGroupClient
resp, err := conn.Get(resourceGroup, sgName)
resp, err := conn.Get(resourceGroup, sgName, "")
if err != nil {
return fmt.Errorf("Bad: Get on secGroupClient: %s", err)
}
@ -206,7 +206,7 @@ func testCheckAzureRMNetworkSecurityGroupDestroy(s *terraform.State) error {
name := rs.Primary.Attributes["name"]
resourceGroup := rs.Primary.Attributes["resource_group_name"]
resp, err := conn.Get(resourceGroup, name)
resp, err := conn.Get(resourceGroup, name, "")
if err != nil {
return nil

View File

@ -159,7 +159,7 @@ func resourceArmPublicIpRead(d *schema.ResourceData, meta interface{}) error {
resGroup := id.ResourceGroup
name := id.Path["publicIPAddresses"]
resp, err := publicIPClient.Get(resGroup, name)
resp, err := publicIPClient.Get(resGroup, name, "")
if resp.StatusCode == http.StatusNotFound {
d.SetId("")
return nil
@ -196,7 +196,7 @@ func resourceArmPublicIpDelete(d *schema.ResourceData, meta interface{}) error {
func publicIPStateRefreshFunc(client *ArmClient, resourceGroupName string, publicIpName string) resource.StateRefreshFunc {
return func() (interface{}, string, error) {
res, err := client.publicIPClient.Get(resourceGroupName, publicIpName)
res, err := client.publicIPClient.Get(resourceGroupName, publicIpName, "")
if err != nil {
return nil, "", fmt.Errorf("Error issuing read request in publicIPStateRefreshFunc to Azure ARM for public ip '%s' (RG: '%s'): %s", publicIpName, resourceGroupName, err)
}

View File

@ -155,7 +155,7 @@ func testCheckAzureRMPublicIpExists(name string) resource.TestCheckFunc {
conn := testAccProvider.Meta().(*ArmClient).publicIPClient
resp, err := conn.Get(resourceGroup, availSetName)
resp, err := conn.Get(resourceGroup, availSetName, "")
if err != nil {
return fmt.Errorf("Bad: Get on publicIPClient: %s", err)
}
@ -179,7 +179,7 @@ func testCheckAzureRMPublicIpDestroy(s *terraform.State) error {
name := rs.Primary.Attributes["name"]
resourceGroup := rs.Primary.Attributes["resource_group_name"]
resp, err := conn.Get(resourceGroup, name)
resp, err := conn.Get(resourceGroup, name, "")
if err != nil {
return nil

View File

@ -125,7 +125,7 @@ func resourceArmVirtualNetworkRead(d *schema.ResourceData, meta interface{}) err
resGroup := id.ResourceGroup
name := id.Path["virtualNetworks"]
resp, err := vnetClient.Get(resGroup, name)
resp, err := vnetClient.Get(resGroup, name, "")
if resp.StatusCode == http.StatusNotFound {
d.SetId("")
return nil
@ -208,7 +208,7 @@ func getVirtualNetworkProperties(d *schema.ResourceData) *network.VirtualNetwork
subnetObj.Properties.AddressPrefix = &prefix
if secGroup != "" {
subnetObj.Properties.NetworkSecurityGroup = &network.SubResource{
subnetObj.Properties.NetworkSecurityGroup = &network.SecurityGroup{
ID: &secGroup,
}
}
@ -240,7 +240,7 @@ func resourceAzureSubnetHash(v interface{}) int {
func virtualNetworkStateRefreshFunc(client *ArmClient, resourceGroupName string, networkName string) resource.StateRefreshFunc {
return func() (interface{}, string, error) {
res, err := client.vnetClient.Get(resourceGroupName, networkName)
res, err := client.vnetClient.Get(resourceGroupName, networkName, "")
if err != nil {
return nil, "", fmt.Errorf("Error issuing read request in virtualNetworkStateRefreshFunc to Azure ARM for virtual network '%s' (RG: '%s'): %s", networkName, resourceGroupName, err)
}

View File

@ -42,7 +42,7 @@ func testCheckAzureRMVirtualNetworkExists(name string) resource.TestCheckFunc {
// Ensure resource group/virtual network combination exists in API
conn := testAccProvider.Meta().(*ArmClient).vnetClient
resp, err := conn.Get(resourceGroup, virtualNetworkName)
resp, err := conn.Get(resourceGroup, virtualNetworkName, "")
if err != nil {
return fmt.Errorf("Bad: Get on vnetClient: %s", err)
}
@ -66,7 +66,7 @@ func testCheckAzureRMVirtualNetworkDestroy(s *terraform.State) error {
name := rs.Primary.Attributes["name"]
resourceGroup := rs.Primary.Attributes["resource_group_name"]
resp, err := conn.Get(resourceGroup, name)
resp, err := conn.Get(resourceGroup, name, "")
if err != nil {
return nil