We recommend using Azure Native.
azure.mssql.FailoverGroup
Explore with Pulumi AI
Manages a Microsoft Azure SQL Failover Group.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "database-rg",
location: "West Europe",
});
const primary = new azure.mssql.Server("primary", {
name: "mssqlserver-primary",
resourceGroupName: example.name,
location: example.location,
version: "12.0",
administratorLogin: "missadministrator",
administratorLoginPassword: "thisIsKat11",
});
const secondary = new azure.mssql.Server("secondary", {
name: "mssqlserver-secondary",
resourceGroupName: example.name,
location: "North Europe",
version: "12.0",
administratorLogin: "missadministrator",
administratorLoginPassword: "thisIsKat12",
});
const exampleDatabase = new azure.mssql.Database("example", {
name: "exampledb",
serverId: primary.id,
skuName: "S1",
collation: "SQL_Latin1_General_CP1_CI_AS",
maxSizeGb: 200,
});
const exampleFailoverGroup = new azure.mssql.FailoverGroup("example", {
name: "example",
serverId: primary.id,
databases: [exampleDatabase.id],
partnerServers: [{
id: secondary.id,
}],
readWriteEndpointFailoverPolicy: {
mode: "Automatic",
graceMinutes: 80,
},
tags: {
environment: "prod",
database: "example",
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="database-rg",
location="West Europe")
primary = azure.mssql.Server("primary",
name="mssqlserver-primary",
resource_group_name=example.name,
location=example.location,
version="12.0",
administrator_login="missadministrator",
administrator_login_password="thisIsKat11")
secondary = azure.mssql.Server("secondary",
name="mssqlserver-secondary",
resource_group_name=example.name,
location="North Europe",
version="12.0",
administrator_login="missadministrator",
administrator_login_password="thisIsKat12")
example_database = azure.mssql.Database("example",
name="exampledb",
server_id=primary.id,
sku_name="S1",
collation="SQL_Latin1_General_CP1_CI_AS",
max_size_gb=200)
example_failover_group = azure.mssql.FailoverGroup("example",
name="example",
server_id=primary.id,
databases=[example_database.id],
partner_servers=[{
"id": secondary.id,
}],
read_write_endpoint_failover_policy={
"mode": "Automatic",
"grace_minutes": 80,
},
tags={
"environment": "prod",
"database": "example",
})
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("database-rg"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
primary, err := mssql.NewServer(ctx, "primary", &mssql.ServerArgs{
Name: pulumi.String("mssqlserver-primary"),
ResourceGroupName: example.Name,
Location: example.Location,
Version: pulumi.String("12.0"),
AdministratorLogin: pulumi.String("missadministrator"),
AdministratorLoginPassword: pulumi.String("thisIsKat11"),
})
if err != nil {
return err
}
secondary, err := mssql.NewServer(ctx, "secondary", &mssql.ServerArgs{
Name: pulumi.String("mssqlserver-secondary"),
ResourceGroupName: example.Name,
Location: pulumi.String("North Europe"),
Version: pulumi.String("12.0"),
AdministratorLogin: pulumi.String("missadministrator"),
AdministratorLoginPassword: pulumi.String("thisIsKat12"),
})
if err != nil {
return err
}
exampleDatabase, err := mssql.NewDatabase(ctx, "example", &mssql.DatabaseArgs{
Name: pulumi.String("exampledb"),
ServerId: primary.ID(),
SkuName: pulumi.String("S1"),
Collation: pulumi.String("SQL_Latin1_General_CP1_CI_AS"),
MaxSizeGb: pulumi.Int(200),
})
if err != nil {
return err
}
_, err = mssql.NewFailoverGroup(ctx, "example", &mssql.FailoverGroupArgs{
Name: pulumi.String("example"),
ServerId: primary.ID(),
Databases: pulumi.StringArray{
exampleDatabase.ID(),
},
PartnerServers: mssql.FailoverGroupPartnerServerArray{
&mssql.FailoverGroupPartnerServerArgs{
Id: secondary.ID(),
},
},
ReadWriteEndpointFailoverPolicy: &mssql.FailoverGroupReadWriteEndpointFailoverPolicyArgs{
Mode: pulumi.String("Automatic"),
GraceMinutes: pulumi.Int(80),
},
Tags: pulumi.StringMap{
"environment": pulumi.String("prod"),
"database": pulumi.String("example"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "database-rg",
Location = "West Europe",
});
var primary = new Azure.MSSql.Server("primary", new()
{
Name = "mssqlserver-primary",
ResourceGroupName = example.Name,
Location = example.Location,
Version = "12.0",
AdministratorLogin = "missadministrator",
AdministratorLoginPassword = "thisIsKat11",
});
var secondary = new Azure.MSSql.Server("secondary", new()
{
Name = "mssqlserver-secondary",
ResourceGroupName = example.Name,
Location = "North Europe",
Version = "12.0",
AdministratorLogin = "missadministrator",
AdministratorLoginPassword = "thisIsKat12",
});
var exampleDatabase = new Azure.MSSql.Database("example", new()
{
Name = "exampledb",
ServerId = primary.Id,
SkuName = "S1",
Collation = "SQL_Latin1_General_CP1_CI_AS",
MaxSizeGb = 200,
});
var exampleFailoverGroup = new Azure.MSSql.FailoverGroup("example", new()
{
Name = "example",
ServerId = primary.Id,
Databases = new[]
{
exampleDatabase.Id,
},
PartnerServers = new[]
{
new Azure.MSSql.Inputs.FailoverGroupPartnerServerArgs
{
Id = secondary.Id,
},
},
ReadWriteEndpointFailoverPolicy = new Azure.MSSql.Inputs.FailoverGroupReadWriteEndpointFailoverPolicyArgs
{
Mode = "Automatic",
GraceMinutes = 80,
},
Tags =
{
{ "environment", "prod" },
{ "database", "example" },
},
});
});
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.mssql.Server;
import com.pulumi.azure.mssql.ServerArgs;
import com.pulumi.azure.mssql.Database;
import com.pulumi.azure.mssql.DatabaseArgs;
import com.pulumi.azure.mssql.FailoverGroup;
import com.pulumi.azure.mssql.FailoverGroupArgs;
import com.pulumi.azure.mssql.inputs.FailoverGroupPartnerServerArgs;
import com.pulumi.azure.mssql.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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("database-rg")
.location("West Europe")
.build());
var primary = new Server("primary", ServerArgs.builder()
.name("mssqlserver-primary")
.resourceGroupName(example.name())
.location(example.location())
.version("12.0")
.administratorLogin("missadministrator")
.administratorLoginPassword("thisIsKat11")
.build());
var secondary = new Server("secondary", ServerArgs.builder()
.name("mssqlserver-secondary")
.resourceGroupName(example.name())
.location("North Europe")
.version("12.0")
.administratorLogin("missadministrator")
.administratorLoginPassword("thisIsKat12")
.build());
var exampleDatabase = new Database("exampleDatabase", DatabaseArgs.builder()
.name("exampledb")
.serverId(primary.id())
.skuName("S1")
.collation("SQL_Latin1_General_CP1_CI_AS")
.maxSizeGb("200")
.build());
var exampleFailoverGroup = new FailoverGroup("exampleFailoverGroup", FailoverGroupArgs.builder()
.name("example")
.serverId(primary.id())
.databases(exampleDatabase.id())
.partnerServers(FailoverGroupPartnerServerArgs.builder()
.id(secondary.id())
.build())
.readWriteEndpointFailoverPolicy(FailoverGroupReadWriteEndpointFailoverPolicyArgs.builder()
.mode("Automatic")
.graceMinutes(80)
.build())
.tags(Map.ofEntries(
Map.entry("environment", "prod"),
Map.entry("database", "example")
))
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: database-rg
location: West Europe
primary:
type: azure:mssql:Server
properties:
name: mssqlserver-primary
resourceGroupName: ${example.name}
location: ${example.location}
version: '12.0'
administratorLogin: missadministrator
administratorLoginPassword: thisIsKat11
secondary:
type: azure:mssql:Server
properties:
name: mssqlserver-secondary
resourceGroupName: ${example.name}
location: North Europe
version: '12.0'
administratorLogin: missadministrator
administratorLoginPassword: thisIsKat12
exampleDatabase:
type: azure:mssql:Database
name: example
properties:
name: exampledb
serverId: ${primary.id}
skuName: S1
collation: SQL_Latin1_General_CP1_CI_AS
maxSizeGb: '200'
exampleFailoverGroup:
type: azure:mssql:FailoverGroup
name: example
properties:
name: example
serverId: ${primary.id}
databases:
- ${exampleDatabase.id}
partnerServers:
- id: ${secondary.id}
readWriteEndpointFailoverPolicy:
mode: Automatic
graceMinutes: 80
tags:
environment: prod
database: example
Create FailoverGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FailoverGroup(name: string, args: FailoverGroupArgs, opts?: CustomResourceOptions);
@overload
def FailoverGroup(resource_name: str,
args: FailoverGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FailoverGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
partner_servers: Optional[Sequence[FailoverGroupPartnerServerArgs]] = None,
read_write_endpoint_failover_policy: Optional[FailoverGroupReadWriteEndpointFailoverPolicyArgs] = None,
server_id: Optional[str] = None,
databases: Optional[Sequence[str]] = None,
name: Optional[str] = None,
readonly_endpoint_failover_policy_enabled: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = 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:mssql:FailoverGroup
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 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var failoverGroupResource = new Azure.MSSql.FailoverGroup("failoverGroupResource", new()
{
PartnerServers = new[]
{
new Azure.MSSql.Inputs.FailoverGroupPartnerServerArgs
{
Id = "string",
Location = "string",
Role = "string",
},
},
ReadWriteEndpointFailoverPolicy = new Azure.MSSql.Inputs.FailoverGroupReadWriteEndpointFailoverPolicyArgs
{
Mode = "string",
GraceMinutes = 0,
},
ServerId = "string",
Databases = new[]
{
"string",
},
Name = "string",
ReadonlyEndpointFailoverPolicyEnabled = false,
Tags =
{
{ "string", "string" },
},
});
example, err := mssql.NewFailoverGroup(ctx, "failoverGroupResource", &mssql.FailoverGroupArgs{
PartnerServers: mssql.FailoverGroupPartnerServerArray{
&mssql.FailoverGroupPartnerServerArgs{
Id: pulumi.String("string"),
Location: pulumi.String("string"),
Role: pulumi.String("string"),
},
},
ReadWriteEndpointFailoverPolicy: &mssql.FailoverGroupReadWriteEndpointFailoverPolicyArgs{
Mode: pulumi.String("string"),
GraceMinutes: pulumi.Int(0),
},
ServerId: pulumi.String("string"),
Databases: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
ReadonlyEndpointFailoverPolicyEnabled: pulumi.Bool(false),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var failoverGroupResource = new FailoverGroup("failoverGroupResource", FailoverGroupArgs.builder()
.partnerServers(FailoverGroupPartnerServerArgs.builder()
.id("string")
.location("string")
.role("string")
.build())
.readWriteEndpointFailoverPolicy(FailoverGroupReadWriteEndpointFailoverPolicyArgs.builder()
.mode("string")
.graceMinutes(0)
.build())
.serverId("string")
.databases("string")
.name("string")
.readonlyEndpointFailoverPolicyEnabled(false)
.tags(Map.of("string", "string"))
.build());
failover_group_resource = azure.mssql.FailoverGroup("failoverGroupResource",
partner_servers=[{
"id": "string",
"location": "string",
"role": "string",
}],
read_write_endpoint_failover_policy={
"mode": "string",
"grace_minutes": 0,
},
server_id="string",
databases=["string"],
name="string",
readonly_endpoint_failover_policy_enabled=False,
tags={
"string": "string",
})
const failoverGroupResource = new azure.mssql.FailoverGroup("failoverGroupResource", {
partnerServers: [{
id: "string",
location: "string",
role: "string",
}],
readWriteEndpointFailoverPolicy: {
mode: "string",
graceMinutes: 0,
},
serverId: "string",
databases: ["string"],
name: "string",
readonlyEndpointFailoverPolicyEnabled: false,
tags: {
string: "string",
},
});
type: azure:mssql:FailoverGroup
properties:
databases:
- string
name: string
partnerServers:
- id: string
location: string
role: string
readWriteEndpointFailoverPolicy:
graceMinutes: 0
mode: string
readonlyEndpointFailoverPolicyEnabled: false
serverId: string
tags:
string: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The FailoverGroup resource accepts the following input properties:
- Partner
Servers List<FailoverGroup Partner Server> - A
partner_server
block as defined below. - Read
Write FailoverEndpoint Failover Policy Group Read Write Endpoint Failover Policy - A
read_write_endpoint_failover_policy
block as defined below. - Server
Id string - The ID of the primary SQL Server on which to create the failover group. Changing this forces a new resource to be created.
- Databases List<string>
- A set of database names to include in the failover group.
- Name string
- The name of the Failover Group. Changing this forces a new resource to be created.
- Readonly
Endpoint boolFailover Policy Enabled - Whether failover is enabled for the readonly endpoint. Defaults to
false
. - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Partner
Servers []FailoverGroup Partner Server Args - A
partner_server
block as defined below. - Read
Write FailoverEndpoint Failover Policy Group Read Write Endpoint Failover Policy Args - A
read_write_endpoint_failover_policy
block as defined below. - Server
Id string - The ID of the primary SQL Server on which to create the failover group. Changing this forces a new resource to be created.
- Databases []string
- A set of database names to include in the failover group.
- Name string
- The name of the Failover Group. Changing this forces a new resource to be created.
- Readonly
Endpoint boolFailover Policy Enabled - Whether failover is enabled for the readonly endpoint. Defaults to
false
. - map[string]string
- A mapping of tags to assign to the resource.
- partner
Servers List<FailoverGroup Partner Server> - A
partner_server
block as defined below. - read
Write FailoverEndpoint Failover Policy Group Read Write Endpoint Failover Policy - A
read_write_endpoint_failover_policy
block as defined below. - server
Id String - The ID of the primary SQL Server on which to create the failover group. Changing this forces a new resource to be created.
- databases List<String>
- A set of database names to include in the failover group.
- name String
- The name of the Failover Group. Changing this forces a new resource to be created.
- readonly
Endpoint BooleanFailover Policy Enabled - Whether failover is enabled for the readonly endpoint. Defaults to
false
. - Map<String,String>
- A mapping of tags to assign to the resource.
- partner
Servers FailoverGroup Partner Server[] - A
partner_server
block as defined below. - read
Write FailoverEndpoint Failover Policy Group Read Write Endpoint Failover Policy - A
read_write_endpoint_failover_policy
block as defined below. - server
Id string - The ID of the primary SQL Server on which to create the failover group. Changing this forces a new resource to be created.
- databases string[]
- A set of database names to include in the failover group.
- name string
- The name of the Failover Group. Changing this forces a new resource to be created.
- readonly
Endpoint booleanFailover Policy Enabled - Whether failover is enabled for the readonly endpoint. Defaults to
false
. - {[key: string]: string}
- A mapping of tags to assign to the resource.
- partner_
servers Sequence[FailoverGroup Partner Server Args] - A
partner_server
block as defined below. - read_
write_ Failoverendpoint_ failover_ policy Group Read Write Endpoint Failover Policy Args - A
read_write_endpoint_failover_policy
block as defined below. - server_
id str - The ID of the primary SQL Server on which to create the failover group. Changing this forces a new resource to be created.
- databases Sequence[str]
- A set of database names to include in the failover group.
- name str
- The name of the Failover Group. Changing this forces a new resource to be created.
- readonly_
endpoint_ boolfailover_ policy_ enabled - Whether failover is enabled for the readonly endpoint. Defaults to
false
. - Mapping[str, str]
- A mapping of tags to assign to the resource.
- partner
Servers List<Property Map> - A
partner_server
block as defined below. - read
Write Property MapEndpoint Failover Policy - A
read_write_endpoint_failover_policy
block as defined below. - server
Id String - The ID of the primary SQL Server on which to create the failover group. Changing this forces a new resource to be created.
- databases List<String>
- A set of database names to include in the failover group.
- name String
- The name of the Failover Group. Changing this forces a new resource to be created.
- readonly
Endpoint BooleanFailover Policy Enabled - Whether failover is enabled for the readonly endpoint. Defaults to
false
. - 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:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
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,
name: Optional[str] = None,
partner_servers: Optional[Sequence[FailoverGroupPartnerServerArgs]] = None,
read_write_endpoint_failover_policy: Optional[FailoverGroupReadWriteEndpointFailoverPolicyArgs] = None,
readonly_endpoint_failover_policy_enabled: Optional[bool] = None,
server_id: 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 set of database names to include in 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
partner_server
block as defined below. - Read
Write FailoverEndpoint Failover Policy Group Read Write Endpoint Failover Policy - A
read_write_endpoint_failover_policy
block as defined below. - Readonly
Endpoint boolFailover Policy Enabled - Whether failover is enabled for the readonly endpoint. Defaults to
false
. - Server
Id string - The ID of the primary SQL Server on which to create the failover group. Changing this forces a new resource to be created.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Databases []string
- A set of database names to include in 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
partner_server
block as defined below. - Read
Write FailoverEndpoint Failover Policy Group Read Write Endpoint Failover Policy Args - A
read_write_endpoint_failover_policy
block as defined below. - Readonly
Endpoint boolFailover Policy Enabled - Whether failover is enabled for the readonly endpoint. Defaults to
false
. - Server
Id string - The ID of the primary SQL Server on which to create the failover group. 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 set of database names to include in 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
partner_server
block as defined below. - read
Write FailoverEndpoint Failover Policy Group Read Write Endpoint Failover Policy - A
read_write_endpoint_failover_policy
block as defined below. - readonly
Endpoint BooleanFailover Policy Enabled - Whether failover is enabled for the readonly endpoint. Defaults to
false
. - server
Id String - The ID of the primary SQL Server on which to create the failover group. Changing this forces a new resource to be created.
- Map<String,String>
- A mapping of tags to assign to the resource.
- databases string[]
- A set of database names to include in 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
partner_server
block as defined below. - read
Write FailoverEndpoint Failover Policy Group Read Write Endpoint Failover Policy - A
read_write_endpoint_failover_policy
block as defined below. - readonly
Endpoint booleanFailover Policy Enabled - Whether failover is enabled for the readonly endpoint. Defaults to
false
. - server
Id string - The ID of the primary SQL Server on which to create the failover group. 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 set of database names to include in 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
partner_server
block as defined below. - read_
write_ Failoverendpoint_ failover_ policy Group Read Write Endpoint Failover Policy Args - A
read_write_endpoint_failover_policy
block as defined below. - readonly_
endpoint_ boolfailover_ policy_ enabled - Whether failover is enabled for the readonly endpoint. Defaults to
false
. - server_
id str - The ID of the primary SQL Server on which to create the failover group. 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 set of database names to include in 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
partner_server
block as defined below. - read
Write Property MapEndpoint Failover Policy - A
read_write_endpoint_failover_policy
block as defined below. - readonly
Endpoint BooleanFailover Policy Enabled - Whether failover is enabled for the readonly endpoint. Defaults to
false
. - server
Id String - The ID of the primary SQL Server on which to create the failover group. 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 policy of the read-write endpoint for the failover group. Possible values are
Automatic
orManual
. - Grace
Minutes int - The grace period in minutes, before failover with data loss is attempted for the read-write endpoint. Required when
mode
isAutomatic
.
- Mode string
- The failover policy of the read-write endpoint for the failover group. Possible values are
Automatic
orManual
. - Grace
Minutes int - The grace period in minutes, before failover with data loss is attempted for the read-write endpoint. Required when
mode
isAutomatic
.
- mode String
- The failover policy of the read-write endpoint for the failover group. Possible values are
Automatic
orManual
. - grace
Minutes Integer - The grace period in minutes, before failover with data loss is attempted for the read-write endpoint. Required when
mode
isAutomatic
.
- mode string
- The failover policy of the read-write endpoint for the failover group. Possible values are
Automatic
orManual
. - grace
Minutes number - The grace period in minutes, before failover with data loss is attempted for the read-write endpoint. Required when
mode
isAutomatic
.
- mode str
- The failover policy of the read-write endpoint for the failover group. Possible values are
Automatic
orManual
. - grace_
minutes int - The grace period in minutes, before failover with data loss is attempted for the read-write endpoint. Required when
mode
isAutomatic
.
- mode String
- The failover policy of the read-write endpoint for the failover group. Possible values are
Automatic
orManual
. - grace
Minutes Number - The grace period in minutes, before failover with data loss is attempted for the read-write endpoint. Required when
mode
isAutomatic
.
Import
Failover Groups can be imported using the resource id
, e.g.
$ pulumi import azure:mssql/failoverGroup:FailoverGroup example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1/failoverGroups/failoverGroup1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.