azure-native.dbforpostgresql.VirtualNetworkRule
Explore with Pulumi AI
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 pulumi
import pulumi_azure_native as azure_native
virtual_network_rule = azure_native.dbforpostgresql.VirtualNetworkRule("virtualNetworkRule",
ignore_missing_vnet_service_endpoint=False,
resource_group_name="TestGroup",
server_name="vnet-test-svr",
virtual_network_rule_name="vnet-firewall-rule",
virtual_network_subnet_id="/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualNetworkRule = new azure_native.dbforpostgresql.VirtualNetworkRule("virtualNetworkRule", {
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",
});
resources:
virtualNetworkRule:
type: azure-native:dbforpostgresql:VirtualNetworkRule
properties:
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
Create VirtualNetworkRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VirtualNetworkRule(name: string, args: VirtualNetworkRuleArgs, opts?: CustomResourceOptions);
@overload
def VirtualNetworkRule(resource_name: str,
args: VirtualNetworkRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VirtualNetworkRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_name: Optional[str] = None,
server_name: Optional[str] = None,
virtual_network_subnet_id: Optional[str] = None,
ignore_missing_vnet_service_endpoint: Optional[bool] = None,
virtual_network_rule_name: Optional[str] = None)
func NewVirtualNetworkRule(ctx *Context, name string, args VirtualNetworkRuleArgs, opts ...ResourceOption) (*VirtualNetworkRule, error)
public VirtualNetworkRule(string name, VirtualNetworkRuleArgs args, CustomResourceOptions? opts = null)
public VirtualNetworkRule(String name, VirtualNetworkRuleArgs args)
public VirtualNetworkRule(String name, VirtualNetworkRuleArgs args, CustomResourceOptions options)
type: azure-native:dbforpostgresql:VirtualNetworkRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args VirtualNetworkRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args VirtualNetworkRuleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args VirtualNetworkRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VirtualNetworkRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VirtualNetworkRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var examplevirtualNetworkRuleResourceResourceFromDbforpostgresql = new AzureNative.Dbforpostgresql.VirtualNetworkRule("examplevirtualNetworkRuleResourceResourceFromDbforpostgresql", new()
{
ResourceGroupName = "string",
ServerName = "string",
VirtualNetworkSubnetId = "string",
IgnoreMissingVnetServiceEndpoint = false,
VirtualNetworkRuleName = "string",
});
example, err := dbforpostgresql.NewVirtualNetworkRule(ctx, "examplevirtualNetworkRuleResourceResourceFromDbforpostgresql", &dbforpostgresql.VirtualNetworkRuleArgs{
ResourceGroupName: "string",
ServerName: "string",
VirtualNetworkSubnetId: "string",
IgnoreMissingVnetServiceEndpoint: false,
VirtualNetworkRuleName: "string",
})
var examplevirtualNetworkRuleResourceResourceFromDbforpostgresql = new VirtualNetworkRule("examplevirtualNetworkRuleResourceResourceFromDbforpostgresql", VirtualNetworkRuleArgs.builder()
.resourceGroupName("string")
.serverName("string")
.virtualNetworkSubnetId("string")
.ignoreMissingVnetServiceEndpoint(false)
.virtualNetworkRuleName("string")
.build());
examplevirtual_network_rule_resource_resource_from_dbforpostgresql = azure_native.dbforpostgresql.VirtualNetworkRule("examplevirtualNetworkRuleResourceResourceFromDbforpostgresql",
resource_group_name=string,
server_name=string,
virtual_network_subnet_id=string,
ignore_missing_vnet_service_endpoint=False,
virtual_network_rule_name=string)
const examplevirtualNetworkRuleResourceResourceFromDbforpostgresql = new azure_native.dbforpostgresql.VirtualNetworkRule("examplevirtualNetworkRuleResourceResourceFromDbforpostgresql", {
resourceGroupName: "string",
serverName: "string",
virtualNetworkSubnetId: "string",
ignoreMissingVnetServiceEndpoint: false,
virtualNetworkRuleName: "string",
});
type: azure-native:dbforpostgresql:VirtualNetworkRule
properties:
ignoreMissingVnetServiceEndpoint: false
resourceGroupName: string
serverName: string
virtualNetworkRuleName: string
virtualNetworkSubnetId: string
VirtualNetworkRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The VirtualNetworkRule resource accepts the following input properties:
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Server
Name string - The name of the server.
- Virtual
Network stringSubnet Id - The ARM resource id of the virtual network subnet.
- Ignore
Missing boolVnet Service Endpoint - Create firewall rule before the virtual network has vnet service endpoint enabled.
- Virtual
Network stringRule Name - The name of the virtual network rule.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Server
Name string - The name of the server.
- Virtual
Network stringSubnet Id - The ARM resource id of the virtual network subnet.
- Ignore
Missing boolVnet Service Endpoint - Create firewall rule before the virtual network has vnet service endpoint enabled.
- Virtual
Network stringRule Name - The name of the virtual network rule.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- server
Name String - The name of the server.
- virtual
Network StringSubnet Id - The ARM resource id of the virtual network subnet.
- ignore
Missing BooleanVnet Service Endpoint - Create firewall rule before the virtual network has vnet service endpoint enabled.
- virtual
Network StringRule Name - The name of the virtual network rule.
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- server
Name string - The name of the server.
- virtual
Network stringSubnet Id - The ARM resource id of the virtual network subnet.
- ignore
Missing booleanVnet Service Endpoint - Create firewall rule before the virtual network has vnet service endpoint enabled.
- virtual
Network stringRule Name - The name of the virtual network rule.
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- server_
name str - The name of the server.
- virtual_
network_ strsubnet_ id - The ARM resource id of the virtual network subnet.
- ignore_
missing_ boolvnet_ service_ endpoint - Create firewall rule before the virtual network has vnet service endpoint enabled.
- virtual_
network_ strrule_ name - The name of the virtual network rule.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- server
Name String - The name of the server.
- virtual
Network StringSubnet Id - The ARM resource id of the virtual network subnet.
- ignore
Missing BooleanVnet Service Endpoint - Create firewall rule before the virtual network has vnet service endpoint enabled.
- virtual
Network StringRule Name - The name of the virtual network rule.
Outputs
All input properties are implicitly available as output properties. Additionally, the VirtualNetworkRule resource produces the following output properties:
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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0