mongodbatlas.getCloudProviderAccess
Explore with Pulumi AI
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, mongodbatlas.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:
- Project
Id string The unique ID for the project to get all Cloud Provider Access
- Project
Id string The unique ID for the project to get all Cloud Provider Access
- project
Id String The unique ID for the project to get all Cloud Provider Access
- project
Id 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
- project
Id String The unique ID for the project to get all Cloud Provider Access
getCloudProviderAccess Result
The following output properties are available:
- Aws
Iam List<GetRoles Cloud Provider Access Aws Iam Role> A list where each represents a Cloud Provider Access Role.
- Id string
The provider-assigned unique ID for this managed resource.
- Project
Id string
- Aws
Iam []GetRoles Cloud Provider Access Aws Iam Role A list where each represents a Cloud Provider Access Role.
- Id string
The provider-assigned unique ID for this managed resource.
- Project
Id string
- aws
Iam List<GetRoles Cloud Provider Access Aws Iam Role> A list where each represents a Cloud Provider Access Role.
- id String
The provider-assigned unique ID for this managed resource.
- project
Id String
- aws
Iam GetRoles Cloud Provider Access Aws Iam Role[] A list where each represents a Cloud Provider Access Role.
- id string
The provider-assigned unique ID for this managed resource.
- project
Id string
- aws_
iam_ Sequence[Getroles Cloud Provider Access Aws Iam Role] A list where each represents a Cloud Provider Access Role.
- id str
The provider-assigned unique ID for this managed resource.
- project_
id str
- aws
Iam List<Property Map>Roles A list where each represents a Cloud Provider Access Role.
- id String
The provider-assigned unique ID for this managed resource.
- project
Id String
Supporting Types
GetCloudProviderAccessAwsIamRole
- Atlas
Assumed stringRole External Id Unique external ID Atlas uses when assuming the IAM role in your AWS account.
- Atlas
Aws stringAccount Arn ARN associated with the Atlas AWS account used to assume IAM roles in your AWS account.
- string
Date on which this role was authorized.
- Created
Date string Date on which this role was created.
- Feature
Usages List<GetCloud Provider Access Aws Iam Role Feature Usage> Atlas features this AWS IAM role is linked to.
- Iam
Assumed stringRole Arn ARN of the IAM Role that Atlas assumes when accessing resources in your AWS account.
- Provider
Name string Name of the cloud provider. Currently limited to AWS.
- Role
Id string Unique ID of this role.
- Atlas
Assumed stringRole External Id Unique external ID Atlas uses when assuming the IAM role in your AWS account.
- Atlas
Aws stringAccount Arn ARN associated with the Atlas AWS account used to assume IAM roles in your AWS account.
- string
Date on which this role was authorized.
- Created
Date string Date on which this role was created.
- Feature
Usages []GetCloud Provider Access Aws Iam Role Feature Usage Atlas features this AWS IAM role is linked to.
- Iam
Assumed stringRole Arn ARN of the IAM Role that Atlas assumes when accessing resources in your AWS account.
- Provider
Name string Name of the cloud provider. Currently limited to AWS.
- Role
Id string Unique ID of this role.
- atlas
Assumed StringRole External Id Unique external ID Atlas uses when assuming the IAM role in your AWS account.
- atlas
Aws StringAccount Arn ARN associated with the Atlas AWS account used to assume IAM roles in your AWS account.
- String
Date on which this role was authorized.
- created
Date String Date on which this role was created.
- feature
Usages List<GetCloud Provider Access Aws Iam Role Feature Usage> Atlas features this AWS IAM role is linked to.
- iam
Assumed StringRole Arn ARN of the IAM Role that Atlas assumes when accessing resources in your AWS account.
- provider
Name String Name of the cloud provider. Currently limited to AWS.
- role
Id String Unique ID of this role.
- atlas
Assumed stringRole External Id Unique external ID Atlas uses when assuming the IAM role in your AWS account.
- atlas
Aws stringAccount Arn ARN associated with the Atlas AWS account used to assume IAM roles in your AWS account.
- string
Date on which this role was authorized.
- created
Date string Date on which this role was created.
- feature
Usages GetCloud Provider Access Aws Iam Role Feature Usage[] Atlas features this AWS IAM role is linked to.
- iam
Assumed stringRole Arn ARN of the IAM Role that Atlas assumes when accessing resources in your AWS account.
- provider
Name string Name of the cloud provider. Currently limited to AWS.
- role
Id string Unique ID of this role.
- atlas_
assumed_ strrole_ external_ id Unique external ID Atlas uses when assuming the IAM role in your AWS account.
- atlas_
aws_ straccount_ arn ARN associated with the Atlas AWS account used to assume IAM roles in your AWS account.
- str
Date on which this role was authorized.
- created_
date str Date on which this role was created.
- feature_
usages Sequence[GetCloud Provider Access Aws Iam Role Feature Usage] Atlas features this AWS IAM role is linked to.
- iam_
assumed_ strrole_ arn 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.
- atlas
Assumed StringRole External Id Unique external ID Atlas uses when assuming the IAM role in your AWS account.
- atlas
Aws StringAccount Arn ARN associated with the Atlas AWS account used to assume IAM roles in your AWS account.
- String
Date on which this role was authorized.
- created
Date String Date on which this role was created.
- feature
Usages List<Property Map> Atlas features this AWS IAM role is linked to.
- iam
Assumed StringRole Arn ARN of the IAM Role that Atlas assumes when accessing resources in your AWS account.
- provider
Name String Name of the cloud provider. Currently limited to AWS.
- role
Id String Unique ID of this role.
GetCloudProviderAccessAwsIamRoleFeatureUsage
- Feature
Id Dictionary<string, object> - Feature
Type string
- Feature
Id map[string]interface{} - Feature
Type string
- feature
Id Map<String,Object> - feature
Type String
- feature
Id {[key: string]: any} - feature
Type string
- feature_
id Mapping[str, Any] - feature_
type str
- feature
Id Map<Any> - feature
Type String
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
mongodbatlas
Terraform Provider.