Skip to content

Commit

Permalink
azurerm_postgresql_firewall_rule - add validation for `start_ip_add…
Browse files Browse the repository at this point in the history
…ress` and `end_ip_address` (#8963)

Added postgres firewall start and end IP address validation.
  • Loading branch information
ritesh-modi authored Nov 5, 2020
1 parent 2961380 commit a2a7f3e
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2020-01-01/postgresql"
"github.com/hashicorp/go-azure-helpers/response"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients"
Expand Down Expand Up @@ -49,15 +50,17 @@ func resourceArmPostgreSQLFirewallRule() *schema.Resource {
},

"start_ip_address": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Type: schema.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validation.IsIPv4Address,
},

"end_ip_address": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Type: schema.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validation.IsIPv4Address,
},
},
}
Expand Down

0 comments on commit a2a7f3e

Please sign in to comment.