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

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

azure.sql.ManagedInstanceFailoverGroup

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

    Manages a SQL Instance Failover Group.

    Example Usage

    Note: The azure.sql.ManagedInstanceFailoverGroup resource is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the azure.mssql.ManagedInstanceFailoverGroup resource instead.

    Note: For a more complete example, see the the examples/sql-azure/managed_instance_failover_group directory within the GitHub Repository.

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "rg-example",
        location: "West Europe",
    });
    const primary = new azure.sql.ManagedInstance("primary", {
        name: "example-primary",
        resourceGroupName: primaryAzurermResourceGroup.name,
        location: primaryAzurermResourceGroup.location,
        administratorLogin: "mradministrator",
        administratorLoginPassword: "thisIsDog11",
        licenseType: "BasePrice",
        subnetId: primaryAzurermSubnet.id,
        skuName: "GP_Gen5",
        vcores: 4,
        storageSizeInGb: 32,
        tags: {
            environment: "prod",
        },
    });
    const secondary = new azure.sql.ManagedInstance("secondary", {
        name: "example-secondary",
        resourceGroupName: secondaryAzurermResourceGroup.name,
        location: secondaryAzurermResourceGroup.location,
        administratorLogin: "mradministrator",
        administratorLoginPassword: "thisIsDog11",
        licenseType: "BasePrice",
        subnetId: secondaryAzurermSubnet.id,
        skuName: "GP_Gen5",
        vcores: 4,
        storageSizeInGb: 32,
        tags: {
            environment: "prod",
        },
    });
    const exampleManagedInstanceFailoverGroup = new azure.sql.ManagedInstanceFailoverGroup("example", {
        name: "example-failover-group",
        resourceGroupName: primaryAzurermResourceGroup.name,
        location: primary.location,
        managedInstanceName: primary.name,
        partnerManagedInstanceId: secondary.id,
        readWriteEndpointFailoverPolicy: {
            mode: "Automatic",
            graceMinutes: 60,
        },
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="rg-example",
        location="West Europe")
    primary = azure.sql.ManagedInstance("primary",
        name="example-primary",
        resource_group_name=primary_azurerm_resource_group["name"],
        location=primary_azurerm_resource_group["location"],
        administrator_login="mradministrator",
        administrator_login_password="thisIsDog11",
        license_type="BasePrice",
        subnet_id=primary_azurerm_subnet["id"],
        sku_name="GP_Gen5",
        vcores=4,
        storage_size_in_gb=32,
        tags={
            "environment": "prod",
        })
    secondary = azure.sql.ManagedInstance("secondary",
        name="example-secondary",
        resource_group_name=secondary_azurerm_resource_group["name"],
        location=secondary_azurerm_resource_group["location"],
        administrator_login="mradministrator",
        administrator_login_password="thisIsDog11",
        license_type="BasePrice",
        subnet_id=secondary_azurerm_subnet["id"],
        sku_name="GP_Gen5",
        vcores=4,
        storage_size_in_gb=32,
        tags={
            "environment": "prod",
        })
    example_managed_instance_failover_group = azure.sql.ManagedInstanceFailoverGroup("example",
        name="example-failover-group",
        resource_group_name=primary_azurerm_resource_group["name"],
        location=primary.location,
        managed_instance_name=primary.name,
        partner_managed_instance_id=secondary.id,
        read_write_endpoint_failover_policy=azure.sql.ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs(
            mode="Automatic",
            grace_minutes=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 {
    		_, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("rg-example"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		primary, err := sql.NewManagedInstance(ctx, "primary", &sql.ManagedInstanceArgs{
    			Name:                       pulumi.String("example-primary"),
    			ResourceGroupName:          pulumi.Any(primaryAzurermResourceGroup.Name),
    			Location:                   pulumi.Any(primaryAzurermResourceGroup.Location),
    			AdministratorLogin:         pulumi.String("mradministrator"),
    			AdministratorLoginPassword: pulumi.String("thisIsDog11"),
    			LicenseType:                pulumi.String("BasePrice"),
    			SubnetId:                   pulumi.Any(primaryAzurermSubnet.Id),
    			SkuName:                    pulumi.String("GP_Gen5"),
    			Vcores:                     pulumi.Int(4),
    			StorageSizeInGb:            pulumi.Int(32),
    			Tags: pulumi.StringMap{
    				"environment": pulumi.String("prod"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		secondary, err := sql.NewManagedInstance(ctx, "secondary", &sql.ManagedInstanceArgs{
    			Name:                       pulumi.String("example-secondary"),
    			ResourceGroupName:          pulumi.Any(secondaryAzurermResourceGroup.Name),
    			Location:                   pulumi.Any(secondaryAzurermResourceGroup.Location),
    			AdministratorLogin:         pulumi.String("mradministrator"),
    			AdministratorLoginPassword: pulumi.String("thisIsDog11"),
    			LicenseType:                pulumi.String("BasePrice"),
    			SubnetId:                   pulumi.Any(secondaryAzurermSubnet.Id),
    			SkuName:                    pulumi.String("GP_Gen5"),
    			Vcores:                     pulumi.Int(4),
    			StorageSizeInGb:            pulumi.Int(32),
    			Tags: pulumi.StringMap{
    				"environment": pulumi.String("prod"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = sql.NewManagedInstanceFailoverGroup(ctx, "example", &sql.ManagedInstanceFailoverGroupArgs{
    			Name:                     pulumi.String("example-failover-group"),
    			ResourceGroupName:        pulumi.Any(primaryAzurermResourceGroup.Name),
    			Location:                 primary.Location,
    			ManagedInstanceName:      primary.Name,
    			PartnerManagedInstanceId: secondary.ID(),
    			ReadWriteEndpointFailoverPolicy: &sql.ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs{
    				Mode:         pulumi.String("Automatic"),
    				GraceMinutes: pulumi.Int(60),
    			},
    		})
    		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 = "rg-example",
            Location = "West Europe",
        });
    
        var primary = new Azure.Sql.ManagedInstance("primary", new()
        {
            Name = "example-primary",
            ResourceGroupName = primaryAzurermResourceGroup.Name,
            Location = primaryAzurermResourceGroup.Location,
            AdministratorLogin = "mradministrator",
            AdministratorLoginPassword = "thisIsDog11",
            LicenseType = "BasePrice",
            SubnetId = primaryAzurermSubnet.Id,
            SkuName = "GP_Gen5",
            Vcores = 4,
            StorageSizeInGb = 32,
            Tags = 
            {
                { "environment", "prod" },
            },
        });
    
        var secondary = new Azure.Sql.ManagedInstance("secondary", new()
        {
            Name = "example-secondary",
            ResourceGroupName = secondaryAzurermResourceGroup.Name,
            Location = secondaryAzurermResourceGroup.Location,
            AdministratorLogin = "mradministrator",
            AdministratorLoginPassword = "thisIsDog11",
            LicenseType = "BasePrice",
            SubnetId = secondaryAzurermSubnet.Id,
            SkuName = "GP_Gen5",
            Vcores = 4,
            StorageSizeInGb = 32,
            Tags = 
            {
                { "environment", "prod" },
            },
        });
    
        var exampleManagedInstanceFailoverGroup = new Azure.Sql.ManagedInstanceFailoverGroup("example", new()
        {
            Name = "example-failover-group",
            ResourceGroupName = primaryAzurermResourceGroup.Name,
            Location = primary.Location,
            ManagedInstanceName = primary.Name,
            PartnerManagedInstanceId = secondary.Id,
            ReadWriteEndpointFailoverPolicy = new Azure.Sql.Inputs.ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs
            {
                Mode = "Automatic",
                GraceMinutes = 60,
            },
        });
    
    });
    
    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.ManagedInstance;
    import com.pulumi.azure.sql.ManagedInstanceArgs;
    import com.pulumi.azure.sql.ManagedInstanceFailoverGroup;
    import com.pulumi.azure.sql.ManagedInstanceFailoverGroupArgs;
    import com.pulumi.azure.sql.inputs.ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs;
    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("rg-example")
                .location("West Europe")
                .build());
    
            var primary = new ManagedInstance("primary", ManagedInstanceArgs.builder()        
                .name("example-primary")
                .resourceGroupName(primaryAzurermResourceGroup.name())
                .location(primaryAzurermResourceGroup.location())
                .administratorLogin("mradministrator")
                .administratorLoginPassword("thisIsDog11")
                .licenseType("BasePrice")
                .subnetId(primaryAzurermSubnet.id())
                .skuName("GP_Gen5")
                .vcores(4)
                .storageSizeInGb(32)
                .tags(Map.of("environment", "prod"))
                .build());
    
            var secondary = new ManagedInstance("secondary", ManagedInstanceArgs.builder()        
                .name("example-secondary")
                .resourceGroupName(secondaryAzurermResourceGroup.name())
                .location(secondaryAzurermResourceGroup.location())
                .administratorLogin("mradministrator")
                .administratorLoginPassword("thisIsDog11")
                .licenseType("BasePrice")
                .subnetId(secondaryAzurermSubnet.id())
                .skuName("GP_Gen5")
                .vcores(4)
                .storageSizeInGb(32)
                .tags(Map.of("environment", "prod"))
                .build());
    
            var exampleManagedInstanceFailoverGroup = new ManagedInstanceFailoverGroup("exampleManagedInstanceFailoverGroup", ManagedInstanceFailoverGroupArgs.builder()        
                .name("example-failover-group")
                .resourceGroupName(primaryAzurermResourceGroup.name())
                .location(primary.location())
                .managedInstanceName(primary.name())
                .partnerManagedInstanceId(secondary.id())
                .readWriteEndpointFailoverPolicy(ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs.builder()
                    .mode("Automatic")
                    .graceMinutes(60)
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: rg-example
          location: West Europe
      primary:
        type: azure:sql:ManagedInstance
        properties:
          name: example-primary
          resourceGroupName: ${primaryAzurermResourceGroup.name}
          location: ${primaryAzurermResourceGroup.location}
          administratorLogin: mradministrator
          administratorLoginPassword: thisIsDog11
          licenseType: BasePrice
          subnetId: ${primaryAzurermSubnet.id}
          skuName: GP_Gen5
          vcores: 4
          storageSizeInGb: 32
          tags:
            environment: prod
      secondary:
        type: azure:sql:ManagedInstance
        properties:
          name: example-secondary
          resourceGroupName: ${secondaryAzurermResourceGroup.name}
          location: ${secondaryAzurermResourceGroup.location}
          administratorLogin: mradministrator
          administratorLoginPassword: thisIsDog11
          licenseType: BasePrice
          subnetId: ${secondaryAzurermSubnet.id}
          skuName: GP_Gen5
          vcores: 4
          storageSizeInGb: 32
          tags:
            environment: prod
      exampleManagedInstanceFailoverGroup:
        type: azure:sql:ManagedInstanceFailoverGroup
        name: example
        properties:
          name: example-failover-group
          resourceGroupName: ${primaryAzurermResourceGroup.name}
          location: ${primary.location}
          managedInstanceName: ${primary.name}
          partnerManagedInstanceId: ${secondary.id}
          readWriteEndpointFailoverPolicy:
            mode: Automatic
            graceMinutes: 60
    

    Create ManagedInstanceFailoverGroup Resource

    new ManagedInstanceFailoverGroup(name: string, args: ManagedInstanceFailoverGroupArgs, opts?: CustomResourceOptions);
    @overload
    def ManagedInstanceFailoverGroup(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     location: Optional[str] = None,
                                     managed_instance_name: Optional[str] = None,
                                     name: Optional[str] = None,
                                     partner_managed_instance_id: Optional[str] = None,
                                     read_write_endpoint_failover_policy: Optional[ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs] = None,
                                     readonly_endpoint_failover_policy_enabled: Optional[bool] = None,
                                     resource_group_name: Optional[str] = None)
    @overload
    def ManagedInstanceFailoverGroup(resource_name: str,
                                     args: ManagedInstanceFailoverGroupArgs,
                                     opts: Optional[ResourceOptions] = None)
    func NewManagedInstanceFailoverGroup(ctx *Context, name string, args ManagedInstanceFailoverGroupArgs, opts ...ResourceOption) (*ManagedInstanceFailoverGroup, error)
    public ManagedInstanceFailoverGroup(string name, ManagedInstanceFailoverGroupArgs args, CustomResourceOptions? opts = null)
    public ManagedInstanceFailoverGroup(String name, ManagedInstanceFailoverGroupArgs args)
    public ManagedInstanceFailoverGroup(String name, ManagedInstanceFailoverGroupArgs args, CustomResourceOptions options)
    
    type: azure:sql:ManagedInstanceFailoverGroup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ManagedInstanceFailoverGroupArgs
    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 ManagedInstanceFailoverGroupArgs
    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 ManagedInstanceFailoverGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ManagedInstanceFailoverGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ManagedInstanceFailoverGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ManagedInstanceFailoverGroup 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 ManagedInstanceFailoverGroup resource accepts the following input properties:

    ManagedInstanceName string
    The name of the SQL Managed Instance which will be replicated using a SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    PartnerManagedInstanceId string
    ID of the SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
    ReadWriteEndpointFailoverPolicy ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicy
    A read_write_endpoint_failover_policy block as defined below.
    ResourceGroupName string
    The name of the Resource Group where the SQL Instance Failover Group should exist. Changing this forces a new SQL Instance Failover Group to be created.
    Location string
    The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created.
    Name string
    The name which should be used for this SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    ReadonlyEndpointFailoverPolicyEnabled bool
    Failover policy for the read-only endpoint. Defaults to true.
    ManagedInstanceName string
    The name of the SQL Managed Instance which will be replicated using a SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    PartnerManagedInstanceId string
    ID of the SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
    ReadWriteEndpointFailoverPolicy ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs
    A read_write_endpoint_failover_policy block as defined below.
    ResourceGroupName string
    The name of the Resource Group where the SQL Instance Failover Group should exist. Changing this forces a new SQL Instance Failover Group to be created.
    Location string
    The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created.
    Name string
    The name which should be used for this SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    ReadonlyEndpointFailoverPolicyEnabled bool
    Failover policy for the read-only endpoint. Defaults to true.
    managedInstanceName String
    The name of the SQL Managed Instance which will be replicated using a SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    partnerManagedInstanceId String
    ID of the SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
    readWriteEndpointFailoverPolicy ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicy
    A read_write_endpoint_failover_policy block as defined below.
    resourceGroupName String
    The name of the Resource Group where the SQL Instance Failover Group should exist. Changing this forces a new SQL Instance Failover Group to be created.
    location String
    The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created.
    name String
    The name which should be used for this SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    readonlyEndpointFailoverPolicyEnabled Boolean
    Failover policy for the read-only endpoint. Defaults to true.
    managedInstanceName string
    The name of the SQL Managed Instance which will be replicated using a SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    partnerManagedInstanceId string
    ID of the SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
    readWriteEndpointFailoverPolicy ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicy
    A read_write_endpoint_failover_policy block as defined below.
    resourceGroupName string
    The name of the Resource Group where the SQL Instance Failover Group should exist. Changing this forces a new SQL Instance Failover Group to be created.
    location string
    The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created.
    name string
    The name which should be used for this SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    readonlyEndpointFailoverPolicyEnabled boolean
    Failover policy for the read-only endpoint. Defaults to true.
    managed_instance_name str
    The name of the SQL Managed Instance which will be replicated using a SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    partner_managed_instance_id str
    ID of the SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
    read_write_endpoint_failover_policy ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs
    A read_write_endpoint_failover_policy block as defined below.
    resource_group_name str
    The name of the Resource Group where the SQL Instance Failover Group should exist. Changing this forces a new SQL Instance Failover Group to be created.
    location str
    The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created.
    name str
    The name which should be used for this SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    readonly_endpoint_failover_policy_enabled bool
    Failover policy for the read-only endpoint. Defaults to true.
    managedInstanceName String
    The name of the SQL Managed Instance which will be replicated using a SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    partnerManagedInstanceId String
    ID of the SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
    readWriteEndpointFailoverPolicy Property Map
    A read_write_endpoint_failover_policy block as defined below.
    resourceGroupName String
    The name of the Resource Group where the SQL Instance Failover Group should exist. Changing this forces a new SQL Instance Failover Group to be created.
    location String
    The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created.
    name String
    The name which should be used for this SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    readonlyEndpointFailoverPolicyEnabled Boolean
    Failover policy for the read-only endpoint. Defaults to true.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ManagedInstanceFailoverGroup resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    PartnerRegions List<ManagedInstanceFailoverGroupPartnerRegion>
    A partner_region block as defined below.
    Role string
    The partner replication role of the SQL Instance Failover Group.
    Id string
    The provider-assigned unique ID for this managed resource.
    PartnerRegions []ManagedInstanceFailoverGroupPartnerRegion
    A partner_region block as defined below.
    Role string
    The partner replication role of the SQL Instance Failover Group.
    id String
    The provider-assigned unique ID for this managed resource.
    partnerRegions List<ManagedInstanceFailoverGroupPartnerRegion>
    A partner_region block as defined below.
    role String
    The partner replication role of the SQL Instance Failover Group.
    id string
    The provider-assigned unique ID for this managed resource.
    partnerRegions ManagedInstanceFailoverGroupPartnerRegion[]
    A partner_region block as defined below.
    role string
    The partner replication role of the SQL Instance Failover Group.
    id str
    The provider-assigned unique ID for this managed resource.
    partner_regions Sequence[ManagedInstanceFailoverGroupPartnerRegion]
    A partner_region block as defined below.
    role str
    The partner replication role of the SQL Instance Failover Group.
    id String
    The provider-assigned unique ID for this managed resource.
    partnerRegions List<Property Map>
    A partner_region block as defined below.
    role String
    The partner replication role of the SQL Instance Failover Group.

    Look up Existing ManagedInstanceFailoverGroup Resource

    Get an existing ManagedInstanceFailoverGroup 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?: ManagedInstanceFailoverGroupState, opts?: CustomResourceOptions): ManagedInstanceFailoverGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            location: Optional[str] = None,
            managed_instance_name: Optional[str] = None,
            name: Optional[str] = None,
            partner_managed_instance_id: Optional[str] = None,
            partner_regions: Optional[Sequence[ManagedInstanceFailoverGroupPartnerRegionArgs]] = None,
            read_write_endpoint_failover_policy: Optional[ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs] = None,
            readonly_endpoint_failover_policy_enabled: Optional[bool] = None,
            resource_group_name: Optional[str] = None,
            role: Optional[str] = None) -> ManagedInstanceFailoverGroup
    func GetManagedInstanceFailoverGroup(ctx *Context, name string, id IDInput, state *ManagedInstanceFailoverGroupState, opts ...ResourceOption) (*ManagedInstanceFailoverGroup, error)
    public static ManagedInstanceFailoverGroup Get(string name, Input<string> id, ManagedInstanceFailoverGroupState? state, CustomResourceOptions? opts = null)
    public static ManagedInstanceFailoverGroup get(String name, Output<String> id, ManagedInstanceFailoverGroupState 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:
    Location string
    The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created.
    ManagedInstanceName string
    The name of the SQL Managed Instance which will be replicated using a SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    Name string
    The name which should be used for this SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    PartnerManagedInstanceId string
    ID of the SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
    PartnerRegions List<ManagedInstanceFailoverGroupPartnerRegion>
    A partner_region block as defined below.
    ReadWriteEndpointFailoverPolicy ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicy
    A read_write_endpoint_failover_policy block as defined below.
    ReadonlyEndpointFailoverPolicyEnabled bool
    Failover policy for the read-only endpoint. Defaults to true.
    ResourceGroupName string
    The name of the Resource Group where the SQL Instance Failover Group should exist. Changing this forces a new SQL Instance Failover Group to be created.
    Role string
    The partner replication role of the SQL Instance Failover Group.
    Location string
    The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created.
    ManagedInstanceName string
    The name of the SQL Managed Instance which will be replicated using a SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    Name string
    The name which should be used for this SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    PartnerManagedInstanceId string
    ID of the SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
    PartnerRegions []ManagedInstanceFailoverGroupPartnerRegionArgs
    A partner_region block as defined below.
    ReadWriteEndpointFailoverPolicy ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs
    A read_write_endpoint_failover_policy block as defined below.
    ReadonlyEndpointFailoverPolicyEnabled bool
    Failover policy for the read-only endpoint. Defaults to true.
    ResourceGroupName string
    The name of the Resource Group where the SQL Instance Failover Group should exist. Changing this forces a new SQL Instance Failover Group to be created.
    Role string
    The partner replication role of the SQL Instance Failover Group.
    location String
    The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created.
    managedInstanceName String
    The name of the SQL Managed Instance which will be replicated using a SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    name String
    The name which should be used for this SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    partnerManagedInstanceId String
    ID of the SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
    partnerRegions List<ManagedInstanceFailoverGroupPartnerRegion>
    A partner_region block as defined below.
    readWriteEndpointFailoverPolicy ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicy
    A read_write_endpoint_failover_policy block as defined below.
    readonlyEndpointFailoverPolicyEnabled Boolean
    Failover policy for the read-only endpoint. Defaults to true.
    resourceGroupName String
    The name of the Resource Group where the SQL Instance Failover Group should exist. Changing this forces a new SQL Instance Failover Group to be created.
    role String
    The partner replication role of the SQL Instance Failover Group.
    location string
    The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created.
    managedInstanceName string
    The name of the SQL Managed Instance which will be replicated using a SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    name string
    The name which should be used for this SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    partnerManagedInstanceId string
    ID of the SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
    partnerRegions ManagedInstanceFailoverGroupPartnerRegion[]
    A partner_region block as defined below.
    readWriteEndpointFailoverPolicy ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicy
    A read_write_endpoint_failover_policy block as defined below.
    readonlyEndpointFailoverPolicyEnabled boolean
    Failover policy for the read-only endpoint. Defaults to true.
    resourceGroupName string
    The name of the Resource Group where the SQL Instance Failover Group should exist. Changing this forces a new SQL Instance Failover Group to be created.
    role string
    The partner replication role of the SQL Instance Failover Group.
    location str
    The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created.
    managed_instance_name str
    The name of the SQL Managed Instance which will be replicated using a SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    name str
    The name which should be used for this SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    partner_managed_instance_id str
    ID of the SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
    partner_regions Sequence[ManagedInstanceFailoverGroupPartnerRegionArgs]
    A partner_region block as defined below.
    read_write_endpoint_failover_policy ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs
    A read_write_endpoint_failover_policy block as defined below.
    readonly_endpoint_failover_policy_enabled bool
    Failover policy for the read-only endpoint. Defaults to true.
    resource_group_name str
    The name of the Resource Group where the SQL Instance Failover Group should exist. Changing this forces a new SQL Instance Failover Group to be created.
    role str
    The partner replication role of the SQL Instance Failover Group.
    location String
    The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created.
    managedInstanceName String
    The name of the SQL Managed Instance which will be replicated using a SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    name String
    The name which should be used for this SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created.
    partnerManagedInstanceId String
    ID of the SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
    partnerRegions List<Property Map>
    A partner_region block as defined below.
    readWriteEndpointFailoverPolicy Property Map
    A read_write_endpoint_failover_policy block as defined below.
    readonlyEndpointFailoverPolicyEnabled Boolean
    Failover policy for the read-only endpoint. Defaults to true.
    resourceGroupName String
    The name of the Resource Group where the SQL Instance Failover Group should exist. Changing this forces a new SQL Instance Failover Group to be created.
    role String
    The partner replication role of the SQL Instance Failover Group.

    Supporting Types

    ManagedInstanceFailoverGroupPartnerRegion, ManagedInstanceFailoverGroupPartnerRegionArgs

    Location string
    The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created.
    Role string
    The partner replication role of the SQL Instance Failover Group.
    Location string
    The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created.
    Role string
    The partner replication role of the SQL Instance Failover Group.
    location String
    The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created.
    role String
    The partner replication role of the SQL Instance Failover Group.
    location string
    The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created.
    role string
    The partner replication role of the SQL Instance Failover Group.
    location str
    The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created.
    role str
    The partner replication role of the SQL Instance Failover Group.
    location String
    The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created.
    role String
    The partner replication role of the SQL Instance Failover Group.

    ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicy, ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs

    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.

    Import

    SQL Instance Failover Groups can be imported using the resource id, e.g.

    $ pulumi import azure:sql/managedInstanceFailoverGroup:ManagedInstanceFailoverGroup example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/locations/Location/instanceFailoverGroups/failoverGroup1
    

    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.70.0 published on Wednesday, Mar 27, 2024 by Pulumi