1. Packages
  2. Azure Classic
  3. API Docs
  4. sql
  5. FailoverGroup

We recommend using Azure Native.

Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi

azure.sql.FailoverGroup

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi

    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 the azure.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:

    PartnerServers List<FailoverGroupPartnerServer>

    A list of secondary servers as documented below

    ReadWriteEndpointFailoverPolicy FailoverGroupReadWriteEndpointFailoverPolicy

    A read/write policy as documented below

    ResourceGroupName string

    The name of the resource group containing the SQL server Changing this forces a new resource to be created.

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

    ReadonlyEndpointFailoverPolicy FailoverGroupReadonlyEndpointFailoverPolicy

    a read-only policy as documented below

    Tags Dictionary<string, string>

    A mapping of tags to assign to the resource.

    PartnerServers []FailoverGroupPartnerServerArgs

    A list of secondary servers as documented below

    ReadWriteEndpointFailoverPolicy FailoverGroupReadWriteEndpointFailoverPolicyArgs

    A read/write policy as documented below

    ResourceGroupName string

    The name of the resource group containing the SQL server Changing this forces a new resource to be created.

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

    ReadonlyEndpointFailoverPolicy FailoverGroupReadonlyEndpointFailoverPolicyArgs

    a read-only policy as documented below

    Tags map[string]string

    A mapping of tags to assign to the resource.

    partnerServers List<FailoverGroupPartnerServer>

    A list of secondary servers as documented below

    readWriteEndpointFailoverPolicy FailoverGroupReadWriteEndpointFailoverPolicy

    A read/write policy as documented below

    resourceGroupName String

    The name of the resource group containing the SQL server Changing this forces a new resource to be created.

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

    readonlyEndpointFailoverPolicy FailoverGroupReadonlyEndpointFailoverPolicy

    a read-only policy as documented below

    tags Map<String,String>

    A mapping of tags to assign to the resource.

    partnerServers FailoverGroupPartnerServer[]

    A list of secondary servers as documented below

    readWriteEndpointFailoverPolicy FailoverGroupReadWriteEndpointFailoverPolicy

    A read/write policy as documented below

    resourceGroupName string

    The name of the resource group containing the SQL server Changing this forces a new resource to be created.

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

    readonlyEndpointFailoverPolicy FailoverGroupReadonlyEndpointFailoverPolicy

    a read-only policy as documented below

    tags {[key: string]: string}

    A mapping of tags to assign to the resource.

    partner_servers Sequence[FailoverGroupPartnerServerArgs]

    A list of secondary servers as documented below

    read_write_endpoint_failover_policy FailoverGroupReadWriteEndpointFailoverPolicyArgs

    A read/write policy as documented below

    resource_group_name str

    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_failover_policy FailoverGroupReadonlyEndpointFailoverPolicyArgs

    a read-only policy as documented below

    tags Mapping[str, str]

    A mapping of tags to assign to the resource.

    partnerServers List<Property Map>

    A list of secondary servers as documented below

    readWriteEndpointFailoverPolicy Property Map

    A read/write policy as documented below

    resourceGroupName String

    The name of the resource group containing the SQL server Changing this forces a new resource to be created.

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

    readonlyEndpointFailoverPolicy Property Map

    a read-only policy as documented below

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

    Location string

    the location of the failover group.

    Role string

    local replication role of the failover group instance.

    Id string

    The provider-assigned unique ID for this managed resource.

    Location string

    the location of the failover group.

    Role string

    local replication role of the failover group instance.

    id String

    The provider-assigned unique ID for this managed resource.

    location String

    the location of the failover group.

    role String

    local replication role of the failover group instance.

    id string

    The provider-assigned unique ID for this managed resource.

    location string

    the location of the failover group.

    role string

    local replication role of the failover group instance.

    id str

    The provider-assigned unique ID for this managed resource.

    location str

    the location of the failover group.

    role str

    local replication role of the failover group instance.

    id String

    The provider-assigned unique ID for this managed resource.

    location String

    the location of the failover group.

    role String

    local replication role of the failover group instance.

    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.
    The following state arguments are supported:
    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.

    PartnerServers List<FailoverGroupPartnerServer>

    A list of secondary servers as documented below

    ReadWriteEndpointFailoverPolicy FailoverGroupReadWriteEndpointFailoverPolicy

    A read/write policy as documented below

    ReadonlyEndpointFailoverPolicy FailoverGroupReadonlyEndpointFailoverPolicy

    a read-only policy as documented below

    ResourceGroupName string

    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.

    ServerName string

    The name of the primary SQL server. Changing this forces a new resource to be created.

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

    PartnerServers []FailoverGroupPartnerServerArgs

    A list of secondary servers as documented below

    ReadWriteEndpointFailoverPolicy FailoverGroupReadWriteEndpointFailoverPolicyArgs

    A read/write policy as documented below

    ReadonlyEndpointFailoverPolicy FailoverGroupReadonlyEndpointFailoverPolicyArgs

    a read-only policy as documented below

    ResourceGroupName string

    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.

    ServerName string

    The name of the primary SQL server. Changing this forces a new resource to be created.

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

    partnerServers List<FailoverGroupPartnerServer>

    A list of secondary servers as documented below

    readWriteEndpointFailoverPolicy FailoverGroupReadWriteEndpointFailoverPolicy

    A read/write policy as documented below

    readonlyEndpointFailoverPolicy FailoverGroupReadonlyEndpointFailoverPolicy

    a read-only policy as documented below

    resourceGroupName String

    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.

    serverName String

    The name of the primary SQL server. Changing this forces a new resource to be created.

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

    partnerServers FailoverGroupPartnerServer[]

    A list of secondary servers as documented below

    readWriteEndpointFailoverPolicy FailoverGroupReadWriteEndpointFailoverPolicy

    A read/write policy as documented below

    readonlyEndpointFailoverPolicy FailoverGroupReadonlyEndpointFailoverPolicy

    a read-only policy as documented below

    resourceGroupName string

    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.

    serverName string

    The name of the primary SQL server. Changing this forces a new resource to be created.

    tags {[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[FailoverGroupPartnerServerArgs]

    A list of secondary servers as documented below

    read_write_endpoint_failover_policy FailoverGroupReadWriteEndpointFailoverPolicyArgs

    A read/write policy as documented below

    readonly_endpoint_failover_policy FailoverGroupReadonlyEndpointFailoverPolicyArgs

    a read-only policy as documented below

    resource_group_name str

    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.

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

    partnerServers List<Property Map>

    A list of secondary servers as documented below

    readWriteEndpointFailoverPolicy Property Map

    A read/write policy as documented below

    readonlyEndpointFailoverPolicy Property Map

    a read-only policy as documented below

    resourceGroupName String

    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.

    serverName String

    The name of the primary SQL server. Changing this forces a new resource to be created.

    tags Map<String>

    A mapping of tags to assign to the resource.

    Supporting Types

    FailoverGroupPartnerServer, FailoverGroupPartnerServerArgs

    Id string

    the SQL server ID

    Location string

    the location of the failover group.

    Role string

    local replication role of the failover group instance.

    Id string

    the SQL server ID

    Location string

    the location of the failover group.

    Role string

    local replication role of the failover group instance.

    id String

    the SQL server ID

    location String

    the location of the failover group.

    role String

    local replication role of the failover group instance.

    id string

    the SQL server ID

    location string

    the location of the failover group.

    role string

    local replication role of the failover group instance.

    id str

    the SQL server ID

    location str

    the location of the failover group.

    role str

    local replication role of the failover group instance.

    id String

    the SQL server ID

    location String

    the location of the failover group.

    role String

    local replication role of the failover group instance.

    FailoverGroupReadWriteEndpointFailoverPolicy, FailoverGroupReadWriteEndpointFailoverPolicyArgs

    Mode string

    the failover mode. Possible values are Manual, Automatic

    GraceMinutes int

    Applies only if mode is Automatic. The grace period in minutes before failover with data loss is attempted

    Mode string

    the failover mode. Possible values are Manual, Automatic

    GraceMinutes int

    Applies only if mode is Automatic. The grace period in minutes before failover with data loss is attempted

    mode String

    the failover mode. Possible values are Manual, Automatic

    graceMinutes Integer

    Applies only if mode is Automatic. The grace period in minutes before failover with data loss is attempted

    mode string

    the failover mode. Possible values are Manual, Automatic

    graceMinutes number

    Applies only if mode is Automatic. 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 is Automatic. The grace period in minutes before failover with data loss is attempted

    mode String

    the failover mode. Possible values are Manual, Automatic

    graceMinutes Number

    Applies only if mode is Automatic. 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, and Disabled

    Mode string

    Failover policy for the read-only endpoint. Possible values are Enabled, and Disabled

    mode String

    Failover policy for the read-only endpoint. Possible values are Enabled, and Disabled

    mode string

    Failover policy for the read-only endpoint. Possible values are Enabled, and Disabled

    mode str

    Failover policy for the read-only endpoint. Possible values are Enabled, and Disabled

    mode String

    Failover policy for the read-only endpoint. Possible values are Enabled, and Disabled

    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.

    azure logo

    We recommend using Azure Native.

    Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi