Azure Native

Pulumi Official
Package maintained by Pulumi
v1.64.1 published on Wednesday, May 18, 2022 by Pulumi

FailoverGroup

A failover group. API Version: 2020-11-01-preview.

Example Usage

Create failover group

using Pulumi;
using AzureNative = Pulumi.AzureNative;

class MyStack : Stack
{
    public MyStack()
    {
        var failoverGroup = new AzureNative.Sql.FailoverGroup("failoverGroup", new AzureNative.Sql.FailoverGroupArgs
        {
            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 = 
            {
                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/go/azure/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.PartnerInfoArray{
				&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 java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

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 a 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:

PartnerServers List<Pulumi.AzureNative.Sql.Inputs.PartnerInfoArgs>

List of partner server information for the failover group.

ReadWriteEndpoint Pulumi.AzureNative.Sql.Inputs.FailoverGroupReadWriteEndpointArgs

Read-write endpoint of the failover group instance.

ResourceGroupName string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

ServerName string

The name of the server containing the failover group.

Databases List<string>

List of databases in the failover group.

FailoverGroupName string

The name of the failover group.

ReadOnlyEndpoint Pulumi.AzureNative.Sql.Inputs.FailoverGroupReadOnlyEndpointArgs

Read-only endpoint of the failover group instance.

Tags Dictionary<string, string>

Resource tags.

PartnerServers []PartnerInfoArgs

List of partner server information for the failover group.

ReadWriteEndpoint FailoverGroupReadWriteEndpointArgs

Read-write endpoint of the failover group instance.

ResourceGroupName string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

ServerName string

The name of the server containing the failover group.

Databases []string

List of databases in the failover group.

FailoverGroupName string

The name of the failover group.

ReadOnlyEndpoint FailoverGroupReadOnlyEndpointArgs

Read-only endpoint of the failover group instance.

Tags map[string]string

Resource tags.

partnerServers ListInfoArgs>

List of partner server information for the failover group.

readWriteEndpoint FailoverGroupReadWriteEndpointArgs

Read-write endpoint of the failover group instance.

resourceGroupName String

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

serverName String

The name of the server containing the failover group.

databases List

List of databases in the failover group.

failoverGroupName String

The name of the failover group.

readOnlyEndpoint FailoverGroupReadOnlyEndpointArgs

Read-only endpoint of the failover group instance.

tags Map

Resource tags.

partnerServers PartnerInfoArgs[]

List of partner server information for the failover group.

readWriteEndpoint FailoverGroupReadWriteEndpointArgs

Read-write endpoint of the failover group instance.

resourceGroupName string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

serverName string

The name of the server containing the failover group.

databases string[]

List of databases in the failover group.

failoverGroupName string

The name of the failover group.

readOnlyEndpoint FailoverGroupReadOnlyEndpointArgs

Read-only endpoint of the failover group instance.

tags {[key: string]: string}

Resource tags.

partner_servers Sequence[PartnerInfoArgs]

List of partner server information for the failover group.

read_write_endpoint FailoverGroupReadWriteEndpointArgs

Read-write endpoint of the failover group instance.

resource_group_name str

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_name str

The name of the failover group.

read_only_endpoint FailoverGroupReadOnlyEndpointArgs

Read-only endpoint of the failover group instance.

tags Mapping[str, str]

Resource tags.

partnerServers List

List of partner server information for the failover group.

readWriteEndpoint Property Map

Read-write endpoint of the failover group instance.

resourceGroupName String

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

serverName String

The name of the server containing the failover group.

databases List

List of databases in the failover group.

failoverGroupName String

The name of the failover group.

readOnlyEndpoint Property Map

Read-only endpoint of the failover group instance.

tags Map

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.

ReplicationRole string

Local replication role of the failover group instance.

ReplicationState 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.

ReplicationRole string

Local replication role of the failover group instance.

ReplicationState 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.

replicationRole String

Local replication role of the failover group instance.

replicationState 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.

replicationRole string

Local replication role of the failover group instance.

replicationState 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.

replicationRole String

Local replication role of the failover group instance.

replicationState String

Replication state of the failover group instance.

type String

Resource type.

Supporting Types

FailoverGroupReadOnlyEndpoint

FailoverPolicy string | Pulumi.AzureNative.Sql.ReadOnlyEndpointFailoverPolicy

Failover policy of the read-only endpoint for the failover group.

FailoverPolicy string | ReadOnlyEndpointFailoverPolicy

Failover policy of the read-only endpoint for the failover group.

failoverPolicy String | ReadOnlyEndpointFailoverPolicy

Failover policy of the read-only endpoint for the failover group.

failoverPolicy string | ReadOnlyEndpointFailoverPolicy

Failover policy of the read-only endpoint for the failover group.

failover_policy str | ReadOnlyEndpointFailoverPolicy

Failover policy of the read-only endpoint for the failover group.

failoverPolicy String | "Disabled" | "Enabled"

Failover policy of the read-only endpoint for the failover group.

FailoverGroupReadOnlyEndpointResponse

FailoverPolicy string

Failover policy of the read-only endpoint for the failover group.

FailoverPolicy string

Failover policy of the read-only endpoint for the failover group.

failoverPolicy String

Failover policy of the read-only endpoint for the failover group.

failoverPolicy 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.

failoverPolicy String

Failover policy of the read-only endpoint for the failover group.

FailoverGroupReadWriteEndpoint

FailoverPolicy string | Pulumi.AzureNative.Sql.ReadWriteEndpointFailoverPolicy

Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

FailoverWithDataLossGracePeriodMinutes int

Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

FailoverPolicy string | ReadWriteEndpointFailoverPolicy

Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

FailoverWithDataLossGracePeriodMinutes int

Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

failoverPolicy String | ReadWriteEndpointFailoverPolicy

Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

failoverWithDataLossGracePeriodMinutes Integer

Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

failoverPolicy string | ReadWriteEndpointFailoverPolicy

Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

failoverWithDataLossGracePeriodMinutes number

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 | ReadWriteEndpointFailoverPolicy

Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

failover_with_data_loss_grace_period_minutes int

Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

failoverPolicy String | "Manual" | "Automatic"

Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

failoverWithDataLossGracePeriodMinutes Number

Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

FailoverGroupReadWriteEndpointResponse

FailoverPolicy string

Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

FailoverWithDataLossGracePeriodMinutes int

Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

FailoverPolicy string

Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

FailoverWithDataLossGracePeriodMinutes int

Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

failoverPolicy String

Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

failoverWithDataLossGracePeriodMinutes Integer

Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

failoverPolicy string

Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

failoverWithDataLossGracePeriodMinutes number

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_data_loss_grace_period_minutes int

Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

failoverPolicy String

Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

failoverWithDataLossGracePeriodMinutes Number

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.

ReplicationRole string

Replication role of the partner server.

Id string

Resource identifier of the partner server.

Location string

Geo location of the partner server.

ReplicationRole string

Replication role of the partner server.

id String

Resource identifier of the partner server.

location String

Geo location of the partner server.

replicationRole String

Replication role of the partner server.

id string

Resource identifier of the partner server.

location string

Geo location of the partner server.

replicationRole 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.

replicationRole String

Replication role of the partner server.

ReadOnlyEndpointFailoverPolicy

Disabled
Disabled
Enabled
Enabled
ReadOnlyEndpointFailoverPolicyDisabled
Disabled
ReadOnlyEndpointFailoverPolicyEnabled
Enabled
Disabled
Disabled
Enabled
Enabled
Disabled
Disabled
Enabled
Enabled
DISABLED
Disabled
ENABLED
Enabled
"Disabled"
Disabled
"Enabled"
Enabled

ReadWriteEndpointFailoverPolicy

Manual
Manual
Automatic
Automatic
ReadWriteEndpointFailoverPolicyManual
Manual
ReadWriteEndpointFailoverPolicyAutomatic
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
https://github.com/pulumi/pulumi-azure-native
License
Apache-2.0