Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert all names entered for Azure DNS resources to lowercase by default. #2077

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions azurerm/resource_arm_dns_a_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package azurerm
import (
"fmt"
"net/http"
"strings"

"github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns"
"github.com/hashicorp/terraform/helper/schema"
Expand All @@ -24,6 +25,9 @@ func resourceArmDnsARecord() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
StateFunc: func(val interface{}) string {
return strings.ToLower(val.(string))
},
},

"resource_group_name": resourceGroupNameSchema(),
Expand Down
4 changes: 4 additions & 0 deletions azurerm/resource_arm_dns_aaaa_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package azurerm
import (
"fmt"
"net/http"
"strings"

"github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns"
"github.com/hashicorp/terraform/helper/schema"
Expand All @@ -24,6 +25,9 @@ func resourceArmDnsAAAARecord() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
StateFunc: func(val interface{}) string {
return strings.ToLower(val.(string))
},
},

"resource_group_name": resourceGroupNameSchema(),
Expand Down
4 changes: 4 additions & 0 deletions azurerm/resource_arm_dns_caa_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"fmt"
"net/http"
"strings"

"github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns"
"github.com/hashicorp/terraform/helper/hashcode"
Expand All @@ -27,6 +28,9 @@ func resourceArmDnsCaaRecord() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
StateFunc: func(val interface{}) string {
return strings.ToLower(val.(string))
},
},

"resource_group_name": resourceGroupNameSchema(),
Expand Down
4 changes: 4 additions & 0 deletions azurerm/resource_arm_dns_cname_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package azurerm
import (
"fmt"
"net/http"
"strings"

"github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns"
"github.com/hashicorp/terraform/helper/schema"
Expand All @@ -24,6 +25,9 @@ func resourceArmDnsCNameRecord() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
StateFunc: func(val interface{}) string {
return strings.ToLower(val.(string))
},
},

"resource_group_name": resourceGroupNameSchema(),
Expand Down
4 changes: 4 additions & 0 deletions azurerm/resource_arm_dns_mx_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"net/http"
"strconv"
"strings"

"github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns"
"github.com/hashicorp/terraform/helper/hashcode"
Expand All @@ -27,6 +28,9 @@ func resourceArmDnsMxRecord() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
StateFunc: func(val interface{}) string {
return strings.ToLower(val.(string))
},
},

"resource_group_name": resourceGroupNameSchema(),
Expand Down
4 changes: 4 additions & 0 deletions azurerm/resource_arm_dns_ns_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package azurerm
import (
"fmt"
"net/http"
"strings"

"github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns"
"github.com/hashicorp/terraform/helper/schema"
Expand All @@ -24,6 +25,9 @@ func resourceArmDnsNsRecord() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
StateFunc: func(val interface{}) string {
return strings.ToLower(val.(string))
},
},

"resource_group_name": resourceGroupNameSchema(),
Expand Down
4 changes: 4 additions & 0 deletions azurerm/resource_arm_dns_ptr_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package azurerm
import (
"fmt"
"net/http"
"strings"

"github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns"
"github.com/hashicorp/terraform/helper/schema"
Expand All @@ -24,6 +25,9 @@ func resourceArmDnsPtrRecord() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
StateFunc: func(val interface{}) string {
return strings.ToLower(val.(string))
},
},

"resource_group_name": resourceGroupNameSchema(),
Expand Down
4 changes: 4 additions & 0 deletions azurerm/resource_arm_dns_srv_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"fmt"
"net/http"
"strings"

"github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns"
"github.com/hashicorp/terraform/helper/hashcode"
Expand All @@ -26,6 +27,9 @@ func resourceArmDnsSrvRecord() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
StateFunc: func(val interface{}) string {
return strings.ToLower(val.(string))
},
},

"resource_group_name": resourceGroupNameSchema(),
Expand Down
4 changes: 4 additions & 0 deletions azurerm/resource_arm_dns_txt_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package azurerm
import (
"fmt"
"net/http"
"strings"

"github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns"
"github.com/hashicorp/terraform/helper/schema"
Expand All @@ -24,6 +25,9 @@ func resourceArmDnsTxtRecord() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
StateFunc: func(val interface{}) string {
return strings.ToLower(val.(string))
},
},

"resource_group_name": resourceGroupNameSchema(),
Expand Down
4 changes: 4 additions & 0 deletions azurerm/resource_arm_dns_zone.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package azurerm

import (
"fmt"
"strings"

"github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns"
"github.com/hashicorp/terraform/helper/schema"
Expand All @@ -25,6 +26,9 @@ func resourceArmDnsZone() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
StateFunc: func(val interface{}) string {
return strings.ToLower(val.(string))
},
},

"resource_group_name": resourceGroupNameDiffSuppressSchema(),
Expand Down