Fix import of resource group name for azurerm_sql_firewall_rule.
This commit is contained in:
parent
48055158b6
commit
b2f85a766c
|
@ -27,7 +27,7 @@ func TestAccAzureRMSqlFirewallRule_importBasic(t *testing.T) {
|
|||
ResourceName: resourceName,
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
ImportStateVerifyIgnore: []string{"resource_group_name", "server_name"},
|
||||
ImportStateVerifyIgnore: []string{"server_name"},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
@ -94,6 +94,12 @@ func resourceArmSqlFirewallRuleCreate(d *schema.ResourceData, meta interface{})
|
|||
}
|
||||
|
||||
func resourceArmSqlFirewallRuleRead(d *schema.ResourceData, meta interface{}) error {
|
||||
id, err := parseAzureResourceID(d.Id())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
resGroup := id.ResourceGroup
|
||||
|
||||
client := meta.(*ArmClient)
|
||||
rivieraClient := client.rivieraClient
|
||||
|
||||
|
@ -112,6 +118,7 @@ func resourceArmSqlFirewallRuleRead(d *schema.ResourceData, meta interface{}) er
|
|||
|
||||
resp := readResponse.Parsed.(*sql.GetFirewallRuleResponse)
|
||||
|
||||
d.Set("resource_group_name", resGroup)
|
||||
d.Set("name", resp.Name)
|
||||
d.Set("start_ip_address", resp.StartIPAddress)
|
||||
d.Set("end_ip_address", resp.EndIPAddress)
|
||||
|
|
Loading…
Reference in New Issue