SingleServerVirtualNetworkRule

class SingleServerVirtualNetworkRule : KotlinCustomResource

A virtual network rule. Uses Azure REST 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 singleServerVirtualNetworkRule = new AzureNative.DBforPostgreSQL.SingleServerVirtualNetworkRule("singleServerVirtualNetworkRule", 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/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dbforpostgresql.NewSingleServerVirtualNetworkRule(ctx, "singleServerVirtualNetworkRule", &dbforpostgresql.SingleServerVirtualNetworkRuleArgs{
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.SingleServerVirtualNetworkRule;
import com.pulumi.azurenative.dbforpostgresql.SingleServerVirtualNetworkRuleArgs;
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 singleServerVirtualNetworkRule = new SingleServerVirtualNetworkRule("singleServerVirtualNetworkRule", SingleServerVirtualNetworkRuleArgs.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:SingleServerVirtualNetworkRule vnet-firewall-rule /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}

Properties

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

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

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

Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val state: Output<String>

Virtual Network Rule State

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

The ARM resource id of the virtual network subnet.