Skip to content

azurermMariadbFirewallRule

Manages a Firewall Rule for a MariaDB Server

Example Usage (Single IP Address)

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.mariadbFirewallRule.MariadbFirewallRule(this, "example", {
  end_ip_address: "40.112.8.12",
  name: "test-rule",
  resource_group_name: "test-rg",
  server_name: "test-server",
  start_ip_address: "40.112.8.12",
});

Example Usage (IP Range)

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.mariadbFirewallRule.MariadbFirewallRule(this, "example", {
  end_ip_address: "40.112.255.255",
  name: "test-rule",
  resource_group_name: "test-rg",
  server_name: "test-server",
  start_ip_address: "40.112.0.0",
});

Argument Reference

The following arguments are supported:

  • name - (Required) Specifies the name of the MariaDB Firewall Rule. Changing this forces a new resource to be created.

  • serverName - (Required) Specifies the name of the MariaDB Server. Changing this forces a new resource to be created.

  • resourceGroupName - (Required) The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created.

  • startIpAddress - (Required) Specifies the Start IP Address associated with this Firewall Rule.

  • endIpAddress - (Required) Specifies the End IP Address associated with this Firewall Rule.

-> NOTE: The Azure feature allowAccessToAzureServices can be enabled by setting startIpAddress and endIpAddress to 0000 which (is documented in the Azure API Docs).

Attributes Reference

The following attributes are exported:

  • id - The ID of the MariaDB Firewall Rule.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 30 minutes) Used when creating the MariaDB Firewall Rule.
  • update - (Defaults to 30 minutes) Used when updating the MariaDB Firewall Rule.
  • read - (Defaults to 5 minutes) Used when retrieving the MariaDB Firewall Rule.
  • delete - (Defaults to 30 minutes) Used when deleting the MariaDB Firewall Rule.

Import

MariaDB Firewall rules can be imported using the resourceId, e.g.

terraform import azurerm_mariadb_firewall_rule.rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforMariaDB/servers/server1/firewallRules/rule1