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>

Manages a Firewall Rule for a MariaDB Server

Example Usage

Single IP Address)

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.mariadb.FirewallRule("example", {
name: "test-rule",
resourceGroupName: "test-rg",
serverName: "test-server",
startIpAddress: "40.112.8.12",
endIpAddress: "40.112.8.12",
});
import pulumi
import pulumi_azure as azure
example = azure.mariadb.FirewallRule("example",
name="test-rule",
resource_group_name="test-rg",
server_name="test-server",
start_ip_address="40.112.8.12",
end_ip_address="40.112.8.12")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.MariaDB.FirewallRule("example", new()
{
Name = "test-rule",
ResourceGroupName = "test-rg",
ServerName = "test-server",
StartIpAddress = "40.112.8.12",
EndIpAddress = "40.112.8.12",
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/mariadb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := mariadb.NewFirewallRule(ctx, "example", &mariadb.FirewallRuleArgs{
Name: pulumi.String("test-rule"),
ResourceGroupName: pulumi.String("test-rg"),
ServerName: pulumi.String("test-server"),
StartIpAddress: pulumi.String("40.112.8.12"),
EndIpAddress: pulumi.String("40.112.8.12"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.mariadb.FirewallRule;
import com.pulumi.azure.mariadb.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 FirewallRule("example", FirewallRuleArgs.builder()
.name("test-rule")
.resourceGroupName("test-rg")
.serverName("test-server")
.startIpAddress("40.112.8.12")
.endIpAddress("40.112.8.12")
.build());
}
}
resources:
example:
type: azure:mariadb:FirewallRule
properties:
name: test-rule
resourceGroupName: test-rg
serverName: test-server
startIpAddress: 40.112.8.12
endIpAddress: 40.112.8.12

IP Range)

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.mariadb.FirewallRule("example", {
name: "test-rule",
resourceGroupName: "test-rg",
serverName: "test-server",
startIpAddress: "40.112.0.0",
endIpAddress: "40.112.255.255",
});
import pulumi
import pulumi_azure as azure
example = azure.mariadb.FirewallRule("example",
name="test-rule",
resource_group_name="test-rg",
server_name="test-server",
start_ip_address="40.112.0.0",
end_ip_address="40.112.255.255")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.MariaDB.FirewallRule("example", new()
{
Name = "test-rule",
ResourceGroupName = "test-rg",
ServerName = "test-server",
StartIpAddress = "40.112.0.0",
EndIpAddress = "40.112.255.255",
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/mariadb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := mariadb.NewFirewallRule(ctx, "example", &mariadb.FirewallRuleArgs{
Name: pulumi.String("test-rule"),
ResourceGroupName: pulumi.String("test-rg"),
ServerName: pulumi.String("test-server"),
StartIpAddress: pulumi.String("40.112.0.0"),
EndIpAddress: pulumi.String("40.112.255.255"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.mariadb.FirewallRule;
import com.pulumi.azure.mariadb.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 FirewallRule("example", FirewallRuleArgs.builder()
.name("test-rule")
.resourceGroupName("test-rg")
.serverName("test-server")
.startIpAddress("40.112.0.0")
.endIpAddress("40.112.255.255")
.build());
}
}
resources:
example:
type: azure:mariadb:FirewallRule
properties:
name: test-rule
resourceGroupName: test-rg
serverName: test-server
startIpAddress: 40.112.0.0
endIpAddress: 40.112.255.255

Import

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

$ pulumi import azure:mariadb/firewallRule:FirewallRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforMariaDB/servers/server1/firewallRules/rule1

Constructors

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

Properties

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

Specifies the End IP Address associated with this Firewall Rule.

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

Specifies the name of the MariaDB 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 the MariaDB Server exists. Changing this forces a new resource to be created.

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

Specifies the name of the MariaDB Server. Changing this forces a new resource to be created.

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

Specifies the Start IP Address associated with this Firewall Rule.

Functions

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