FirewallRuleArgs

data class FirewallRuleArgs(val endIpAddress: Output<String>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val serverName: Output<String>? = null, val startIpAddress: Output<String>? = null) : ConvertibleToJava<FirewallRuleArgs>

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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleSqlServer = new SqlServer("exampleSqlServer", SqlServerArgs.builder()
.name("mysqlserver")
.resourceGroupName(example.name())
.location(example.location())
.version("12.0")
.administratorLogin("4dm1n157r470r")
.administratorLoginPassword("4-v3ry-53cr37-p455w0rd")
.build());
var exampleFirewallRule = new FirewallRule("exampleFirewallRule", FirewallRuleArgs.builder()
.name("FirewallRule1")
.resourceGroupName(example.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

Constructors

Link copied to clipboard
fun FirewallRuleArgs(endIpAddress: Output<String>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, serverName: Output<String>? = null, startIpAddress: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): FirewallRuleArgs

Properties

Link copied to clipboard
val endIpAddress: Output<String>? = null

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

Link copied to clipboard
val name: Output<String>? = null

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

Link copied to clipboard
val resourceGroupName: Output<String>? = null

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>? = null

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>? = null

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