Skip to content

Commit

Permalink
azurerm_*.*.zone - can no longer be passed in as empty (#8233)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbfrahry authored Aug 25, 2020
1 parent 8c52648 commit 5fe2ea0
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions azurerm/helpers/azure/zones.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
package azure

import "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
import (
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
)

func SchemaZones() *schema.Schema {
return &schema.Schema{
Type: schema.TypeList,
Optional: true,
ForceNew: true,
Elem: &schema.Schema{
Type: schema.TypeString,
Type: schema.TypeString,
ValidateFunc: validation.StringIsNotEmpty,
},
}
}
Expand All @@ -20,7 +24,8 @@ func SchemaSingleZone() *schema.Schema {
ForceNew: true,
MaxItems: 1,
Elem: &schema.Schema{
Type: schema.TypeString,
Type: schema.TypeString,
ValidateFunc: validation.StringIsNotEmpty,
},
}
}
Expand All @@ -32,7 +37,8 @@ func SchemaMultipleZones() *schema.Schema {
ForceNew: true,
MinItems: 1,
Elem: &schema.Schema{
Type: schema.TypeString,
Type: schema.TypeString,
ValidateFunc: validation.StringIsNotEmpty,
},
}
}
Expand All @@ -43,7 +49,8 @@ func SchemaZonesComputed() *schema.Schema {
Optional: true,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeString,
Type: schema.TypeString,
ValidateFunc: validation.StringIsNotEmpty,
},
}
}
Expand Down

0 comments on commit 5fe2ea0

Please sign in to comment.