github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/azurerm/r/sql_firewall_rule.html.markdown (about)

     1  ---
     2  layout: "azurerm"
     3  page_title: "Azure Resource Manager: azurerm_sql_firewall_rule"
     4  sidebar_current: "docs-azurerm-resource-sql-firewall_rule"
     5  description: |-
     6    Create a SQL Firewall Rule.
     7  ---
     8  
     9  # azurerm\_sql\_firewall\_rule
    10  
    11  Allows you to manage an Azure SQL Firewall Rule
    12  
    13  ## Example Usage
    14  
    15  ```hcl
    16  resource "azurerm_resource_group" "test" {
    17    name     = "acceptanceTestResourceGroup1"
    18    location = "West US"
    19  }
    20  
    21  resource "azurerm_sql_database" "test" {
    22    name                = "MySQLDatabase"
    23    resource_group_name = "${azurerm_resource_group.test.name}"
    24    location            = "West US"
    25  
    26    tags {
    27      environment = "production"
    28    }
    29  }
    30  
    31  resource "azurerm_sql_firewall_rule" "test" {
    32    name                = "FirewallRule1"
    33    resource_group_name = "${azurerm_resource_group.test.name}"
    34    server_name         = "${azurerm_sql_server.test.name}"
    35    start_ip_address    = "10.0.17.62"
    36    end_ip_address      = "10.0.17.62"
    37  }
    38  ```
    39  ## Argument Reference
    40  
    41  The following arguments are supported:
    42  
    43  * `name` - (Required) The name of the SQL Server.
    44  
    45  * `resource_group_name` - (Required) The name of the resource group in which to
    46      create the sql server.
    47  
    48  * `server_name` - (Required) The name of the SQL Server on which to create the Firewall Rule.
    49  
    50  * `start_ip_address` - (Required) The starting IP address to allow through the firewall for this rule.
    51  
    52  * `end_ip_address` - (Required) The ending IP address to allow through the firewall for this rule.
    53  
    54  ## Attributes Reference
    55  
    56  The following attributes are exported:
    57  
    58  * `id` - The SQL Firewall Rule ID.
    59  
    60  ## Import
    61  
    62  SQL Firewall Rules can be imported using the `resource id`, e.g.
    63  
    64  ```
    65  terraform import azurerm_sql_firewall_rule.rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/servers/myserver/firewallRules/rule1
    66  ```
    67