azure-native.sql.FailoverGroup
Explore with Pulumi AI
A failover group. API Version: 2020-11-01-preview.
Example Usage
Create failover group
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var failoverGroup = new AzureNative.Sql.FailoverGroup("failoverGroup", new()
{
Databases = new[]
{
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1",
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2",
},
FailoverGroupName = "failover-group-test-3",
PartnerServers = new[]
{
new AzureNative.Sql.Inputs.PartnerInfoArgs
{
Id = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server",
},
},
ReadOnlyEndpoint = new AzureNative.Sql.Inputs.FailoverGroupReadOnlyEndpointArgs
{
FailoverPolicy = "Disabled",
},
ReadWriteEndpoint = new AzureNative.Sql.Inputs.FailoverGroupReadWriteEndpointArgs
{
FailoverPolicy = "Automatic",
FailoverWithDataLossGracePeriodMinutes = 480,
},
ResourceGroupName = "Default",
ServerName = "failover-group-primary-server",
});
});
package main
import (
sql "github.com/pulumi/pulumi-azure-native-sdk/sql"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sql.NewFailoverGroup(ctx, "failoverGroup", &sql.FailoverGroupArgs{
Databases: pulumi.StringArray{
pulumi.String("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1"),
pulumi.String("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2"),
},
FailoverGroupName: pulumi.String("failover-group-test-3"),
PartnerServers: []sql.PartnerInfoArgs{
{
Id: pulumi.String("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"),
},
},
ReadOnlyEndpoint: &sql.FailoverGroupReadOnlyEndpointArgs{
FailoverPolicy: pulumi.String("Disabled"),
},
ReadWriteEndpoint: &sql.FailoverGroupReadWriteEndpointArgs{
FailoverPolicy: pulumi.String("Automatic"),
FailoverWithDataLossGracePeriodMinutes: pulumi.Int(480),
},
ResourceGroupName: pulumi.String("Default"),
ServerName: pulumi.String("failover-group-primary-server"),
})
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.sql.FailoverGroup;
import com.pulumi.azurenative.sql.FailoverGroupArgs;
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 failoverGroup = new FailoverGroup("failoverGroup", FailoverGroupArgs.builder()
.databases(
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1",
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2")
.failoverGroupName("failover-group-test-3")
.partnerServers(Map.of("id", "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"))
.readOnlyEndpoint(Map.of("failoverPolicy", "Disabled"))
.readWriteEndpoint(Map.ofEntries(
Map.entry("failoverPolicy", "Automatic"),
Map.entry("failoverWithDataLossGracePeriodMinutes", 480)
))
.resourceGroupName("Default")
.serverName("failover-group-primary-server")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
failover_group = azure_native.sql.FailoverGroup("failoverGroup",
databases=[
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1",
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2",
],
failover_group_name="failover-group-test-3",
partner_servers=[azure_native.sql.PartnerInfoArgs(
id="/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server",
)],
read_only_endpoint=azure_native.sql.FailoverGroupReadOnlyEndpointArgs(
failover_policy="Disabled",
),
read_write_endpoint=azure_native.sql.FailoverGroupReadWriteEndpointArgs(
failover_policy="Automatic",
failover_with_data_loss_grace_period_minutes=480,
),
resource_group_name="Default",
server_name="failover-group-primary-server")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const failoverGroup = new azure_native.sql.FailoverGroup("failoverGroup", {
databases: [
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1",
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2",
],
failoverGroupName: "failover-group-test-3",
partnerServers: [{
id: "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server",
}],
readOnlyEndpoint: {
failoverPolicy: "Disabled",
},
readWriteEndpoint: {
failoverPolicy: "Automatic",
failoverWithDataLossGracePeriodMinutes: 480,
},
resourceGroupName: "Default",
serverName: "failover-group-primary-server",
});
resources:
failoverGroup:
type: azure-native:sql:FailoverGroup
properties:
databases:
- /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1
- /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2
failoverGroupName: failover-group-test-3
partnerServers:
- id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server
readOnlyEndpoint:
failoverPolicy: Disabled
readWriteEndpoint:
failoverPolicy: Automatic
failoverWithDataLossGracePeriodMinutes: 480
resourceGroupName: Default
serverName: failover-group-primary-server
Create FailoverGroup Resource
new FailoverGroup(name: string, args: FailoverGroupArgs, opts?: CustomResourceOptions);
@overload
def FailoverGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
databases: Optional[Sequence[str]] = None,
failover_group_name: Optional[str] = None,
partner_servers: Optional[Sequence[PartnerInfoArgs]] = None,
read_only_endpoint: Optional[FailoverGroupReadOnlyEndpointArgs] = None,
read_write_endpoint: Optional[FailoverGroupReadWriteEndpointArgs] = None,
resource_group_name: Optional[str] = None,
server_name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
@overload
def FailoverGroup(resource_name: str,
args: FailoverGroupArgs,
opts: Optional[ResourceOptions] = None)
func NewFailoverGroup(ctx *Context, name string, args FailoverGroupArgs, opts ...ResourceOption) (*FailoverGroup, error)
public FailoverGroup(string name, FailoverGroupArgs args, CustomResourceOptions? opts = null)
public FailoverGroup(String name, FailoverGroupArgs args)
public FailoverGroup(String name, FailoverGroupArgs args, CustomResourceOptions options)
type: azure-native:sql:FailoverGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FailoverGroupArgs
- 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 FailoverGroupArgs
- 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 FailoverGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FailoverGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FailoverGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
FailoverGroup 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 FailoverGroup resource accepts the following input properties:
- Partner
Servers List<Pulumi.Azure Native. Sql. Inputs. Partner Info Args> List of partner server information for the failover group.
- Read
Write Pulumi.Endpoint Azure Native. Sql. Inputs. Failover Group Read Write Endpoint Args Read-write endpoint of the failover group instance.
- Resource
Group stringName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- Server
Name string The name of the server containing the failover group.
- Databases List<string>
List of databases in the failover group.
- Failover
Group stringName The name of the failover group.
- Read
Only Pulumi.Endpoint Azure Native. Sql. Inputs. Failover Group Read Only Endpoint Args Read-only endpoint of the failover group instance.
- Dictionary<string, string>
Resource tags.
- Partner
Servers []PartnerInfo Args List of partner server information for the failover group.
- Read
Write FailoverEndpoint Group Read Write Endpoint Args Read-write endpoint of the failover group instance.
- Resource
Group stringName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- Server
Name string The name of the server containing the failover group.
- Databases []string
List of databases in the failover group.
- Failover
Group stringName The name of the failover group.
- Read
Only FailoverEndpoint Group Read Only Endpoint Args Read-only endpoint of the failover group instance.
- map[string]string
Resource tags.
- partner
Servers List<PartnerInfo Args> List of partner server information for the failover group.
- read
Write FailoverEndpoint Group Read Write Endpoint Args Read-write endpoint of the failover group instance.
- resource
Group StringName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- server
Name String The name of the server containing the failover group.
- databases List<String>
List of databases in the failover group.
- failover
Group StringName The name of the failover group.
- read
Only FailoverEndpoint Group Read Only Endpoint Args Read-only endpoint of the failover group instance.
- Map<String,String>
Resource tags.
- partner
Servers PartnerInfo Args[] List of partner server information for the failover group.
- read
Write FailoverEndpoint Group Read Write Endpoint Args Read-write endpoint of the failover group instance.
- resource
Group stringName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- server
Name string The name of the server containing the failover group.
- databases string[]
List of databases in the failover group.
- failover
Group stringName The name of the failover group.
- read
Only FailoverEndpoint Group Read Only Endpoint Args Read-only endpoint of the failover group instance.
- {[key: string]: string}
Resource tags.
- partner_
servers Sequence[PartnerInfo Args] List of partner server information for the failover group.
- read_
write_ Failoverendpoint Group Read Write Endpoint Args Read-write endpoint of the failover group instance.
- resource_
group_ strname The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- server_
name str The name of the server containing the failover group.
- databases Sequence[str]
List of databases in the failover group.
- failover_
group_ strname The name of the failover group.
- read_
only_ Failoverendpoint Group Read Only Endpoint Args Read-only endpoint of the failover group instance.
- Mapping[str, str]
Resource tags.
- partner
Servers List<Property Map> List of partner server information for the failover group.
- read
Write Property MapEndpoint Read-write endpoint of the failover group instance.
- resource
Group StringName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- server
Name String The name of the server containing the failover group.
- databases List<String>
List of databases in the failover group.
- failover
Group StringName The name of the failover group.
- read
Only Property MapEndpoint Read-only endpoint of the failover group instance.
- Map<String>
Resource tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the FailoverGroup resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Location string
Resource location.
- Name string
Resource name.
- Replication
Role string Local replication role of the failover group instance.
- Replication
State string Replication state of the failover group instance.
- Type string
Resource type.
- Id string
The provider-assigned unique ID for this managed resource.
- Location string
Resource location.
- Name string
Resource name.
- Replication
Role string Local replication role of the failover group instance.
- Replication
State string Replication state of the failover group instance.
- Type string
Resource type.
- id String
The provider-assigned unique ID for this managed resource.
- location String
Resource location.
- name String
Resource name.
- replication
Role String Local replication role of the failover group instance.
- replication
State String Replication state of the failover group instance.
- type String
Resource type.
- id string
The provider-assigned unique ID for this managed resource.
- location string
Resource location.
- name string
Resource name.
- replication
Role string Local replication role of the failover group instance.
- replication
State string Replication state of the failover group instance.
- type string
Resource type.
- id str
The provider-assigned unique ID for this managed resource.
- location str
Resource location.
- name str
Resource name.
- replication_
role str Local replication role of the failover group instance.
- replication_
state str Replication state of the failover group instance.
- type str
Resource type.
- id String
The provider-assigned unique ID for this managed resource.
- location String
Resource location.
- name String
Resource name.
- replication
Role String Local replication role of the failover group instance.
- replication
State String Replication state of the failover group instance.
- type String
Resource type.
Supporting Types
FailoverGroupReadOnlyEndpoint
- Failover
Policy string | Pulumi.Azure Native. Sql. Read Only Endpoint Failover Policy Failover policy of the read-only endpoint for the failover group.
- Failover
Policy string | ReadOnly Endpoint Failover Policy Failover policy of the read-only endpoint for the failover group.
- failover
Policy String | ReadOnly Endpoint Failover Policy Failover policy of the read-only endpoint for the failover group.
- failover
Policy string | ReadOnly Endpoint Failover Policy Failover policy of the read-only endpoint for the failover group.
- failover_
policy str | ReadOnly Endpoint Failover Policy Failover policy of the read-only endpoint for the failover group.
- failover
Policy String | "Disabled" | "Enabled" Failover policy of the read-only endpoint for the failover group.
FailoverGroupReadOnlyEndpointResponse
- Failover
Policy string Failover policy of the read-only endpoint for the failover group.
- Failover
Policy string Failover policy of the read-only endpoint for the failover group.
- failover
Policy String Failover policy of the read-only endpoint for the failover group.
- failover
Policy string Failover policy of the read-only endpoint for the failover group.
- failover_
policy str Failover policy of the read-only endpoint for the failover group.
- failover
Policy String Failover policy of the read-only endpoint for the failover group.
FailoverGroupReadWriteEndpoint
- Failover
Policy string | Pulumi.Azure Native. Sql. Read Write Endpoint Failover Policy Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- Failover
With intData Loss Grace Period Minutes Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- Failover
Policy string | ReadWrite Endpoint Failover Policy Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- Failover
With intData Loss Grace Period Minutes Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- failover
Policy String | ReadWrite Endpoint Failover Policy Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- failover
With IntegerData Loss Grace Period Minutes Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- failover
Policy string | ReadWrite Endpoint Failover Policy Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- failover
With numberData Loss Grace Period Minutes Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- failover_
policy str | ReadWrite Endpoint Failover Policy Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- failover_
with_ intdata_ loss_ grace_ period_ minutes Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- failover
Policy String | "Manual" | "Automatic" Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- failover
With NumberData Loss Grace Period Minutes Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
FailoverGroupReadWriteEndpointResponse
- Failover
Policy string Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- Failover
With intData Loss Grace Period Minutes Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- Failover
Policy string Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- Failover
With intData Loss Grace Period Minutes Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- failover
Policy String Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- failover
With IntegerData Loss Grace Period Minutes Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- failover
Policy string Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- failover
With numberData Loss Grace Period Minutes Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- failover_
policy str Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- failover_
with_ intdata_ loss_ grace_ period_ minutes Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- failover
Policy String Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
- failover
With NumberData Loss Grace Period Minutes Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
PartnerInfo
- Id string
Resource identifier of the partner server.
- Id string
Resource identifier of the partner server.
- id String
Resource identifier of the partner server.
- id string
Resource identifier of the partner server.
- id str
Resource identifier of the partner server.
- id String
Resource identifier of the partner server.
PartnerInfoResponse
- Id string
Resource identifier of the partner server.
- Location string
Geo location of the partner server.
- Replication
Role string Replication role of the partner server.
- Id string
Resource identifier of the partner server.
- Location string
Geo location of the partner server.
- Replication
Role string Replication role of the partner server.
- id String
Resource identifier of the partner server.
- location String
Geo location of the partner server.
- replication
Role String Replication role of the partner server.
- id string
Resource identifier of the partner server.
- location string
Geo location of the partner server.
- replication
Role string Replication role of the partner server.
- id str
Resource identifier of the partner server.
- location str
Geo location of the partner server.
- replication_
role str Replication role of the partner server.
- id String
Resource identifier of the partner server.
- location String
Geo location of the partner server.
- replication
Role String Replication role of the partner server.
ReadOnlyEndpointFailoverPolicy
- Disabled
- Disabled
- Enabled
- Enabled
- Read
Only Endpoint Failover Policy Disabled - Disabled
- Read
Only Endpoint Failover Policy Enabled - Enabled
- Disabled
- Disabled
- Enabled
- Enabled
- Disabled
- Disabled
- Enabled
- Enabled
- DISABLED
- Disabled
- ENABLED
- Enabled
- "Disabled"
- Disabled
- "Enabled"
- Enabled
ReadWriteEndpointFailoverPolicy
- Manual
- Manual
- Automatic
- Automatic
- Read
Write Endpoint Failover Policy Manual - Manual
- Read
Write Endpoint Failover Policy Automatic - Automatic
- Manual
- Manual
- Automatic
- Automatic
- Manual
- Manual
- Automatic
- Automatic
- MANUAL
- Manual
- AUTOMATIC
- Automatic
- "Manual"
- Manual
- "Automatic"
- Automatic
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:sql:FailoverGroup failover-group-test-3 /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-3
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0