FirewallRule

class FirewallRule : KotlinCustomResource

Allows you to manage an Azure SQL Firewall Rule.

Note: The azure.sql.FirewallRule resource is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the azure.mssql.FirewallRule resource instead.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.sql.SqlServer;
import com.pulumi.azure.sql.SqlServerArgs;
import com.pulumi.azure.sql.FirewallRule;
import com.pulumi.azure.sql.FirewallRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleSqlServer = new SqlServer("exampleSqlServer", SqlServerArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.version("12.0")
.administratorLogin("4dm1n157r470r")
.administratorLoginPassword("4-v3ry-53cr37-p455w0rd")
.build());
var exampleFirewallRule = new FirewallRule("exampleFirewallRule", FirewallRuleArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.serverName(exampleSqlServer.name())
.startIpAddress("10.0.17.62")
.endIpAddress("10.0.17.62")
.build());
}
}

Import

SQL Firewall Rules can be imported using the resource id, e.g.

$ pulumi import azure:sql/firewallRule:FirewallRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/servers/myserver/firewallRules/rule1

Properties

Link copied to clipboard
val endIpAddress: Output<String>

The ending IP address to allow through the firewall for this rule.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the firewall rule. Changing this forces a new resource to be created.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The name of the resource group in which to create the SQL Server. Changing this forces a new resource to be created.

Link copied to clipboard
val serverName: Output<String>

The name of the SQL Server on which to create the Firewall Rule. Changing this forces a new resource to be created.

Link copied to clipboard
val startIpAddress: Output<String>

The starting IP address to allow through the firewall for this rule.

Link copied to clipboard
val urn: Output<String>