MongoDB Atlas v3.30.0 published on Friday, Mar 21, 2025 by Pulumi
mongodbatlas.getFederatedSettingsOrgRoleMapping
Explore with Pulumi AI
# Data Source: mongodbatlas.FederatedSettingsOrgRoleMapping
mongodbatlas.FederatedSettingsOrgRoleMapping provides an Federated Settings Org Role Mapping datasource. Atlas Cloud Federated Settings Org Role Mapping provides federated settings outputs for the configured Org Role Mapping.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const orgGroupRoleMappingImport = new mongodbatlas.FederatedSettingsOrgRoleMapping("org_group_role_mapping_import", {
    federationSettingsId: federatedSettings.id,
    orgId: "627a9683e7f7f7ff7fe306f14",
    externalGroupName: "myGrouptest",
    roleAssignments: [
        {
            orgId: "627a9683e7f7f7ff7fe306f14",
            roles: [
                "ORG_MEMBER",
                "ORG_GROUP_CREATOR",
                "ORG_BILLING_ADMIN",
            ],
        },
        {
            groupId: "628aa20db7f7f7f98b81b8",
            roles: [
                "GROUP_OWNER",
                "GROUP_DATA_ACCESS_ADMIN",
                "GROUP_SEARCH_INDEX_EDITOR",
                "GROUP_DATA_ACCESS_READ_ONLY",
            ],
        },
        {
            groupId: "62b477f7f7f7f5e741489c",
            roles: [
                "GROUP_OWNER",
                "GROUP_DATA_ACCESS_ADMIN",
                "GROUP_SEARCH_INDEX_EDITOR",
                "GROUP_DATA_ACCESS_READ_ONLY",
                "GROUP_DATA_ACCESS_READ_WRITE",
            ],
        },
    ],
});
const roleMapping = mongodbatlas.getFederatedSettingsOrgRoleMappingOutput({
    federationSettingsId: orgGroupRoleMappingImport.id,
    orgId: "627a9683e7f7f7ff7fe306f14",
    roleMappingId: "627a9673e7f7f7ff7fe306f14",
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
org_group_role_mapping_import = mongodbatlas.FederatedSettingsOrgRoleMapping("org_group_role_mapping_import",
    federation_settings_id=federated_settings["id"],
    org_id="627a9683e7f7f7ff7fe306f14",
    external_group_name="myGrouptest",
    role_assignments=[
        {
            "org_id": "627a9683e7f7f7ff7fe306f14",
            "roles": [
                "ORG_MEMBER",
                "ORG_GROUP_CREATOR",
                "ORG_BILLING_ADMIN",
            ],
        },
        {
            "group_id": "628aa20db7f7f7f98b81b8",
            "roles": [
                "GROUP_OWNER",
                "GROUP_DATA_ACCESS_ADMIN",
                "GROUP_SEARCH_INDEX_EDITOR",
                "GROUP_DATA_ACCESS_READ_ONLY",
            ],
        },
        {
            "group_id": "62b477f7f7f7f5e741489c",
            "roles": [
                "GROUP_OWNER",
                "GROUP_DATA_ACCESS_ADMIN",
                "GROUP_SEARCH_INDEX_EDITOR",
                "GROUP_DATA_ACCESS_READ_ONLY",
                "GROUP_DATA_ACCESS_READ_WRITE",
            ],
        },
    ])
role_mapping = mongodbatlas.get_federated_settings_org_role_mapping_output(federation_settings_id=org_group_role_mapping_import.id,
    org_id="627a9683e7f7f7ff7fe306f14",
    role_mapping_id="627a9673e7f7f7ff7fe306f14")
package main
import (
	"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		orgGroupRoleMappingImport, err := mongodbatlas.NewFederatedSettingsOrgRoleMapping(ctx, "org_group_role_mapping_import", &mongodbatlas.FederatedSettingsOrgRoleMappingArgs{
			FederationSettingsId: pulumi.Any(federatedSettings.Id),
			OrgId:                pulumi.String("627a9683e7f7f7ff7fe306f14"),
			ExternalGroupName:    pulumi.String("myGrouptest"),
			RoleAssignments: mongodbatlas.FederatedSettingsOrgRoleMappingRoleAssignmentArray{
				&mongodbatlas.FederatedSettingsOrgRoleMappingRoleAssignmentArgs{
					OrgId: pulumi.String("627a9683e7f7f7ff7fe306f14"),
					Roles: pulumi.StringArray{
						pulumi.String("ORG_MEMBER"),
						pulumi.String("ORG_GROUP_CREATOR"),
						pulumi.String("ORG_BILLING_ADMIN"),
					},
				},
				&mongodbatlas.FederatedSettingsOrgRoleMappingRoleAssignmentArgs{
					GroupId: pulumi.String("628aa20db7f7f7f98b81b8"),
					Roles: pulumi.StringArray{
						pulumi.String("GROUP_OWNER"),
						pulumi.String("GROUP_DATA_ACCESS_ADMIN"),
						pulumi.String("GROUP_SEARCH_INDEX_EDITOR"),
						pulumi.String("GROUP_DATA_ACCESS_READ_ONLY"),
					},
				},
				&mongodbatlas.FederatedSettingsOrgRoleMappingRoleAssignmentArgs{
					GroupId: pulumi.String("62b477f7f7f7f5e741489c"),
					Roles: pulumi.StringArray{
						pulumi.String("GROUP_OWNER"),
						pulumi.String("GROUP_DATA_ACCESS_ADMIN"),
						pulumi.String("GROUP_SEARCH_INDEX_EDITOR"),
						pulumi.String("GROUP_DATA_ACCESS_READ_ONLY"),
						pulumi.String("GROUP_DATA_ACCESS_READ_WRITE"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		_ = mongodbatlas.LookupFederatedSettingsOrgRoleMappingOutput(ctx, mongodbatlas.GetFederatedSettingsOrgRoleMappingOutputArgs{
			FederationSettingsId: orgGroupRoleMappingImport.ID(),
			OrgId:                pulumi.String("627a9683e7f7f7ff7fe306f14"),
			RoleMappingId:        pulumi.String("627a9673e7f7f7ff7fe306f14"),
		}, nil)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() => 
{
    var orgGroupRoleMappingImport = new Mongodbatlas.FederatedSettingsOrgRoleMapping("org_group_role_mapping_import", new()
    {
        FederationSettingsId = federatedSettings.Id,
        OrgId = "627a9683e7f7f7ff7fe306f14",
        ExternalGroupName = "myGrouptest",
        RoleAssignments = new[]
        {
            new Mongodbatlas.Inputs.FederatedSettingsOrgRoleMappingRoleAssignmentArgs
            {
                OrgId = "627a9683e7f7f7ff7fe306f14",
                Roles = new[]
                {
                    "ORG_MEMBER",
                    "ORG_GROUP_CREATOR",
                    "ORG_BILLING_ADMIN",
                },
            },
            new Mongodbatlas.Inputs.FederatedSettingsOrgRoleMappingRoleAssignmentArgs
            {
                GroupId = "628aa20db7f7f7f98b81b8",
                Roles = new[]
                {
                    "GROUP_OWNER",
                    "GROUP_DATA_ACCESS_ADMIN",
                    "GROUP_SEARCH_INDEX_EDITOR",
                    "GROUP_DATA_ACCESS_READ_ONLY",
                },
            },
            new Mongodbatlas.Inputs.FederatedSettingsOrgRoleMappingRoleAssignmentArgs
            {
                GroupId = "62b477f7f7f7f5e741489c",
                Roles = new[]
                {
                    "GROUP_OWNER",
                    "GROUP_DATA_ACCESS_ADMIN",
                    "GROUP_SEARCH_INDEX_EDITOR",
                    "GROUP_DATA_ACCESS_READ_ONLY",
                    "GROUP_DATA_ACCESS_READ_WRITE",
                },
            },
        },
    });
    var roleMapping = Mongodbatlas.GetFederatedSettingsOrgRoleMapping.Invoke(new()
    {
        FederationSettingsId = orgGroupRoleMappingImport.Id,
        OrgId = "627a9683e7f7f7ff7fe306f14",
        RoleMappingId = "627a9673e7f7f7ff7fe306f14",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.FederatedSettingsOrgRoleMapping;
import com.pulumi.mongodbatlas.FederatedSettingsOrgRoleMappingArgs;
import com.pulumi.mongodbatlas.inputs.FederatedSettingsOrgRoleMappingRoleAssignmentArgs;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetFederatedSettingsOrgRoleMappingArgs;
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 orgGroupRoleMappingImport = new FederatedSettingsOrgRoleMapping("orgGroupRoleMappingImport", FederatedSettingsOrgRoleMappingArgs.builder()
            .federationSettingsId(federatedSettings.id())
            .orgId("627a9683e7f7f7ff7fe306f14")
            .externalGroupName("myGrouptest")
            .roleAssignments(            
                FederatedSettingsOrgRoleMappingRoleAssignmentArgs.builder()
                    .orgId("627a9683e7f7f7ff7fe306f14")
                    .roles(                    
                        "ORG_MEMBER",
                        "ORG_GROUP_CREATOR",
                        "ORG_BILLING_ADMIN")
                    .build(),
                FederatedSettingsOrgRoleMappingRoleAssignmentArgs.builder()
                    .groupId("628aa20db7f7f7f98b81b8")
                    .roles(                    
                        "GROUP_OWNER",
                        "GROUP_DATA_ACCESS_ADMIN",
                        "GROUP_SEARCH_INDEX_EDITOR",
                        "GROUP_DATA_ACCESS_READ_ONLY")
                    .build(),
                FederatedSettingsOrgRoleMappingRoleAssignmentArgs.builder()
                    .groupId("62b477f7f7f7f5e741489c")
                    .roles(                    
                        "GROUP_OWNER",
                        "GROUP_DATA_ACCESS_ADMIN",
                        "GROUP_SEARCH_INDEX_EDITOR",
                        "GROUP_DATA_ACCESS_READ_ONLY",
                        "GROUP_DATA_ACCESS_READ_WRITE")
                    .build())
            .build());
        final var roleMapping = MongodbatlasFunctions.getFederatedSettingsOrgRoleMapping(GetFederatedSettingsOrgRoleMappingArgs.builder()
            .federationSettingsId(orgGroupRoleMappingImport.id())
            .orgId("627a9683e7f7f7ff7fe306f14")
            .roleMappingId("627a9673e7f7f7ff7fe306f14")
            .build());
    }
}
resources:
  orgGroupRoleMappingImport:
    type: mongodbatlas:FederatedSettingsOrgRoleMapping
    name: org_group_role_mapping_import
    properties:
      federationSettingsId: ${federatedSettings.id}
      orgId: 627a9683e7f7f7ff7fe306f14
      externalGroupName: myGrouptest
      roleAssignments:
        - orgId: 627a9683e7f7f7ff7fe306f14
          roles:
            - ORG_MEMBER
            - ORG_GROUP_CREATOR
            - ORG_BILLING_ADMIN
        - groupId: 628aa20db7f7f7f98b81b8
          roles:
            - GROUP_OWNER
            - GROUP_DATA_ACCESS_ADMIN
            - GROUP_SEARCH_INDEX_EDITOR
            - GROUP_DATA_ACCESS_READ_ONLY
        - groupId: 62b477f7f7f7f5e741489c
          roles:
            - GROUP_OWNER
            - GROUP_DATA_ACCESS_ADMIN
            - GROUP_SEARCH_INDEX_EDITOR
            - GROUP_DATA_ACCESS_READ_ONLY
            - GROUP_DATA_ACCESS_READ_WRITE
variables:
  roleMapping:
    fn::invoke:
      function: mongodbatlas:getFederatedSettingsOrgRoleMapping
      arguments:
        federationSettingsId: ${orgGroupRoleMappingImport.id}
        orgId: 627a9683e7f7f7ff7fe306f14
        roleMappingId: 627a9673e7f7f7ff7fe306f14
Using getFederatedSettingsOrgRoleMapping
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getFederatedSettingsOrgRoleMapping(args: GetFederatedSettingsOrgRoleMappingArgs, opts?: InvokeOptions): Promise<GetFederatedSettingsOrgRoleMappingResult>
function getFederatedSettingsOrgRoleMappingOutput(args: GetFederatedSettingsOrgRoleMappingOutputArgs, opts?: InvokeOptions): Output<GetFederatedSettingsOrgRoleMappingResult>def get_federated_settings_org_role_mapping(federation_settings_id: Optional[str] = None,
                                            org_id: Optional[str] = None,
                                            role_mapping_id: Optional[str] = None,
                                            opts: Optional[InvokeOptions] = None) -> GetFederatedSettingsOrgRoleMappingResult
def get_federated_settings_org_role_mapping_output(federation_settings_id: Optional[pulumi.Input[str]] = None,
                                            org_id: Optional[pulumi.Input[str]] = None,
                                            role_mapping_id: Optional[pulumi.Input[str]] = None,
                                            opts: Optional[InvokeOptions] = None) -> Output[GetFederatedSettingsOrgRoleMappingResult]func LookupFederatedSettingsOrgRoleMapping(ctx *Context, args *LookupFederatedSettingsOrgRoleMappingArgs, opts ...InvokeOption) (*LookupFederatedSettingsOrgRoleMappingResult, error)
func LookupFederatedSettingsOrgRoleMappingOutput(ctx *Context, args *LookupFederatedSettingsOrgRoleMappingOutputArgs, opts ...InvokeOption) LookupFederatedSettingsOrgRoleMappingResultOutput> Note: This function is named LookupFederatedSettingsOrgRoleMapping in the Go SDK.
public static class GetFederatedSettingsOrgRoleMapping 
{
    public static Task<GetFederatedSettingsOrgRoleMappingResult> InvokeAsync(GetFederatedSettingsOrgRoleMappingArgs args, InvokeOptions? opts = null)
    public static Output<GetFederatedSettingsOrgRoleMappingResult> Invoke(GetFederatedSettingsOrgRoleMappingInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetFederatedSettingsOrgRoleMappingResult> getFederatedSettingsOrgRoleMapping(GetFederatedSettingsOrgRoleMappingArgs args, InvokeOptions options)
public static Output<GetFederatedSettingsOrgRoleMappingResult> getFederatedSettingsOrgRoleMapping(GetFederatedSettingsOrgRoleMappingArgs args, InvokeOptions options)
fn::invoke:
  function: mongodbatlas:index/getFederatedSettingsOrgRoleMapping:getFederatedSettingsOrgRoleMapping
  arguments:
    # arguments dictionaryThe following arguments are supported:
- FederationSettings stringId 
- Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
- OrgId string
- Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- RoleMapping stringId 
- FederationSettings stringId 
- Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
- OrgId string
- Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- RoleMapping stringId 
- federationSettings StringId 
- Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
- orgId String
- Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- roleMapping StringId 
- federationSettings stringId 
- Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
- orgId string
- Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- roleMapping stringId 
- federation_settings_ strid 
- Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
- org_id str
- Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- role_mapping_ strid 
- federationSettings StringId 
- Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
- orgId String
- Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- roleMapping StringId 
getFederatedSettingsOrgRoleMapping Result
The following output properties are available:
- ExternalGroup stringName 
- Unique human-readable label that identifies the identity provider group to which this role mapping applies.
- FederationSettings stringId 
- Id string
- Unique 24-hexadecimal digit string that identifies this role mapping.
- OrgId string
- RoleAssignments List<GetFederated Settings Org Role Mapping Role Assignment> 
- Atlas roles and the unique identifiers of the groups and organizations associated with each role.
- RoleMapping stringId 
- ExternalGroup stringName 
- Unique human-readable label that identifies the identity provider group to which this role mapping applies.
- FederationSettings stringId 
- Id string
- Unique 24-hexadecimal digit string that identifies this role mapping.
- OrgId string
- RoleAssignments []GetFederated Settings Org Role Mapping Role Assignment 
- Atlas roles and the unique identifiers of the groups and organizations associated with each role.
- RoleMapping stringId 
- externalGroup StringName 
- Unique human-readable label that identifies the identity provider group to which this role mapping applies.
- federationSettings StringId 
- id String
- Unique 24-hexadecimal digit string that identifies this role mapping.
- orgId String
- roleAssignments List<GetFederated Settings Org Role Mapping Role Assignment> 
- Atlas roles and the unique identifiers of the groups and organizations associated with each role.
- roleMapping StringId 
- externalGroup stringName 
- Unique human-readable label that identifies the identity provider group to which this role mapping applies.
- federationSettings stringId 
- id string
- Unique 24-hexadecimal digit string that identifies this role mapping.
- orgId string
- roleAssignments GetFederated Settings Org Role Mapping Role Assignment[] 
- Atlas roles and the unique identifiers of the groups and organizations associated with each role.
- roleMapping stringId 
- external_group_ strname 
- Unique human-readable label that identifies the identity provider group to which this role mapping applies.
- federation_settings_ strid 
- id str
- Unique 24-hexadecimal digit string that identifies this role mapping.
- org_id str
- role_assignments Sequence[GetFederated Settings Org Role Mapping Role Assignment] 
- Atlas roles and the unique identifiers of the groups and organizations associated with each role.
- role_mapping_ strid 
- externalGroup StringName 
- Unique human-readable label that identifies the identity provider group to which this role mapping applies.
- federationSettings StringId 
- id String
- Unique 24-hexadecimal digit string that identifies this role mapping.
- orgId String
- roleAssignments List<Property Map>
- Atlas roles and the unique identifiers of the groups and organizations associated with each role.
- roleMapping StringId 
Supporting Types
GetFederatedSettingsOrgRoleMappingRoleAssignment       
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the mongodbatlasTerraform Provider.