VirtualNetworkRuleArgs

data class VirtualNetworkRuleArgs(val ignoreMissingVnetServiceEndpoint: Output<Boolean>? = null, val resourceGroupName: Output<String>? = null, val serverName: Output<String>? = null, val virtualNetworkRuleName: Output<String>? = null, val virtualNetworkSubnetId: Output<String>? = null) : ConvertibleToJava<VirtualNetworkRuleArgs>

A virtual network rule. API Version: 2017-12-01.

Example Usage

Create or update a virtual network rule

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualNetworkRule = new AzureNative.DBforPostgreSQL.VirtualNetworkRule("virtualNetworkRule", new()
{
IgnoreMissingVnetServiceEndpoint = false,
ResourceGroupName = "TestGroup",
ServerName = "vnet-test-svr",
VirtualNetworkRuleName = "vnet-firewall-rule",
VirtualNetworkSubnetId = "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet",
});
});
package main
import (
dbforpostgresql "github.com/pulumi/pulumi-azure-native-sdk/dbforpostgresql"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dbforpostgresql.NewVirtualNetworkRule(ctx, "virtualNetworkRule", &dbforpostgresql.VirtualNetworkRuleArgs{
IgnoreMissingVnetServiceEndpoint: pulumi.Bool(false),
ResourceGroupName: pulumi.String("TestGroup"),
ServerName: pulumi.String("vnet-test-svr"),
VirtualNetworkRuleName: pulumi.String("vnet-firewall-rule"),
VirtualNetworkSubnetId: pulumi.String("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet"),
})
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.azurenative.dbforpostgresql.VirtualNetworkRule;
import com.pulumi.azurenative.dbforpostgresql.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 virtualNetworkRule = new VirtualNetworkRule("virtualNetworkRule", VirtualNetworkRuleArgs.builder()
.ignoreMissingVnetServiceEndpoint(false)
.resourceGroupName("TestGroup")
.serverName("vnet-test-svr")
.virtualNetworkRuleName("vnet-firewall-rule")
.virtualNetworkSubnetId("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:dbforpostgresql:VirtualNetworkRule vnet-firewall-rule /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule

Constructors

Link copied to clipboard
constructor(ignoreMissingVnetServiceEndpoint: Output<Boolean>? = null, resourceGroupName: Output<String>? = null, serverName: Output<String>? = null, virtualNetworkRuleName: Output<String>? = null, virtualNetworkSubnetId: Output<String>? = null)

Properties

Link copied to clipboard

Create firewall rule before the virtual network has vnet service endpoint enabled.

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

The name of the resource group. The name is case insensitive.

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

The name of the server.

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

The name of the virtual network rule.

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

The ARM resource id of the virtual network subnet.

Functions

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