From 409ec881579150b4dad8e3f0e8f86475e29d2c56 Mon Sep 17 00:00:00 2001 From: Andreas Kyrris Date: Wed, 28 Sep 2016 14:12:00 +0100 Subject: [PATCH] Fix failing acceptance tests by using case insensitive diff function. Some resource fail due to resource_group_name always being stored as lowercase. For those resources we add the case insensitive diff function. --- builtin/providers/azurerm/resource_arm_dns_zone.go | 7 ++++--- .../azurerm/resource_arm_traffic_manager_endpoint.go | 7 ++++--- .../azurerm/resource_arm_traffic_manager_profile.go | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/builtin/providers/azurerm/resource_arm_dns_zone.go b/builtin/providers/azurerm/resource_arm_dns_zone.go index f5a5cf9667..7696fa8f86 100644 --- a/builtin/providers/azurerm/resource_arm_dns_zone.go +++ b/builtin/providers/azurerm/resource_arm_dns_zone.go @@ -26,9 +26,10 @@ func resourceArmDnsZone() *schema.Resource { }, "resource_group_name": &schema.Schema{ - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + DiffSuppressFunc: resourceAzurermResourceGroupNameDiffSuppress, }, "number_of_record_sets": &schema.Schema{ diff --git a/builtin/providers/azurerm/resource_arm_traffic_manager_endpoint.go b/builtin/providers/azurerm/resource_arm_traffic_manager_endpoint.go index ea8b7cacce..70ab295d28 100644 --- a/builtin/providers/azurerm/resource_arm_traffic_manager_endpoint.go +++ b/builtin/providers/azurerm/resource_arm_traffic_manager_endpoint.go @@ -86,9 +86,10 @@ func resourceArmTrafficManagerEndpoint() *schema.Resource { }, "resource_group_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + DiffSuppressFunc: resourceAzurermResourceGroupNameDiffSuppress, }, }, } diff --git a/builtin/providers/azurerm/resource_arm_traffic_manager_profile.go b/builtin/providers/azurerm/resource_arm_traffic_manager_profile.go index 2e3f21a4b2..079787c4fb 100644 --- a/builtin/providers/azurerm/resource_arm_traffic_manager_profile.go +++ b/builtin/providers/azurerm/resource_arm_traffic_manager_profile.go @@ -93,9 +93,10 @@ func resourceArmTrafficManagerProfile() *schema.Resource { }, "resource_group_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + DiffSuppressFunc: resourceAzurermResourceGroupNameDiffSuppress, }, "tags": tagsSchema(),