MongoDB Atlas

Pulumi Official
Package maintained by Pulumi
v3.3.0 published on Thursday, Mar 17, 2022 by Pulumi

getProjects

mongodbatlas.getProjects describe all Projects. This represents projects that have been created.

NOTE: Groups and projects are synonymous terms. You may find groupId in the official documentation.

Example Usage

Coming soon!

Coming soon!

Coming soon!

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const testMongodbatlasProject = new mongodbatlas.Project("test", {
    apiKeys: [{
        apiKeyId: "61003b299dda8d54a9d7d10c",
        roleNames: ["GROUP_READ_ONLY"],
    }],
    orgId: "<ORG_ID>",
    teams: [
        {
            roleNames: ["GROUP_OWNER"],
            teamId: "5e0fa8c99ccf641c722fe645",
        },
        {
            roleNames: [
                "GROUP_READ_ONLY",
                "GROUP_DATA_ACCESS_READ_WRITE",
            ],
            teamId: "5e1dd7b4f2a30ba80a70cd4rw",
        },
    ],
});
const testProject = pulumi.output(mongodbatlas.getProject({
    itemsPerPage: 5,
    pageNum: 1,
}));

Coming soon!

Using getProjects

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 getProjects(args: GetProjectsArgs, opts?: InvokeOptions): Promise<GetProjectsResult>
function getProjectsOutput(args: GetProjectsOutputArgs, opts?: InvokeOptions): Output<GetProjectsResult>
def get_projects(items_per_page: Optional[int] = None,
                 page_num: Optional[int] = None,
                 opts: Optional[InvokeOptions] = None) -> GetProjectsResult
def get_projects_output(items_per_page: Optional[pulumi.Input[int]] = None,
                 page_num: Optional[pulumi.Input[int]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetProjectsResult]
func LookupProjects(ctx *Context, args *LookupProjectsArgs, opts ...InvokeOption) (*LookupProjectsResult, error)
func LookupProjectsOutput(ctx *Context, args *LookupProjectsOutputArgs, opts ...InvokeOption) LookupProjectsResultOutput

> Note: This function is named LookupProjects in the Go SDK.

public static class GetProjects 
{
    public static Task<GetProjectsResult> InvokeAsync(GetProjectsArgs args, InvokeOptions? opts = null)
    public static Output<GetProjectsResult> Invoke(GetProjectsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetProjectsResult> getProjects(GetProjectsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: mongodbatlas:index/getProjects:getProjects
  Arguments:
    # Arguments dictionary

The following arguments are supported:

ItemsPerPage int

Number of items to return per page, up to a maximum of 500. Defaults to 100.

PageNum int

The page to return. Defaults to 1.

ItemsPerPage int

Number of items to return per page, up to a maximum of 500. Defaults to 100.

PageNum int

The page to return. Defaults to 1.

itemsPerPage Integer

Number of items to return per page, up to a maximum of 500. Defaults to 100.

pageNum Integer

The page to return. Defaults to 1.

itemsPerPage number

Number of items to return per page, up to a maximum of 500. Defaults to 100.

pageNum number

The page to return. Defaults to 1.

items_per_page int

Number of items to return per page, up to a maximum of 500. Defaults to 100.

page_num int

The page to return. Defaults to 1.

itemsPerPage Number

Number of items to return per page, up to a maximum of 500. Defaults to 100.

pageNum Number

The page to return. Defaults to 1.

getProjects Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Results List<GetProjectsResult>
TotalCount int
ItemsPerPage int
PageNum int
Id string

The provider-assigned unique ID for this managed resource.

Results []GetProjectsResult
TotalCount int
ItemsPerPage int
PageNum int
id String

The provider-assigned unique ID for this managed resource.

results ListProjectsResult>
totalCount Integer
itemsPerPage Integer
pageNum Integer
id string

The provider-assigned unique ID for this managed resource.

results GetProjectsResult[]
totalCount number
itemsPerPage number
pageNum number
id str

The provider-assigned unique ID for this managed resource.

results Sequence[GetProjectsResult]
total_count int
items_per_page int
page_num int
id String

The provider-assigned unique ID for this managed resource.

results List
totalCount Number
itemsPerPage Number
pageNum Number

Supporting Types

GetProjectsResult

ApiKeys List<GetProjectsResultApiKey>
ClusterCount int
Created string
Id string

Autogenerated Unique ID for this data source.

Name string

The name of the project you want to create. (Cannot be changed via this Provider after creation.)

OrgId string

The ID of the organization you want to create the project within. *cluster_count - The number of Atlas clusters deployed in the project. *created - The ISO-8601-formatted timestamp of when Atlas created the project.

  • teams.#.team_id - The unique identifier of the team you want to associate with the project. The team and project must share the same parent organization.
  • teams.#.role_names - Each string in the array represents a project role assigned to the team. Every user associated with the team inherits these roles. The following are valid roles:
  • GROUP_OWNER
  • GROUP_READ_ONLY
  • GROUP_DATA_ACCESS_ADMIN
  • GROUP_DATA_ACCESS_READ_WRITE
  • GROUP_DATA_ACCESS_READ_ONLY
  • GROUP_CLUSTER_MANAGER
  • api_keys.#.api_key_id - The unique identifier of the Organization Programmatic API key assigned to the Project.
  • api_keys.#.role_names - List of roles that the Organization Programmatic API key has been assigned. The following are valid roles:
  • GROUP_OWNER
  • GROUP_READ_ONLY
  • GROUP_DATA_ACCESS_ADMIN
  • GROUP_DATA_ACCESS_READ_WRITE
  • GROUP_DATA_ACCESS_READ_ONLY
  • GROUP_CLUSTER_MANAGER
Teams List<GetProjectsResultTeam>
ApiKeys []GetProjectsResultApiKey
ClusterCount int
Created string
Id string

Autogenerated Unique ID for this data source.

Name string

The name of the project you want to create. (Cannot be changed via this Provider after creation.)

OrgId string

The ID of the organization you want to create the project within. *cluster_count - The number of Atlas clusters deployed in the project. *created - The ISO-8601-formatted timestamp of when Atlas created the project.

  • teams.#.team_id - The unique identifier of the team you want to associate with the project. The team and project must share the same parent organization.
  • teams.#.role_names - Each string in the array represents a project role assigned to the team. Every user associated with the team inherits these roles. The following are valid roles:
  • GROUP_OWNER
  • GROUP_READ_ONLY
  • GROUP_DATA_ACCESS_ADMIN
  • GROUP_DATA_ACCESS_READ_WRITE
  • GROUP_DATA_ACCESS_READ_ONLY
  • GROUP_CLUSTER_MANAGER
  • api_keys.#.api_key_id - The unique identifier of the Organization Programmatic API key assigned to the Project.
  • api_keys.#.role_names - List of roles that the Organization Programmatic API key has been assigned. The following are valid roles:
  • GROUP_OWNER
  • GROUP_READ_ONLY
  • GROUP_DATA_ACCESS_ADMIN
  • GROUP_DATA_ACCESS_READ_WRITE
  • GROUP_DATA_ACCESS_READ_ONLY
  • GROUP_CLUSTER_MANAGER
Teams []GetProjectsResultTeam
apiKeys ListProjectsResultApiKey>
clusterCount Integer
created String
id String

Autogenerated Unique ID for this data source.

name String

The name of the project you want to create. (Cannot be changed via this Provider after creation.)

orgId String

The ID of the organization you want to create the project within. *cluster_count - The number of Atlas clusters deployed in the project. *created - The ISO-8601-formatted timestamp of when Atlas created the project.

  • teams.#.team_id - The unique identifier of the team you want to associate with the project. The team and project must share the same parent organization.
  • teams.#.role_names - Each string in the array represents a project role assigned to the team. Every user associated with the team inherits these roles. The following are valid roles:
  • GROUP_OWNER
  • GROUP_READ_ONLY
  • GROUP_DATA_ACCESS_ADMIN
  • GROUP_DATA_ACCESS_READ_WRITE
  • GROUP_DATA_ACCESS_READ_ONLY
  • GROUP_CLUSTER_MANAGER
  • api_keys.#.api_key_id - The unique identifier of the Organization Programmatic API key assigned to the Project.
  • api_keys.#.role_names - List of roles that the Organization Programmatic API key has been assigned. The following are valid roles:
  • GROUP_OWNER
  • GROUP_READ_ONLY
  • GROUP_DATA_ACCESS_ADMIN
  • GROUP_DATA_ACCESS_READ_WRITE
  • GROUP_DATA_ACCESS_READ_ONLY
  • GROUP_CLUSTER_MANAGER
teams ListProjectsResultTeam>
apiKeys GetProjectsResultApiKey[]
clusterCount number
created string
id string

Autogenerated Unique ID for this data source.

name string

The name of the project you want to create. (Cannot be changed via this Provider after creation.)

orgId string

The ID of the organization you want to create the project within. *cluster_count - The number of Atlas clusters deployed in the project. *created - The ISO-8601-formatted timestamp of when Atlas created the project.

  • teams.#.team_id - The unique identifier of the team you want to associate with the project. The team and project must share the same parent organization.
  • teams.#.role_names - Each string in the array represents a project role assigned to the team. Every user associated with the team inherits these roles. The following are valid roles:
  • GROUP_OWNER
  • GROUP_READ_ONLY
  • GROUP_DATA_ACCESS_ADMIN
  • GROUP_DATA_ACCESS_READ_WRITE
  • GROUP_DATA_ACCESS_READ_ONLY
  • GROUP_CLUSTER_MANAGER
  • api_keys.#.api_key_id - The unique identifier of the Organization Programmatic API key assigned to the Project.
  • api_keys.#.role_names - List of roles that the Organization Programmatic API key has been assigned. The following are valid roles:
  • GROUP_OWNER
  • GROUP_READ_ONLY
  • GROUP_DATA_ACCESS_ADMIN
  • GROUP_DATA_ACCESS_READ_WRITE
  • GROUP_DATA_ACCESS_READ_ONLY
  • GROUP_CLUSTER_MANAGER
teams GetProjectsResultTeam[]
api_keys Sequence[GetProjectsResultApiKey]
cluster_count int
created str
id str

Autogenerated Unique ID for this data source.

name str

The name of the project you want to create. (Cannot be changed via this Provider after creation.)

org_id str

The ID of the organization you want to create the project within. *cluster_count - The number of Atlas clusters deployed in the project. *created - The ISO-8601-formatted timestamp of when Atlas created the project.

  • teams.#.team_id - The unique identifier of the team you want to associate with the project. The team and project must share the same parent organization.
  • teams.#.role_names - Each string in the array represents a project role assigned to the team. Every user associated with the team inherits these roles. The following are valid roles:
  • GROUP_OWNER
  • GROUP_READ_ONLY
  • GROUP_DATA_ACCESS_ADMIN
  • GROUP_DATA_ACCESS_READ_WRITE
  • GROUP_DATA_ACCESS_READ_ONLY
  • GROUP_CLUSTER_MANAGER
  • api_keys.#.api_key_id - The unique identifier of the Organization Programmatic API key assigned to the Project.
  • api_keys.#.role_names - List of roles that the Organization Programmatic API key has been assigned. The following are valid roles:
  • GROUP_OWNER
  • GROUP_READ_ONLY
  • GROUP_DATA_ACCESS_ADMIN
  • GROUP_DATA_ACCESS_READ_WRITE
  • GROUP_DATA_ACCESS_READ_ONLY
  • GROUP_CLUSTER_MANAGER
teams Sequence[GetProjectsResultTeam]
apiKeys List
clusterCount Number
created String
id String

Autogenerated Unique ID for this data source.

name String

The name of the project you want to create. (Cannot be changed via this Provider after creation.)

orgId String

The ID of the organization you want to create the project within. *cluster_count - The number of Atlas clusters deployed in the project. *created - The ISO-8601-formatted timestamp of when Atlas created the project.

  • teams.#.team_id - The unique identifier of the team you want to associate with the project. The team and project must share the same parent organization.
  • teams.#.role_names - Each string in the array represents a project role assigned to the team. Every user associated with the team inherits these roles. The following are valid roles:
  • GROUP_OWNER
  • GROUP_READ_ONLY
  • GROUP_DATA_ACCESS_ADMIN
  • GROUP_DATA_ACCESS_READ_WRITE
  • GROUP_DATA_ACCESS_READ_ONLY
  • GROUP_CLUSTER_MANAGER
  • api_keys.#.api_key_id - The unique identifier of the Organization Programmatic API key assigned to the Project.
  • api_keys.#.role_names - List of roles that the Organization Programmatic API key has been assigned. The following are valid roles:
  • GROUP_OWNER
  • GROUP_READ_ONLY
  • GROUP_DATA_ACCESS_ADMIN
  • GROUP_DATA_ACCESS_READ_WRITE
  • GROUP_DATA_ACCESS_READ_ONLY
  • GROUP_CLUSTER_MANAGER
teams List

GetProjectsResultApiKey

ApiKeyId string
RoleNames List<string>
ApiKeyId string
RoleNames []string
apiKeyId String
roleNames List
apiKeyId string
roleNames string[]
api_key_id str
role_names Sequence[str]
apiKeyId String
roleNames List

GetProjectsResultTeam

RoleNames List<string>
TeamId string
RoleNames []string
TeamId string
roleNames List
teamId String
roleNames string[]
teamId string
role_names Sequence[str]
team_id str
roleNames List
teamId String

Package Details

Repository
https://github.com/pulumi/pulumi-mongodbatlas
License
Apache-2.0
Notes

This Pulumi package is based on the mongodbatlas Terraform Provider.