Azure Native

v1.88.1 published on Thursday, Dec 1, 2022 by Pulumi

DistributedAvailabilityGroup

Distributed availability group between box and Sql Managed Instance. API Version: 2021-05-01-preview.

Example Usage

Create a distributed availability group.

using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var distributedAvailabilityGroup = new AzureNative.Sql.DistributedAvailabilityGroup("distributedAvailabilityGroup", new()
    {
        DistributedAvailabilityGroupName = "dag",
        ManagedInstanceName = "testcl",
        PrimaryAvailabilityGroupName = "BoxLocalAg1",
        ResourceGroupName = "testrg",
        SecondaryAvailabilityGroupName = "testcl",
        SourceEndpoint = "TCP://SERVER:7022",
        TargetDatabase = "testdb",
    });

});
package main

import (
	sql "github.com/pulumi/pulumi-azure-native/sdk/go/azure/sql"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sql.NewDistributedAvailabilityGroup(ctx, "distributedAvailabilityGroup", &sql.DistributedAvailabilityGroupArgs{
			DistributedAvailabilityGroupName: pulumi.String("dag"),
			ManagedInstanceName:              pulumi.String("testcl"),
			PrimaryAvailabilityGroupName:     pulumi.String("BoxLocalAg1"),
			ResourceGroupName:                pulumi.String("testrg"),
			SecondaryAvailabilityGroupName:   pulumi.String("testcl"),
			SourceEndpoint:                   pulumi.String("TCP://SERVER:7022"),
			TargetDatabase:                   pulumi.String("testdb"),
		})
		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.azurenative.sql.DistributedAvailabilityGroup;
import com.pulumi.azurenative.sql.DistributedAvailabilityGroupArgs;
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 distributedAvailabilityGroup = new DistributedAvailabilityGroup("distributedAvailabilityGroup", DistributedAvailabilityGroupArgs.builder()        
            .distributedAvailabilityGroupName("dag")
            .managedInstanceName("testcl")
            .primaryAvailabilityGroupName("BoxLocalAg1")
            .resourceGroupName("testrg")
            .secondaryAvailabilityGroupName("testcl")
            .sourceEndpoint("TCP://SERVER:7022")
            .targetDatabase("testdb")
            .build());

    }
}
import pulumi
import pulumi_azure_native as azure_native

distributed_availability_group = azure_native.sql.DistributedAvailabilityGroup("distributedAvailabilityGroup",
    distributed_availability_group_name="dag",
    managed_instance_name="testcl",
    primary_availability_group_name="BoxLocalAg1",
    resource_group_name="testrg",
    secondary_availability_group_name="testcl",
    source_endpoint="TCP://SERVER:7022",
    target_database="testdb")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const distributedAvailabilityGroup = new azure_native.sql.DistributedAvailabilityGroup("distributedAvailabilityGroup", {
    distributedAvailabilityGroupName: "dag",
    managedInstanceName: "testcl",
    primaryAvailabilityGroupName: "BoxLocalAg1",
    resourceGroupName: "testrg",
    secondaryAvailabilityGroupName: "testcl",
    sourceEndpoint: "TCP://SERVER:7022",
    targetDatabase: "testdb",
});
resources:
  distributedAvailabilityGroup:
    type: azure-native:sql:DistributedAvailabilityGroup
    properties:
      distributedAvailabilityGroupName: dag
      managedInstanceName: testcl
      primaryAvailabilityGroupName: BoxLocalAg1
      resourceGroupName: testrg
      secondaryAvailabilityGroupName: testcl
      sourceEndpoint: TCP://SERVER:7022
      targetDatabase: testdb

Create DistributedAvailabilityGroup Resource

new DistributedAvailabilityGroup(name: string, args: DistributedAvailabilityGroupArgs, opts?: CustomResourceOptions);
@overload
def DistributedAvailabilityGroup(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 distributed_availability_group_name: Optional[str] = None,
                                 managed_instance_name: Optional[str] = None,
                                 primary_availability_group_name: Optional[str] = None,
                                 replication_mode: Optional[Union[str, ReplicationMode]] = None,
                                 resource_group_name: Optional[str] = None,
                                 secondary_availability_group_name: Optional[str] = None,
                                 source_endpoint: Optional[str] = None,
                                 target_database: Optional[str] = None)
@overload
def DistributedAvailabilityGroup(resource_name: str,
                                 args: DistributedAvailabilityGroupArgs,
                                 opts: Optional[ResourceOptions] = None)
func NewDistributedAvailabilityGroup(ctx *Context, name string, args DistributedAvailabilityGroupArgs, opts ...ResourceOption) (*DistributedAvailabilityGroup, error)
public DistributedAvailabilityGroup(string name, DistributedAvailabilityGroupArgs args, CustomResourceOptions? opts = null)
public DistributedAvailabilityGroup(String name, DistributedAvailabilityGroupArgs args)
public DistributedAvailabilityGroup(String name, DistributedAvailabilityGroupArgs args, CustomResourceOptions options)
type: azure-native:sql:DistributedAvailabilityGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DistributedAvailabilityGroupArgs
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 DistributedAvailabilityGroupArgs
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 DistributedAvailabilityGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DistributedAvailabilityGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DistributedAvailabilityGroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

ManagedInstanceName string

The name of the managed instance.

ResourceGroupName string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

DistributedAvailabilityGroupName string

The distributed availability group name.

PrimaryAvailabilityGroupName string

The primary availability group name

ReplicationMode string | Pulumi.AzureNative.Sql.ReplicationMode

The replication mode of a distributed availability group. Parameter will be ignored during link creation.

SecondaryAvailabilityGroupName string

The secondary availability group name

SourceEndpoint string

The source endpoint

TargetDatabase string

The name of the target database

ManagedInstanceName string

The name of the managed instance.

ResourceGroupName string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

DistributedAvailabilityGroupName string

The distributed availability group name.

PrimaryAvailabilityGroupName string

The primary availability group name

ReplicationMode string | ReplicationMode

The replication mode of a distributed availability group. Parameter will be ignored during link creation.

SecondaryAvailabilityGroupName string

The secondary availability group name

SourceEndpoint string

The source endpoint

TargetDatabase string

The name of the target database

managedInstanceName String

The name of the managed instance.

resourceGroupName String

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

distributedAvailabilityGroupName String

The distributed availability group name.

primaryAvailabilityGroupName String

The primary availability group name

replicationMode String | ReplicationMode

The replication mode of a distributed availability group. Parameter will be ignored during link creation.

secondaryAvailabilityGroupName String

The secondary availability group name

sourceEndpoint String

The source endpoint

targetDatabase String

The name of the target database

managedInstanceName string

The name of the managed instance.

resourceGroupName string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

distributedAvailabilityGroupName string

The distributed availability group name.

primaryAvailabilityGroupName string

The primary availability group name

replicationMode string | ReplicationMode

The replication mode of a distributed availability group. Parameter will be ignored during link creation.

secondaryAvailabilityGroupName string

The secondary availability group name

sourceEndpoint string

The source endpoint

targetDatabase string

The name of the target database

managed_instance_name str

The name of the managed instance.

resource_group_name str

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

distributed_availability_group_name str

The distributed availability group name.

primary_availability_group_name str

The primary availability group name

replication_mode str | ReplicationMode

The replication mode of a distributed availability group. Parameter will be ignored during link creation.

secondary_availability_group_name str

The secondary availability group name

source_endpoint str

The source endpoint

target_database str

The name of the target database

managedInstanceName String

The name of the managed instance.

resourceGroupName String

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

distributedAvailabilityGroupName String

The distributed availability group name.

primaryAvailabilityGroupName String

The primary availability group name

replicationMode String | "Async" | "Sync"

The replication mode of a distributed availability group. Parameter will be ignored during link creation.

secondaryAvailabilityGroupName String

The secondary availability group name

sourceEndpoint String

The source endpoint

targetDatabase String

The name of the target database

Outputs

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

DistributedAvailabilityGroupId string

The distributed availability group id

Id string

The provider-assigned unique ID for this managed resource.

LastHardenedLsn string

The last hardened lsn

LinkState string

The link state

Name string

Resource name.

SourceReplicaId string

The source replica id

TargetReplicaId string

The target replica id

Type string

Resource type.

DistributedAvailabilityGroupId string

The distributed availability group id

Id string

The provider-assigned unique ID for this managed resource.

LastHardenedLsn string

The last hardened lsn

LinkState string

The link state

Name string

Resource name.

SourceReplicaId string

The source replica id

TargetReplicaId string

The target replica id

Type string

Resource type.

distributedAvailabilityGroupId String

The distributed availability group id

id String

The provider-assigned unique ID for this managed resource.

lastHardenedLsn String

The last hardened lsn

linkState String

The link state

name String

Resource name.

sourceReplicaId String

The source replica id

targetReplicaId String

The target replica id

type String

Resource type.

distributedAvailabilityGroupId string

The distributed availability group id

id string

The provider-assigned unique ID for this managed resource.

lastHardenedLsn string

The last hardened lsn

linkState string

The link state

name string

Resource name.

sourceReplicaId string

The source replica id

targetReplicaId string

The target replica id

type string

Resource type.

distributed_availability_group_id str

The distributed availability group id

id str

The provider-assigned unique ID for this managed resource.

last_hardened_lsn str

The last hardened lsn

link_state str

The link state

name str

Resource name.

source_replica_id str

The source replica id

target_replica_id str

The target replica id

type str

Resource type.

distributedAvailabilityGroupId String

The distributed availability group id

id String

The provider-assigned unique ID for this managed resource.

lastHardenedLsn String

The last hardened lsn

linkState String

The link state

name String

Resource name.

sourceReplicaId String

The source replica id

targetReplicaId String

The target replica id

type String

Resource type.

Supporting Types

ReplicationMode

Async
Async
Sync
Sync
ReplicationModeAsync
Async
ReplicationModeSync
Sync
Async
Async
Sync
Sync
Async
Async
Sync
Sync
ASYNC_
Async
SYNC
Sync
"Async"
Async
"Sync"
Sync

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:sql:DistributedAvailabilityGroup dag /subscriptions/f2669dff-5f08-45dd-b857-b2a60b72cdc9/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/distributedAvailabilityGroups/dag 

Package Details

Repository
https://github.com/pulumi/pulumi-azure-native
License
Apache-2.0