MongoDB Atlas v3.20.4 published on Wednesday, Oct 30, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: mongodbatlas:index/getFederatedSettingsOrgRoleMapping:getFederatedSettingsOrgRoleMapping
arguments:
# arguments dictionary
The following arguments are supported:
- Federation
Settings stringId - Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
- Org
Id string - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- Role
Mapping stringId
- Federation
Settings stringId - Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
- Org
Id string - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- Role
Mapping stringId
- federation
Settings StringId - Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
- org
Id String - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- role
Mapping StringId
- federation
Settings stringId - Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
- org
Id string - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- role
Mapping 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
- federation
Settings StringId - Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
- org
Id String - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- role
Mapping StringId
getFederatedSettingsOrgRoleMapping Result
The following output properties are available:
- External
Group stringName - Unique human-readable label that identifies the identity provider group to which this role mapping applies.
- Federation
Settings stringId - Id string
- Unique 24-hexadecimal digit string that identifies this role mapping.
- Org
Id string - Role
Assignments List<GetFederated Settings Org Role Mapping Role Assignment> - Atlas roles and the unique identifiers of the groups and organizations associated with each role.
- Role
Mapping stringId
- External
Group stringName - Unique human-readable label that identifies the identity provider group to which this role mapping applies.
- Federation
Settings stringId - Id string
- Unique 24-hexadecimal digit string that identifies this role mapping.
- Org
Id string - Role
Assignments []GetFederated Settings Org Role Mapping Role Assignment - Atlas roles and the unique identifiers of the groups and organizations associated with each role.
- Role
Mapping stringId
- external
Group StringName - Unique human-readable label that identifies the identity provider group to which this role mapping applies.
- federation
Settings StringId - id String
- Unique 24-hexadecimal digit string that identifies this role mapping.
- org
Id String - role
Assignments List<GetFederated Settings Org Role Mapping Role Assignment> - Atlas roles and the unique identifiers of the groups and organizations associated with each role.
- role
Mapping StringId
- external
Group stringName - Unique human-readable label that identifies the identity provider group to which this role mapping applies.
- federation
Settings stringId - id string
- Unique 24-hexadecimal digit string that identifies this role mapping.
- org
Id string - role
Assignments GetFederated Settings Org Role Mapping Role Assignment[] - Atlas roles and the unique identifiers of the groups and organizations associated with each role.
- role
Mapping 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
- external
Group StringName - Unique human-readable label that identifies the identity provider group to which this role mapping applies.
- federation
Settings StringId - id String
- Unique 24-hexadecimal digit string that identifies this role mapping.
- org
Id String - role
Assignments List<Property Map> - Atlas roles and the unique identifiers of the groups and organizations associated with each role.
- role
Mapping StringId
Supporting Types
GetFederatedSettingsOrgRoleMappingRoleAssignment
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlas
Terraform Provider.