VirtualNetworkRule

class VirtualNetworkRule : KotlinCustomResource

Manages a MariaDB Virtual Network Rule.

NOTE: MariaDB Virtual Network Rules can only be used with SKU Tiers of GeneralPurpose or MemoryOptimized

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.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azure.mariadb.Server;
import com.pulumi.azure.mariadb.ServerArgs;
import com.pulumi.azure.mariadb.VirtualNetworkRule;
import com.pulumi.azure.mariadb.VirtualNetworkRuleArgs;
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 exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.addressSpaces("10.7.29.0/29")
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.build());
var internal = new Subnet("internal", SubnetArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.7.29.0/29")
.serviceEndpoints("Microsoft.Sql")
.build());
var exampleServer = new Server("exampleServer", ServerArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.administratorLogin("mariadbadminun")
.administratorLoginPassword("H@Sh1CoR3!")
.version("10.2")
.sslEnforcementEnabled(true)
.skuName("GP_Gen5_2")
.build());
var exampleVirtualNetworkRule = new VirtualNetworkRule("exampleVirtualNetworkRule", VirtualNetworkRuleArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.serverName(exampleServer.name())
.subnetId(internal.id())
.build());
}
}

Import

MariaDB Virtual Network Rules can be imported using the resource id, e.g.

$ pulumi import azure:mariadb/virtualNetworkRule:VirtualNetworkRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.DBforMariaDB/servers/myserver/virtualNetworkRules/vnetrulename

Properties

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

The name of the MariaDB Virtual Network Rule. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen. 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 where the MariaDB server resides. Changing this forces a new resource to be created.

Link copied to clipboard
val serverName: Output<String>

The name of the SQL Server to which this MariaDB virtual network rule will be applied to. Changing this forces a new resource to be created.

Link copied to clipboard
val subnetId: Output<String>

The ID of the subnet that the MariaDB server will be connected to.

Link copied to clipboard
val urn: Output<String>