azurermMssqlOutboundFirewallRule
Allows you to manage an Azure SQL Outbound Firewall Rule.
Example Usage
/*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.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example",
{
location: "West Europe",
name: "example-resources",
}
);
const azurermMssqlServerExample = new azurerm.mssqlServer.MssqlServer(
this,
"example_1",
{
administrator_login: "4dm1n157r470r",
administrator_login_password: "4-v3ry-53cr37-p455w0rd",
location: azurermResourceGroupExample.location,
name: "mysqlserver",
outbound_network_restriction_enabled: true,
resource_group_name: azurermResourceGroupExample.name,
version: "12.0",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermMssqlServerExample.overrideLogicalId("example");
const azurermMssqlOutboundFirewallRuleExample =
new azurerm.mssqlOutboundFirewallRule.MssqlOutboundFirewallRule(
this,
"example_2",
{
name: "sqlexamplefdqn.database.windows.net",
server_id: azurermMssqlServerExample.id,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermMssqlOutboundFirewallRuleExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
-
name
- (Required) The name of the outbound firewall rule. This should be a FQDN. Changing this forces a new resource to be created. -
serverId
- (Required) The resource ID of the SQL Server on which to create the Outbound Firewall Rule. Changing this forces a new resource to be created.
Attributes Reference
The following attributes are exported:
id
- The SQL Outbound Firewall Rule ID.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the SQL Outbound Firewall Rule.update
- (Defaults to 30 minutes) Used when updating the SQL Outbound Firewall Rule.read
- (Defaults to 5 minutes) Used when retrieving the SQL Outbound Firewall Rule.delete
- (Defaults to 30 minutes) Used when deleting the SQL Outbound Firewall Rule.
Import
SQL Outbound Firewall Rules can be imported using the resourceId
, e.g.