We recommend using Azure Native.
azure.sql.FailoverGroup
Explore with Pulumi AI
Create a failover group of databases on a collection of Azure SQL servers.
Note: The
azure.sql.FailoverGroup
resource is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use theazure.mssql.FailoverGroup
resource instead.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
{
Location = "West Europe",
});
var primary = new Azure.Sql.SqlServer("primary", new()
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
Version = "12.0",
AdministratorLogin = "sqladmin",
AdministratorLoginPassword = "pa$$w0rd",
});
var secondary = new Azure.Sql.SqlServer("secondary", new()
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
Version = "12.0",
AdministratorLogin = "sqladmin",
AdministratorLoginPassword = "pa$$w0rd",
});
var db1 = new Azure.Sql.Database("db1", new()
{
ResourceGroupName = primary.ResourceGroupName,
Location = primary.Location,
ServerName = primary.Name,
});
var exampleFailoverGroup = new Azure.Sql.FailoverGroup("exampleFailoverGroup", new()
{
ResourceGroupName = primary.ResourceGroupName,
ServerName = primary.Name,
Databases = new[]
{
db1.Id,
},
PartnerServers = new[]
{
new Azure.Sql.Inputs.FailoverGroupPartnerServerArgs
{
Id = secondary.Id,
},
},
ReadWriteEndpointFailoverPolicy = new Azure.Sql.Inputs.FailoverGroupReadWriteEndpointFailoverPolicyArgs
{
Mode = "Automatic",
GraceMinutes = 60,
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/sql"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
primary, err := sql.NewSqlServer(ctx, "primary", &sql.SqlServerArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
Version: pulumi.String("12.0"),
AdministratorLogin: pulumi.String("sqladmin"),
AdministratorLoginPassword: pulumi.String("pa$$w0rd"),
})
if err != nil {
return err
}
secondary, err := sql.NewSqlServer(ctx, "secondary", &sql.SqlServerArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
Version: pulumi.String("12.0"),
AdministratorLogin: pulumi.String("sqladmin"),
AdministratorLoginPassword: pulumi.String("pa$$w0rd"),
})
if err != nil {
return err
}
db1, err := sql.NewDatabase(ctx, "db1", &sql.DatabaseArgs{
ResourceGroupName: primary.ResourceGroupName,
Location: primary.Location,
ServerName: primary.Name,
})
if err != nil {
return err
}
_, err = sql.NewFailoverGroup(ctx, "exampleFailoverGroup", &sql.FailoverGroupArgs{
ResourceGroupName: primary.ResourceGroupName,
ServerName: primary.Name,
Databases: pulumi.StringArray{
db1.ID(),
},
PartnerServers: sql.FailoverGroupPartnerServerArray{
&sql.FailoverGroupPartnerServerArgs{
Id: secondary.ID(),
},
},
ReadWriteEndpointFailoverPolicy: &sql.FailoverGroupReadWriteEndpointFailoverPolicyArgs{
Mode: pulumi.String("Automatic"),
GraceMinutes: pulumi.Int(60),
},
})
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.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.sql.SqlServer;
import com.pulumi.azure.sql.SqlServerArgs;
import com.pulumi.azure.sql.Database;
import com.pulumi.azure.sql.DatabaseArgs;
import com.pulumi.azure.sql.FailoverGroup;
import com.pulumi.azure.sql.FailoverGroupArgs;
import com.pulumi.azure.sql.inputs.FailoverGroupPartnerServerArgs;
import com.pulumi.azure.sql.inputs.FailoverGroupReadWriteEndpointFailoverPolicyArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var primary = new SqlServer("primary", SqlServerArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.version("12.0")
.administratorLogin("sqladmin")
.administratorLoginPassword("pa$$w0rd")
.build());
var secondary = new SqlServer("secondary", SqlServerArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.version("12.0")
.administratorLogin("sqladmin")
.administratorLoginPassword("pa$$w0rd")
.build());
var db1 = new Database("db1", DatabaseArgs.builder()
.resourceGroupName(primary.resourceGroupName())
.location(primary.location())
.serverName(primary.name())
.build());
var exampleFailoverGroup = new FailoverGroup("exampleFailoverGroup", FailoverGroupArgs.builder()
.resourceGroupName(primary.resourceGroupName())
.serverName(primary.name())
.databases(db1.id())
.partnerServers(FailoverGroupPartnerServerArgs.builder()
.id(secondary.id())
.build())
.readWriteEndpointFailoverPolicy(FailoverGroupReadWriteEndpointFailoverPolicyArgs.builder()
.mode("Automatic")
.graceMinutes(60)
.build())
.build());
}
}
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
primary = azure.sql.SqlServer("primary",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
version="12.0",
administrator_login="sqladmin",
administrator_login_password="pa$$w0rd")
secondary = azure.sql.SqlServer("secondary",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
version="12.0",
administrator_login="sqladmin",
administrator_login_password="pa$$w0rd")
db1 = azure.sql.Database("db1",
resource_group_name=primary.resource_group_name,
location=primary.location,
server_name=primary.name)
example_failover_group = azure.sql.FailoverGroup("exampleFailoverGroup",
resource_group_name=primary.resource_group_name,
server_name=primary.name,
databases=[db1.id],
partner_servers=[azure.sql.FailoverGroupPartnerServerArgs(
id=secondary.id,
)],
read_write_endpoint_failover_policy=azure.sql.FailoverGroupReadWriteEndpointFailoverPolicyArgs(
mode="Automatic",
grace_minutes=60,
))
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const primary = new azure.sql.SqlServer("primary", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
version: "12.0",
administratorLogin: "sqladmin",
administratorLoginPassword: "pa$$w0rd",
});
const secondary = new azure.sql.SqlServer("secondary", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
version: "12.0",
administratorLogin: "sqladmin",
administratorLoginPassword: "pa$$w0rd",
});
const db1 = new azure.sql.Database("db1", {
resourceGroupName: primary.resourceGroupName,
location: primary.location,
serverName: primary.name,
});
const exampleFailoverGroup = new azure.sql.FailoverGroup("exampleFailoverGroup", {
resourceGroupName: primary.resourceGroupName,
serverName: primary.name,
databases: [db1.id],
partnerServers: [{
id: secondary.id,
}],
readWriteEndpointFailoverPolicy: {
mode: "Automatic",
graceMinutes: 60,
},
});
resources:
exampleResourceGroup:
type: azure:core:ResourceGroup
properties:
location: West Europe
primary:
type: azure:sql:SqlServer
properties:
resourceGroupName: ${exampleResourceGroup.name}
location: ${exampleResourceGroup.location}
version: '12.0'
administratorLogin: sqladmin
administratorLoginPassword: pa$$w0rd
secondary:
type: azure:sql:SqlServer
properties:
resourceGroupName: ${exampleResourceGroup.name}
location: ${exampleResourceGroup.location}
version: '12.0'
administratorLogin: sqladmin
administratorLoginPassword: pa$$w0rd
db1:
type: azure:sql:Database
properties:
resourceGroupName: ${primary.resourceGroupName}
location: ${primary.location}
serverName: ${primary.name}
exampleFailoverGroup:
type: azure:sql:FailoverGroup
properties:
resourceGroupName: ${primary.resourceGroupName}
serverName: ${primary.name}
databases:
- ${db1.id}
partnerServers:
- id: ${secondary.id}
readWriteEndpointFailoverPolicy:
mode: Automatic
graceMinutes: 60
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,
name: Optional[str] = None,
partner_servers: Optional[Sequence[FailoverGroupPartnerServerArgs]] = None,
read_write_endpoint_failover_policy: Optional[FailoverGroupReadWriteEndpointFailoverPolicyArgs] = None,
readonly_endpoint_failover_policy: Optional[FailoverGroupReadonlyEndpointFailoverPolicyArgs] = 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: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<FailoverGroup Partner Server> A list of secondary servers as documented below
- Read
Write FailoverEndpoint Failover Policy Group Read Write Endpoint Failover Policy A read/write policy as documented below
- Resource
Group stringName The name of the resource group containing the SQL server Changing this forces a new resource to be created.
- Server
Name string The name of the primary SQL server. Changing this forces a new resource to be created.
- Databases List<string>
A list of database ids to add to the failover group
NOTE: The failover group will create a secondary database for each database listed in
databases
. If the secondary databases need to be managed through this provider, they should be defined as resources and a dependency added to the failover group to ensure the secondary databases are created first.- Name string
The name of the failover group. Changing this forces a new resource to be created.
- Readonly
Endpoint FailoverFailover Policy Group Readonly Endpoint Failover Policy a read-only policy as documented below
- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Partner
Servers []FailoverGroup Partner Server Args A list of secondary servers as documented below
- Read
Write FailoverEndpoint Failover Policy Group Read Write Endpoint Failover Policy Args A read/write policy as documented below
- Resource
Group stringName The name of the resource group containing the SQL server Changing this forces a new resource to be created.
- Server
Name string The name of the primary SQL server. Changing this forces a new resource to be created.
- Databases []string
A list of database ids to add to the failover group
NOTE: The failover group will create a secondary database for each database listed in
databases
. If the secondary databases need to be managed through this provider, they should be defined as resources and a dependency added to the failover group to ensure the secondary databases are created first.- Name string
The name of the failover group. Changing this forces a new resource to be created.
- Readonly
Endpoint FailoverFailover Policy Group Readonly Endpoint Failover Policy Args a read-only policy as documented below
- map[string]string
A mapping of tags to assign to the resource.
- partner
Servers List<FailoverGroup Partner Server> A list of secondary servers as documented below
- read
Write FailoverEndpoint Failover Policy Group Read Write Endpoint Failover Policy A read/write policy as documented below
- resource
Group StringName The name of the resource group containing the SQL server Changing this forces a new resource to be created.
- server
Name String The name of the primary SQL server. Changing this forces a new resource to be created.
- databases List<String>
A list of database ids to add to the failover group
NOTE: The failover group will create a secondary database for each database listed in
databases
. If the secondary databases need to be managed through this provider, they should be defined as resources and a dependency added to the failover group to ensure the secondary databases are created first.- name String
The name of the failover group. Changing this forces a new resource to be created.
- readonly
Endpoint FailoverFailover Policy Group Readonly Endpoint Failover Policy a read-only policy as documented below
- Map<String,String>
A mapping of tags to assign to the resource.
- partner
Servers FailoverGroup Partner Server[] A list of secondary servers as documented below
- read
Write FailoverEndpoint Failover Policy Group Read Write Endpoint Failover Policy A read/write policy as documented below
- resource
Group stringName The name of the resource group containing the SQL server Changing this forces a new resource to be created.
- server
Name string The name of the primary SQL server. Changing this forces a new resource to be created.
- databases string[]
A list of database ids to add to the failover group
NOTE: The failover group will create a secondary database for each database listed in
databases
. If the secondary databases need to be managed through this provider, they should be defined as resources and a dependency added to the failover group to ensure the secondary databases are created first.- name string
The name of the failover group. Changing this forces a new resource to be created.
- readonly
Endpoint FailoverFailover Policy Group Readonly Endpoint Failover Policy a read-only policy as documented below
- {[key: string]: string}
A mapping of tags to assign to the resource.
- partner_
servers Sequence[FailoverGroup Partner Server Args] A list of secondary servers as documented below
- read_
write_ Failoverendpoint_ failover_ policy Group Read Write Endpoint Failover Policy Args A read/write policy as documented below
- resource_
group_ strname The name of the resource group containing the SQL server Changing this forces a new resource to be created.
- server_
name str The name of the primary SQL server. Changing this forces a new resource to be created.
- databases Sequence[str]
A list of database ids to add to the failover group
NOTE: The failover group will create a secondary database for each database listed in
databases
. If the secondary databases need to be managed through this provider, they should be defined as resources and a dependency added to the failover group to ensure the secondary databases are created first.- name str
The name of the failover group. Changing this forces a new resource to be created.
- readonly_
endpoint_ Failoverfailover_ policy Group Readonly Endpoint Failover Policy Args a read-only policy as documented below
- Mapping[str, str]
A mapping of tags to assign to the resource.
- partner
Servers List<Property Map> A list of secondary servers as documented below
- read
Write Property MapEndpoint Failover Policy A read/write policy as documented below
- resource
Group StringName The name of the resource group containing the SQL server Changing this forces a new resource to be created.
- server
Name String The name of the primary SQL server. Changing this forces a new resource to be created.
- databases List<String>
A list of database ids to add to the failover group
NOTE: The failover group will create a secondary database for each database listed in
databases
. If the secondary databases need to be managed through this provider, they should be defined as resources and a dependency added to the failover group to ensure the secondary databases are created first.- name String
The name of the failover group. Changing this forces a new resource to be created.
- readonly
Endpoint Property MapFailover Policy a read-only policy as documented below
- Map<String>
A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the FailoverGroup resource produces the following output properties:
Look up Existing FailoverGroup Resource
Get an existing FailoverGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: FailoverGroupState, opts?: CustomResourceOptions): FailoverGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
databases: Optional[Sequence[str]] = None,
location: Optional[str] = None,
name: Optional[str] = None,
partner_servers: Optional[Sequence[FailoverGroupPartnerServerArgs]] = None,
read_write_endpoint_failover_policy: Optional[FailoverGroupReadWriteEndpointFailoverPolicyArgs] = None,
readonly_endpoint_failover_policy: Optional[FailoverGroupReadonlyEndpointFailoverPolicyArgs] = None,
resource_group_name: Optional[str] = None,
role: Optional[str] = None,
server_name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None) -> FailoverGroup
func GetFailoverGroup(ctx *Context, name string, id IDInput, state *FailoverGroupState, opts ...ResourceOption) (*FailoverGroup, error)
public static FailoverGroup Get(string name, Input<string> id, FailoverGroupState? state, CustomResourceOptions? opts = null)
public static FailoverGroup get(String name, Output<String> id, FailoverGroupState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Databases List<string>
A list of database ids to add to the failover group
NOTE: The failover group will create a secondary database for each database listed in
databases
. If the secondary databases need to be managed through this provider, they should be defined as resources and a dependency added to the failover group to ensure the secondary databases are created first.- Location string
the location of the failover group.
- Name string
The name of the failover group. Changing this forces a new resource to be created.
- Partner
Servers List<FailoverGroup Partner Server> A list of secondary servers as documented below
- Read
Write FailoverEndpoint Failover Policy Group Read Write Endpoint Failover Policy A read/write policy as documented below
- Readonly
Endpoint FailoverFailover Policy Group Readonly Endpoint Failover Policy a read-only policy as documented below
- Resource
Group stringName The name of the resource group containing the SQL server Changing this forces a new resource to be created.
- Role string
local replication role of the failover group instance.
- Server
Name string The name of the primary SQL server. Changing this forces a new resource to be created.
- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Databases []string
A list of database ids to add to the failover group
NOTE: The failover group will create a secondary database for each database listed in
databases
. If the secondary databases need to be managed through this provider, they should be defined as resources and a dependency added to the failover group to ensure the secondary databases are created first.- Location string
the location of the failover group.
- Name string
The name of the failover group. Changing this forces a new resource to be created.
- Partner
Servers []FailoverGroup Partner Server Args A list of secondary servers as documented below
- Read
Write FailoverEndpoint Failover Policy Group Read Write Endpoint Failover Policy Args A read/write policy as documented below
- Readonly
Endpoint FailoverFailover Policy Group Readonly Endpoint Failover Policy Args a read-only policy as documented below
- Resource
Group stringName The name of the resource group containing the SQL server Changing this forces a new resource to be created.
- Role string
local replication role of the failover group instance.
- Server
Name string The name of the primary SQL server. Changing this forces a new resource to be created.
- map[string]string
A mapping of tags to assign to the resource.
- databases List<String>
A list of database ids to add to the failover group
NOTE: The failover group will create a secondary database for each database listed in
databases
. If the secondary databases need to be managed through this provider, they should be defined as resources and a dependency added to the failover group to ensure the secondary databases are created first.- location String
the location of the failover group.
- name String
The name of the failover group. Changing this forces a new resource to be created.
- partner
Servers List<FailoverGroup Partner Server> A list of secondary servers as documented below
- read
Write FailoverEndpoint Failover Policy Group Read Write Endpoint Failover Policy A read/write policy as documented below
- readonly
Endpoint FailoverFailover Policy Group Readonly Endpoint Failover Policy a read-only policy as documented below
- resource
Group StringName The name of the resource group containing the SQL server Changing this forces a new resource to be created.
- role String
local replication role of the failover group instance.
- server
Name String The name of the primary SQL server. Changing this forces a new resource to be created.
- Map<String,String>
A mapping of tags to assign to the resource.
- databases string[]
A list of database ids to add to the failover group
NOTE: The failover group will create a secondary database for each database listed in
databases
. If the secondary databases need to be managed through this provider, they should be defined as resources and a dependency added to the failover group to ensure the secondary databases are created first.- location string
the location of the failover group.
- name string
The name of the failover group. Changing this forces a new resource to be created.
- partner
Servers FailoverGroup Partner Server[] A list of secondary servers as documented below
- read
Write FailoverEndpoint Failover Policy Group Read Write Endpoint Failover Policy A read/write policy as documented below
- readonly
Endpoint FailoverFailover Policy Group Readonly Endpoint Failover Policy a read-only policy as documented below
- resource
Group stringName The name of the resource group containing the SQL server Changing this forces a new resource to be created.
- role string
local replication role of the failover group instance.
- server
Name string The name of the primary SQL server. Changing this forces a new resource to be created.
- {[key: string]: string}
A mapping of tags to assign to the resource.
- databases Sequence[str]
A list of database ids to add to the failover group
NOTE: The failover group will create a secondary database for each database listed in
databases
. If the secondary databases need to be managed through this provider, they should be defined as resources and a dependency added to the failover group to ensure the secondary databases are created first.- location str
the location of the failover group.
- name str
The name of the failover group. Changing this forces a new resource to be created.
- partner_
servers Sequence[FailoverGroup Partner Server Args] A list of secondary servers as documented below
- read_
write_ Failoverendpoint_ failover_ policy Group Read Write Endpoint Failover Policy Args A read/write policy as documented below
- readonly_
endpoint_ Failoverfailover_ policy Group Readonly Endpoint Failover Policy Args a read-only policy as documented below
- resource_
group_ strname The name of the resource group containing the SQL server Changing this forces a new resource to be created.
- role str
local replication role of the failover group instance.
- server_
name str The name of the primary SQL server. Changing this forces a new resource to be created.
- Mapping[str, str]
A mapping of tags to assign to the resource.
- databases List<String>
A list of database ids to add to the failover group
NOTE: The failover group will create a secondary database for each database listed in
databases
. If the secondary databases need to be managed through this provider, they should be defined as resources and a dependency added to the failover group to ensure the secondary databases are created first.- location String
the location of the failover group.
- name String
The name of the failover group. Changing this forces a new resource to be created.
- partner
Servers List<Property Map> A list of secondary servers as documented below
- read
Write Property MapEndpoint Failover Policy A read/write policy as documented below
- readonly
Endpoint Property MapFailover Policy a read-only policy as documented below
- resource
Group StringName The name of the resource group containing the SQL server Changing this forces a new resource to be created.
- role String
local replication role of the failover group instance.
- server
Name String The name of the primary SQL server. Changing this forces a new resource to be created.
- Map<String>
A mapping of tags to assign to the resource.
Supporting Types
FailoverGroupPartnerServer, FailoverGroupPartnerServerArgs
FailoverGroupReadWriteEndpointFailoverPolicy, FailoverGroupReadWriteEndpointFailoverPolicyArgs
- Mode string
the failover mode. Possible values are
Manual
,Automatic
- Grace
Minutes int Applies only if
mode
isAutomatic
. The grace period in minutes before failover with data loss is attempted
- Mode string
the failover mode. Possible values are
Manual
,Automatic
- Grace
Minutes int Applies only if
mode
isAutomatic
. The grace period in minutes before failover with data loss is attempted
- mode String
the failover mode. Possible values are
Manual
,Automatic
- grace
Minutes Integer Applies only if
mode
isAutomatic
. The grace period in minutes before failover with data loss is attempted
- mode string
the failover mode. Possible values are
Manual
,Automatic
- grace
Minutes number Applies only if
mode
isAutomatic
. The grace period in minutes before failover with data loss is attempted
- mode str
the failover mode. Possible values are
Manual
,Automatic
- grace_
minutes int Applies only if
mode
isAutomatic
. The grace period in minutes before failover with data loss is attempted
- mode String
the failover mode. Possible values are
Manual
,Automatic
- grace
Minutes Number Applies only if
mode
isAutomatic
. The grace period in minutes before failover with data loss is attempted
FailoverGroupReadonlyEndpointFailoverPolicy, FailoverGroupReadonlyEndpointFailoverPolicyArgs
- Mode string
Failover policy for the read-only endpoint. Possible values are
Enabled
, andDisabled
- Mode string
Failover policy for the read-only endpoint. Possible values are
Enabled
, andDisabled
- mode String
Failover policy for the read-only endpoint. Possible values are
Enabled
, andDisabled
- mode string
Failover policy for the read-only endpoint. Possible values are
Enabled
, andDisabled
- mode str
Failover policy for the read-only endpoint. Possible values are
Enabled
, andDisabled
- mode String
Failover policy for the read-only endpoint. Possible values are
Enabled
, andDisabled
Import
SQL Failover Groups can be imported using the resource id
, e.g.
$ pulumi import azure:sql/failoverGroup:FailoverGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/servers/myserver/failoverGroups/group1
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.