1. Packages
  2. Azure Native
  3. API Docs
  4. sql
  5. ServerTrustGroup
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

azure-native.sql.ServerTrustGroup

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

A server trust group.

Uses Azure REST API version 2023-08-01. In version 2.x of the Azure Native provider, it used API version 2021-11-01.

Other available API versions: 2020-02-02-preview, 2020-08-01-preview, 2020-11-01-preview, 2021-02-01-preview, 2021-05-01-preview, 2021-08-01-preview, 2021-11-01, 2021-11-01-preview, 2022-02-01-preview, 2022-05-01-preview, 2022-08-01-preview, 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview, 2024-05-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native sql [ApiVersion]. See the version guide for details.

Example Usage

Create server trust group

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

return await Deployment.RunAsync(() => 
{
    var serverTrustGroup = new AzureNative.Sql.ServerTrustGroup("serverTrustGroup", new()
    {
        GroupMembers = new[]
        {
            new AzureNative.Sql.Inputs.ServerInfoArgs
            {
                ServerId = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1",
            },
            new AzureNative.Sql.Inputs.ServerInfoArgs
            {
                ServerId = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2",
            },
        },
        LocationName = "Japan East",
        ResourceGroupName = "Default",
        ServerTrustGroupName = "server-trust-group-test",
        TrustScopes = new[]
        {
            AzureNative.Sql.TrustScope.GlobalTransactions,
            AzureNative.Sql.TrustScope.ServiceBroker,
        },
    });

});
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sql.NewServerTrustGroup(ctx, "serverTrustGroup", &sql.ServerTrustGroupArgs{
			GroupMembers: sql.ServerInfoArray{
				&sql.ServerInfoArgs{
					ServerId: pulumi.String("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1"),
				},
				&sql.ServerInfoArgs{
					ServerId: pulumi.String("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2"),
				},
			},
			LocationName:         pulumi.String("Japan East"),
			ResourceGroupName:    pulumi.String("Default"),
			ServerTrustGroupName: pulumi.String("server-trust-group-test"),
			TrustScopes: pulumi.StringArray{
				pulumi.String(sql.TrustScopeGlobalTransactions),
				pulumi.String(sql.TrustScopeServiceBroker),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.sql.ServerTrustGroup;
import com.pulumi.azurenative.sql.ServerTrustGroupArgs;
import com.pulumi.azurenative.sql.inputs.ServerInfoArgs;
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 serverTrustGroup = new ServerTrustGroup("serverTrustGroup", ServerTrustGroupArgs.builder()
            .groupMembers(            
                ServerInfoArgs.builder()
                    .serverId("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1")
                    .build(),
                ServerInfoArgs.builder()
                    .serverId("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2")
                    .build())
            .locationName("Japan East")
            .resourceGroupName("Default")
            .serverTrustGroupName("server-trust-group-test")
            .trustScopes(            
                "GlobalTransactions",
                "ServiceBroker")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const serverTrustGroup = new azure_native.sql.ServerTrustGroup("serverTrustGroup", {
    groupMembers: [
        {
            serverId: "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1",
        },
        {
            serverId: "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2",
        },
    ],
    locationName: "Japan East",
    resourceGroupName: "Default",
    serverTrustGroupName: "server-trust-group-test",
    trustScopes: [
        azure_native.sql.TrustScope.GlobalTransactions,
        azure_native.sql.TrustScope.ServiceBroker,
    ],
});
Copy
import pulumi
import pulumi_azure_native as azure_native

server_trust_group = azure_native.sql.ServerTrustGroup("serverTrustGroup",
    group_members=[
        {
            "server_id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1",
        },
        {
            "server_id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2",
        },
    ],
    location_name="Japan East",
    resource_group_name="Default",
    server_trust_group_name="server-trust-group-test",
    trust_scopes=[
        azure_native.sql.TrustScope.GLOBAL_TRANSACTIONS,
        azure_native.sql.TrustScope.SERVICE_BROKER,
    ])
Copy
resources:
  serverTrustGroup:
    type: azure-native:sql:ServerTrustGroup
    properties:
      groupMembers:
        - serverId: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1
        - serverId: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2
      locationName: Japan East
      resourceGroupName: Default
      serverTrustGroupName: server-trust-group-test
      trustScopes:
        - GlobalTransactions
        - ServiceBroker
Copy

Create ServerTrustGroup Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ServerTrustGroup(name: string, args: ServerTrustGroupArgs, opts?: CustomResourceOptions);
@overload
def ServerTrustGroup(resource_name: str,
                     args: ServerTrustGroupArgs,
                     opts: Optional[ResourceOptions] = None)

@overload
def ServerTrustGroup(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     group_members: Optional[Sequence[ServerInfoArgs]] = None,
                     location_name: Optional[str] = None,
                     resource_group_name: Optional[str] = None,
                     trust_scopes: Optional[Sequence[Union[str, TrustScope]]] = None,
                     server_trust_group_name: Optional[str] = None)
func NewServerTrustGroup(ctx *Context, name string, args ServerTrustGroupArgs, opts ...ResourceOption) (*ServerTrustGroup, error)
public ServerTrustGroup(string name, ServerTrustGroupArgs args, CustomResourceOptions? opts = null)
public ServerTrustGroup(String name, ServerTrustGroupArgs args)
public ServerTrustGroup(String name, ServerTrustGroupArgs args, CustomResourceOptions options)
type: azure-native:sql:ServerTrustGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ServerTrustGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ServerTrustGroupArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ServerTrustGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ServerTrustGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ServerTrustGroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var serverTrustGroupResource = new AzureNative.Sql.ServerTrustGroup("serverTrustGroupResource", new()
{
    GroupMembers = new[]
    {
        new AzureNative.Sql.Inputs.ServerInfoArgs
        {
            ServerId = "string",
        },
    },
    LocationName = "string",
    ResourceGroupName = "string",
    TrustScopes = new[]
    {
        "string",
    },
    ServerTrustGroupName = "string",
});
Copy
example, err := sql.NewServerTrustGroup(ctx, "serverTrustGroupResource", &sql.ServerTrustGroupArgs{
	GroupMembers: sql.ServerInfoArray{
		&sql.ServerInfoArgs{
			ServerId: pulumi.String("string"),
		},
	},
	LocationName:      pulumi.String("string"),
	ResourceGroupName: pulumi.String("string"),
	TrustScopes: pulumi.StringArray{
		pulumi.String("string"),
	},
	ServerTrustGroupName: pulumi.String("string"),
})
Copy
var serverTrustGroupResource = new ServerTrustGroup("serverTrustGroupResource", ServerTrustGroupArgs.builder()
    .groupMembers(ServerInfoArgs.builder()
        .serverId("string")
        .build())
    .locationName("string")
    .resourceGroupName("string")
    .trustScopes("string")
    .serverTrustGroupName("string")
    .build());
Copy
server_trust_group_resource = azure_native.sql.ServerTrustGroup("serverTrustGroupResource",
    group_members=[{
        "server_id": "string",
    }],
    location_name="string",
    resource_group_name="string",
    trust_scopes=["string"],
    server_trust_group_name="string")
Copy
const serverTrustGroupResource = new azure_native.sql.ServerTrustGroup("serverTrustGroupResource", {
    groupMembers: [{
        serverId: "string",
    }],
    locationName: "string",
    resourceGroupName: "string",
    trustScopes: ["string"],
    serverTrustGroupName: "string",
});
Copy
type: azure-native:sql:ServerTrustGroup
properties:
    groupMembers:
        - serverId: string
    locationName: string
    resourceGroupName: string
    serverTrustGroupName: string
    trustScopes:
        - string
Copy

ServerTrustGroup Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ServerTrustGroup resource accepts the following input properties:

GroupMembers This property is required. List<Pulumi.AzureNative.Sql.Inputs.ServerInfo>
Group members information for the server trust group.
LocationName
This property is required.
Changes to this property will trigger replacement.
string
The name of the region where the resource is located.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
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.
TrustScopes This property is required. List<Union<string, Pulumi.AzureNative.Sql.TrustScope>>
Trust scope of the server trust group.
ServerTrustGroupName Changes to this property will trigger replacement. string
The name of the server trust group.
GroupMembers This property is required. []ServerInfoArgs
Group members information for the server trust group.
LocationName
This property is required.
Changes to this property will trigger replacement.
string
The name of the region where the resource is located.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
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.
TrustScopes This property is required. []string
Trust scope of the server trust group.
ServerTrustGroupName Changes to this property will trigger replacement. string
The name of the server trust group.
groupMembers This property is required. List<ServerInfo>
Group members information for the server trust group.
locationName
This property is required.
Changes to this property will trigger replacement.
String
The name of the region where the resource is located.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
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.
trustScopes This property is required. List<Either<String,TrustScope>>
Trust scope of the server trust group.
serverTrustGroupName Changes to this property will trigger replacement. String
The name of the server trust group.
groupMembers This property is required. ServerInfo[]
Group members information for the server trust group.
locationName
This property is required.
Changes to this property will trigger replacement.
string
The name of the region where the resource is located.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
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.
trustScopes This property is required. (string | TrustScope)[]
Trust scope of the server trust group.
serverTrustGroupName Changes to this property will trigger replacement. string
The name of the server trust group.
group_members This property is required. Sequence[ServerInfoArgs]
Group members information for the server trust group.
location_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the region where the resource is located.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
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.
trust_scopes This property is required. Sequence[Union[str, TrustScope]]
Trust scope of the server trust group.
server_trust_group_name Changes to this property will trigger replacement. str
The name of the server trust group.
groupMembers This property is required. List<Property Map>
Group members information for the server trust group.
locationName
This property is required.
Changes to this property will trigger replacement.
String
The name of the region where the resource is located.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
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.
trustScopes This property is required. List<String | "GlobalTransactions" | "ServiceBroker">
Trust scope of the server trust group.
serverTrustGroupName Changes to this property will trigger replacement. String
The name of the server trust group.

Outputs

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

AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name.
Type string
Resource type.
AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name.
Type string
Resource type.
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name.
type String
Resource type.
azureApiVersion string
The Azure API version of the resource.
id string
The provider-assigned unique ID for this managed resource.
name string
Resource name.
type string
Resource type.
azure_api_version str
The Azure API version of the resource.
id str
The provider-assigned unique ID for this managed resource.
name str
Resource name.
type str
Resource type.
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name.
type String
Resource type.

Supporting Types

ServerInfo
, ServerInfoArgs

ServerId This property is required. string
Server Id.
ServerId This property is required. string
Server Id.
serverId This property is required. String
Server Id.
serverId This property is required. string
Server Id.
server_id This property is required. str
Server Id.
serverId This property is required. String
Server Id.

ServerInfoResponse
, ServerInfoResponseArgs

ServerId This property is required. string
Server Id.
ServerId This property is required. string
Server Id.
serverId This property is required. String
Server Id.
serverId This property is required. string
Server Id.
server_id This property is required. str
Server Id.
serverId This property is required. String
Server Id.

TrustScope
, TrustScopeArgs

GlobalTransactions
GlobalTransactions
ServiceBroker
ServiceBroker
TrustScopeGlobalTransactions
GlobalTransactions
TrustScopeServiceBroker
ServiceBroker
GlobalTransactions
GlobalTransactions
ServiceBroker
ServiceBroker
GlobalTransactions
GlobalTransactions
ServiceBroker
ServiceBroker
GLOBAL_TRANSACTIONS
GlobalTransactions
SERVICE_BROKER
ServiceBroker
"GlobalTransactions"
GlobalTransactions
"ServiceBroker"
ServiceBroker

Import

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

$ pulumi import azure-native:sql:ServerTrustGroup server-trust-group-test /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups/{serverTrustGroupName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi