MongoDB Atlas

v3.5.1 published on Thursday, Sep 15, 2022 by Pulumi

getCloudProviderAccess

mongodbatlas.CloudProviderAccess allows you to get the list of cloud provider access roles, currently only AWS is supported.

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

Example Usage

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

return await Deployment.RunAsync(() => 
{
    var testRole = new Mongodbatlas.CloudProviderAccess("testRole", new()
    {
        ProjectId = "<PROJECT-ID>",
        ProviderName = "AWS",
    });

    var all = Mongodbatlas.GetCloudProviderAccess.Invoke(new()
    {
        ProjectId = testRole.ProjectId,
    });

});
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 {
		testRole, err := mongodbatlas.NewCloudProviderAccess(ctx, "testRole", &mongodbatlas.CloudProviderAccessArgs{
			ProjectId:    pulumi.String("<PROJECT-ID>"),
			ProviderName: pulumi.String("AWS"),
		})
		if err != nil {
			return err
		}
		_ = mongodbatlas.LookupCloudProviderAccessOutput(ctx, GetCloudProviderAccessOutputArgs{
			ProjectId: testRole.ProjectId,
		}, nil)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.CloudProviderAccess;
import com.pulumi.mongodbatlas.CloudProviderAccessArgs;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetCloudProviderAccessArgs;
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 testRole = new CloudProviderAccess("testRole", CloudProviderAccessArgs.builder()        
            .projectId("<PROJECT-ID>")
            .providerName("AWS")
            .build());

        final var all = MongodbatlasFunctions.getCloudProviderAccess(GetCloudProviderAccessArgs.builder()
            .projectId(testRole.projectId())
            .build());

    }
}
import pulumi
import pulumi_mongodbatlas as mongodbatlas

test_role = mongodbatlas.CloudProviderAccess("testRole",
    project_id="<PROJECT-ID>",
    provider_name="AWS")
all = mongodbatlas.get_cloud_provider_access_output(project_id=test_role.project_id)
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const testRole = new mongodbatlas.CloudProviderAccess("testRole", {
    projectId: "<PROJECT-ID>",
    providerName: "AWS",
});
const all = mongodbatlas.getCloudProviderAccessOutput({
    projectId: testRole.projectId,
});
resources:
  testRole:
    type: mongodbatlas:CloudProviderAccess
    properties:
      projectId: <PROJECT-ID>
      providerName: AWS
variables:
  all:
    Fn::Invoke:
      Function: mongodbatlas:getCloudProviderAccess
      Arguments:
        projectId: ${testRole.projectId}

Using getCloudProviderAccess

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 getCloudProviderAccess(args: GetCloudProviderAccessArgs, opts?: InvokeOptions): Promise<GetCloudProviderAccessResult>
function getCloudProviderAccessOutput(args: GetCloudProviderAccessOutputArgs, opts?: InvokeOptions): Output<GetCloudProviderAccessResult>
def get_cloud_provider_access(project_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetCloudProviderAccessResult
def get_cloud_provider_access_output(project_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetCloudProviderAccessResult]
func LookupCloudProviderAccess(ctx *Context, args *LookupCloudProviderAccessArgs, opts ...InvokeOption) (*LookupCloudProviderAccessResult, error)
func LookupCloudProviderAccessOutput(ctx *Context, args *LookupCloudProviderAccessOutputArgs, opts ...InvokeOption) LookupCloudProviderAccessResultOutput

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

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

The following arguments are supported:

ProjectId string

The unique ID for the project to get all Cloud Provider Access

ProjectId string

The unique ID for the project to get all Cloud Provider Access

projectId String

The unique ID for the project to get all Cloud Provider Access

projectId string

The unique ID for the project to get all Cloud Provider Access

project_id str

The unique ID for the project to get all Cloud Provider Access

projectId String

The unique ID for the project to get all Cloud Provider Access

getCloudProviderAccess Result

The following output properties are available:

AwsIamRoles List<GetCloudProviderAccessAwsIamRole>

A list where each represents a Cloud Provider Access Role.

Id string

The provider-assigned unique ID for this managed resource.

ProjectId string
AwsIamRoles []GetCloudProviderAccessAwsIamRole

A list where each represents a Cloud Provider Access Role.

Id string

The provider-assigned unique ID for this managed resource.

ProjectId string
awsIamRoles List<GetCloudProviderAccessAwsIamRole>

A list where each represents a Cloud Provider Access Role.

id String

The provider-assigned unique ID for this managed resource.

projectId String
awsIamRoles GetCloudProviderAccessAwsIamRole[]

A list where each represents a Cloud Provider Access Role.

id string

The provider-assigned unique ID for this managed resource.

projectId string
aws_iam_roles Sequence[GetCloudProviderAccessAwsIamRole]

A list where each represents a Cloud Provider Access Role.

id str

The provider-assigned unique ID for this managed resource.

project_id str
awsIamRoles List<Property Map>

A list where each represents a Cloud Provider Access Role.

id String

The provider-assigned unique ID for this managed resource.

projectId String

Supporting Types

GetCloudProviderAccessAwsIamRole

AtlasAssumedRoleExternalId string

Unique external ID Atlas uses when assuming the IAM role in your AWS account.

AtlasAwsAccountArn string

ARN associated with the Atlas AWS account used to assume IAM roles in your AWS account.

AuthorizedDate string

Date on which this role was authorized.

CreatedDate string

Date on which this role was created.

FeatureUsages List<GetCloudProviderAccessAwsIamRoleFeatureUsage>

Atlas features this AWS IAM role is linked to.

IamAssumedRoleArn string

ARN of the IAM Role that Atlas assumes when accessing resources in your AWS account.

ProviderName string

Name of the cloud provider. Currently limited to AWS.

RoleId string

Unique ID of this role.

AtlasAssumedRoleExternalId string

Unique external ID Atlas uses when assuming the IAM role in your AWS account.

AtlasAwsAccountArn string

ARN associated with the Atlas AWS account used to assume IAM roles in your AWS account.

AuthorizedDate string

Date on which this role was authorized.

CreatedDate string

Date on which this role was created.

FeatureUsages []GetCloudProviderAccessAwsIamRoleFeatureUsage

Atlas features this AWS IAM role is linked to.

IamAssumedRoleArn string

ARN of the IAM Role that Atlas assumes when accessing resources in your AWS account.

ProviderName string

Name of the cloud provider. Currently limited to AWS.

RoleId string

Unique ID of this role.

atlasAssumedRoleExternalId String

Unique external ID Atlas uses when assuming the IAM role in your AWS account.

atlasAwsAccountArn String

ARN associated with the Atlas AWS account used to assume IAM roles in your AWS account.

authorizedDate String

Date on which this role was authorized.

createdDate String

Date on which this role was created.

featureUsages List<GetCloudProviderAccessAwsIamRoleFeatureUsage>

Atlas features this AWS IAM role is linked to.

iamAssumedRoleArn String

ARN of the IAM Role that Atlas assumes when accessing resources in your AWS account.

providerName String

Name of the cloud provider. Currently limited to AWS.

roleId String

Unique ID of this role.

atlasAssumedRoleExternalId string

Unique external ID Atlas uses when assuming the IAM role in your AWS account.

atlasAwsAccountArn string

ARN associated with the Atlas AWS account used to assume IAM roles in your AWS account.

authorizedDate string

Date on which this role was authorized.

createdDate string

Date on which this role was created.

featureUsages GetCloudProviderAccessAwsIamRoleFeatureUsage[]

Atlas features this AWS IAM role is linked to.

iamAssumedRoleArn string

ARN of the IAM Role that Atlas assumes when accessing resources in your AWS account.

providerName string

Name of the cloud provider. Currently limited to AWS.

roleId string

Unique ID of this role.

atlas_assumed_role_external_id str

Unique external ID Atlas uses when assuming the IAM role in your AWS account.

atlas_aws_account_arn str

ARN associated with the Atlas AWS account used to assume IAM roles in your AWS account.

authorized_date str

Date on which this role was authorized.

created_date str

Date on which this role was created.

feature_usages Sequence[GetCloudProviderAccessAwsIamRoleFeatureUsage]

Atlas features this AWS IAM role is linked to.

iam_assumed_role_arn str

ARN of the IAM Role that Atlas assumes when accessing resources in your AWS account.

provider_name str

Name of the cloud provider. Currently limited to AWS.

role_id str

Unique ID of this role.

atlasAssumedRoleExternalId String

Unique external ID Atlas uses when assuming the IAM role in your AWS account.

atlasAwsAccountArn String

ARN associated with the Atlas AWS account used to assume IAM roles in your AWS account.

authorizedDate String

Date on which this role was authorized.

createdDate String

Date on which this role was created.

featureUsages List<Property Map>

Atlas features this AWS IAM role is linked to.

iamAssumedRoleArn String

ARN of the IAM Role that Atlas assumes when accessing resources in your AWS account.

providerName String

Name of the cloud provider. Currently limited to AWS.

roleId String

Unique ID of this role.

GetCloudProviderAccessAwsIamRoleFeatureUsage

FeatureId Dictionary<string, object>
FeatureType string
FeatureId map[string]interface{}
FeatureType string
featureId Map<String,Object>
featureType String
featureId {[key: string]: any}
featureType string
feature_id Mapping[str, Any]
feature_type str
featureId Map<Any>
featureType 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.