ManagedInstanceFailoverGroup

class ManagedInstanceFailoverGroup : KotlinCustomResource

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.

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());
}
}

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

Properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val location: Output<String>

The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created.

Link copied to clipboard

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.

Link copied to clipboard
val name: Output<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.

Link copied to clipboard

ID of the SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.

Link copied to clipboard

A partner_region block as defined below.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Failover policy for the read-only endpoint. Defaults to true.

Link copied to clipboard

A read_write_endpoint_failover_policy block as defined below.

Link copied to clipboard

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.

Link copied to clipboard
val role: Output<String>

The partner replication role of the SQL Instance Failover Group.

Link copied to clipboard
val urn: Output<String>