MongoDB Atlas v3.20.4 published on Wednesday, Oct 30, 2024 by Pulumi
mongodbatlas.getCloudProviderAccessSetup
Explore with Pulumi AI
# Data Source: mongodbatlas.CloudProviderAccessSetup
mongodbatlas.CloudProviderAccessSetup
allows you to get a single role for a provider access role setup, currently only AWS and Azure are supported.
NOTE: Groups and projects are synonymous terms. You may find
groupId
in the official documentation.
Example Usage
With AWS
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const testRole = new mongodbatlas.CloudProviderAccessSetup("test_role", {
projectId: "64259ee860c43338194b0f8e",
providerName: "AWS",
});
const singleSetup = mongodbatlas.getCloudProviderAccessSetupOutput({
projectId: testRole.projectId,
providerName: testRole.providerName,
roleId: testRole.roleId,
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test_role = mongodbatlas.CloudProviderAccessSetup("test_role",
project_id="64259ee860c43338194b0f8e",
provider_name="AWS")
single_setup = mongodbatlas.get_cloud_provider_access_setup_output(project_id=test_role.project_id,
provider_name=test_role.provider_name,
role_id=test_role.role_id)
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.NewCloudProviderAccessSetup(ctx, "test_role", &mongodbatlas.CloudProviderAccessSetupArgs{
ProjectId: pulumi.String("64259ee860c43338194b0f8e"),
ProviderName: pulumi.String("AWS"),
})
if err != nil {
return err
}
_ = mongodbatlas.LookupCloudProviderAccessSetupOutput(ctx, mongodbatlas.GetCloudProviderAccessSetupOutputArgs{
ProjectId: testRole.ProjectId,
ProviderName: testRole.ProviderName,
RoleId: testRole.RoleId,
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var testRole = new Mongodbatlas.CloudProviderAccessSetup("test_role", new()
{
ProjectId = "64259ee860c43338194b0f8e",
ProviderName = "AWS",
});
var singleSetup = Mongodbatlas.GetCloudProviderAccessSetup.Invoke(new()
{
ProjectId = testRole.ProjectId,
ProviderName = testRole.ProviderName,
RoleId = testRole.RoleId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.CloudProviderAccessSetup;
import com.pulumi.mongodbatlas.CloudProviderAccessSetupArgs;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetCloudProviderAccessSetupArgs;
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 CloudProviderAccessSetup("testRole", CloudProviderAccessSetupArgs.builder()
.projectId("64259ee860c43338194b0f8e")
.providerName("AWS")
.build());
final var singleSetup = MongodbatlasFunctions.getCloudProviderAccessSetup(GetCloudProviderAccessSetupArgs.builder()
.projectId(testRole.projectId())
.providerName(testRole.providerName())
.roleId(testRole.roleId())
.build());
}
}
resources:
testRole:
type: mongodbatlas:CloudProviderAccessSetup
name: test_role
properties:
projectId: 64259ee860c43338194b0f8e
providerName: AWS
variables:
singleSetup:
fn::invoke:
Function: mongodbatlas:getCloudProviderAccessSetup
Arguments:
projectId: ${testRole.projectId}
providerName: ${testRole.providerName}
roleId: ${testRole.roleId}
With AZURE
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const testRole = new mongodbatlas.CloudProviderAccessSetup("test_role", {
projectId: "64259ee860c43338194b0f8e",
providerName: "AZURE",
azureConfigs: [{
atlasAzureAppId: "9f2deb0d-be22-4524-a403-df531868bac0",
servicePrincipalId: "22f1d2a6-d0e9-482a-83a4-b8dd7dddc2c1",
tenantId: "91402384-d71e-22f5-22dd-759e272cdc1c",
}],
});
const singleSetup = mongodbatlas.getCloudProviderAccessSetupOutput({
projectId: testRole.projectId,
providerName: testRole.providerName,
roleId: testRole.roleId,
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test_role = mongodbatlas.CloudProviderAccessSetup("test_role",
project_id="64259ee860c43338194b0f8e",
provider_name="AZURE",
azure_configs=[{
"atlas_azure_app_id": "9f2deb0d-be22-4524-a403-df531868bac0",
"service_principal_id": "22f1d2a6-d0e9-482a-83a4-b8dd7dddc2c1",
"tenant_id": "91402384-d71e-22f5-22dd-759e272cdc1c",
}])
single_setup = mongodbatlas.get_cloud_provider_access_setup_output(project_id=test_role.project_id,
provider_name=test_role.provider_name,
role_id=test_role.role_id)
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.NewCloudProviderAccessSetup(ctx, "test_role", &mongodbatlas.CloudProviderAccessSetupArgs{
ProjectId: pulumi.String("64259ee860c43338194b0f8e"),
ProviderName: pulumi.String("AZURE"),
AzureConfigs: mongodbatlas.CloudProviderAccessSetupAzureConfigArray{
&mongodbatlas.CloudProviderAccessSetupAzureConfigArgs{
AtlasAzureAppId: pulumi.String("9f2deb0d-be22-4524-a403-df531868bac0"),
ServicePrincipalId: pulumi.String("22f1d2a6-d0e9-482a-83a4-b8dd7dddc2c1"),
TenantId: pulumi.String("91402384-d71e-22f5-22dd-759e272cdc1c"),
},
},
})
if err != nil {
return err
}
_ = mongodbatlas.LookupCloudProviderAccessSetupOutput(ctx, mongodbatlas.GetCloudProviderAccessSetupOutputArgs{
ProjectId: testRole.ProjectId,
ProviderName: testRole.ProviderName,
RoleId: testRole.RoleId,
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var testRole = new Mongodbatlas.CloudProviderAccessSetup("test_role", new()
{
ProjectId = "64259ee860c43338194b0f8e",
ProviderName = "AZURE",
AzureConfigs = new[]
{
new Mongodbatlas.Inputs.CloudProviderAccessSetupAzureConfigArgs
{
AtlasAzureAppId = "9f2deb0d-be22-4524-a403-df531868bac0",
ServicePrincipalId = "22f1d2a6-d0e9-482a-83a4-b8dd7dddc2c1",
TenantId = "91402384-d71e-22f5-22dd-759e272cdc1c",
},
},
});
var singleSetup = Mongodbatlas.GetCloudProviderAccessSetup.Invoke(new()
{
ProjectId = testRole.ProjectId,
ProviderName = testRole.ProviderName,
RoleId = testRole.RoleId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.CloudProviderAccessSetup;
import com.pulumi.mongodbatlas.CloudProviderAccessSetupArgs;
import com.pulumi.mongodbatlas.inputs.CloudProviderAccessSetupAzureConfigArgs;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetCloudProviderAccessSetupArgs;
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 CloudProviderAccessSetup("testRole", CloudProviderAccessSetupArgs.builder()
.projectId("64259ee860c43338194b0f8e")
.providerName("AZURE")
.azureConfigs(CloudProviderAccessSetupAzureConfigArgs.builder()
.atlasAzureAppId("9f2deb0d-be22-4524-a403-df531868bac0")
.servicePrincipalId("22f1d2a6-d0e9-482a-83a4-b8dd7dddc2c1")
.tenantId("91402384-d71e-22f5-22dd-759e272cdc1c")
.build())
.build());
final var singleSetup = MongodbatlasFunctions.getCloudProviderAccessSetup(GetCloudProviderAccessSetupArgs.builder()
.projectId(testRole.projectId())
.providerName(testRole.providerName())
.roleId(testRole.roleId())
.build());
}
}
resources:
testRole:
type: mongodbatlas:CloudProviderAccessSetup
name: test_role
properties:
projectId: 64259ee860c43338194b0f8e
providerName: AZURE
azureConfigs:
- atlasAzureAppId: 9f2deb0d-be22-4524-a403-df531868bac0
servicePrincipalId: 22f1d2a6-d0e9-482a-83a4-b8dd7dddc2c1
tenantId: 91402384-d71e-22f5-22dd-759e272cdc1c
variables:
singleSetup:
fn::invoke:
Function: mongodbatlas:getCloudProviderAccessSetup
Arguments:
projectId: ${testRole.projectId}
providerName: ${testRole.providerName}
roleId: ${testRole.roleId}
Using getCloudProviderAccessSetup
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 getCloudProviderAccessSetup(args: GetCloudProviderAccessSetupArgs, opts?: InvokeOptions): Promise<GetCloudProviderAccessSetupResult>
function getCloudProviderAccessSetupOutput(args: GetCloudProviderAccessSetupOutputArgs, opts?: InvokeOptions): Output<GetCloudProviderAccessSetupResult>
def get_cloud_provider_access_setup(azure_configs: Optional[Sequence[GetCloudProviderAccessSetupAzureConfig]] = None,
project_id: Optional[str] = None,
provider_name: Optional[str] = None,
role_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCloudProviderAccessSetupResult
def get_cloud_provider_access_setup_output(azure_configs: Optional[pulumi.Input[Sequence[pulumi.Input[GetCloudProviderAccessSetupAzureConfigArgs]]]] = None,
project_id: Optional[pulumi.Input[str]] = None,
provider_name: Optional[pulumi.Input[str]] = None,
role_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCloudProviderAccessSetupResult]
func LookupCloudProviderAccessSetup(ctx *Context, args *LookupCloudProviderAccessSetupArgs, opts ...InvokeOption) (*LookupCloudProviderAccessSetupResult, error)
func LookupCloudProviderAccessSetupOutput(ctx *Context, args *LookupCloudProviderAccessSetupOutputArgs, opts ...InvokeOption) LookupCloudProviderAccessSetupResultOutput
> Note: This function is named LookupCloudProviderAccessSetup
in the Go SDK.
public static class GetCloudProviderAccessSetup
{
public static Task<GetCloudProviderAccessSetupResult> InvokeAsync(GetCloudProviderAccessSetupArgs args, InvokeOptions? opts = null)
public static Output<GetCloudProviderAccessSetupResult> Invoke(GetCloudProviderAccessSetupInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCloudProviderAccessSetupResult> getCloudProviderAccessSetup(GetCloudProviderAccessSetupArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: mongodbatlas:index/getCloudProviderAccessSetup:getCloudProviderAccessSetup
arguments:
# arguments dictionary
The following arguments are supported:
- Project
Id string - The unique ID for the project to get all Cloud Provider Access
- Provider
Name string - cloud provider name, currently only AWS is supported
- Role
Id string - unique role id among all the aws roles provided by mongodb atlas
- Azure
Configs List<GetCloud Provider Access Setup Azure Config> - azure related configurations
- Project
Id string - The unique ID for the project to get all Cloud Provider Access
- Provider
Name string - cloud provider name, currently only AWS is supported
- Role
Id string - unique role id among all the aws roles provided by mongodb atlas
- Azure
Configs []GetCloud Provider Access Setup Azure Config - azure related configurations
- project
Id String - The unique ID for the project to get all Cloud Provider Access
- provider
Name String - cloud provider name, currently only AWS is supported
- role
Id String - unique role id among all the aws roles provided by mongodb atlas
- azure
Configs List<GetCloud Provider Access Setup Azure Config> - azure related configurations
- project
Id string - The unique ID for the project to get all Cloud Provider Access
- provider
Name string - cloud provider name, currently only AWS is supported
- role
Id string - unique role id among all the aws roles provided by mongodb atlas
- azure
Configs GetCloud Provider Access Setup Azure Config[] - azure related configurations
- project_
id str - The unique ID for the project to get all Cloud Provider Access
- provider_
name str - cloud provider name, currently only AWS is supported
- role_
id str - unique role id among all the aws roles provided by mongodb atlas
- azure_
configs Sequence[GetCloud Provider Access Setup Azure Config] - azure related configurations
- project
Id String - The unique ID for the project to get all Cloud Provider Access
- provider
Name String - cloud provider name, currently only AWS is supported
- role
Id String - unique role id among all the aws roles provided by mongodb atlas
- azure
Configs List<Property Map> - azure related configurations
getCloudProviderAccessSetup Result
The following output properties are available:
- Aws Dictionary<string, string>
- aws related role information
- Aws
Configs List<GetCloud Provider Access Setup Aws Config> - aws related role information
- Created
Date string - Date on which this role was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated stringDate - Date and time when this Azure Service Principal was last updated. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- Project
Id string - Provider
Name string - Role
Id string - Azure
Configs List<GetCloud Provider Access Setup Azure Config> - azure related configurations
- Aws map[string]string
- aws related role information
- Aws
Configs []GetCloud Provider Access Setup Aws Config - aws related role information
- Created
Date string - Date on which this role was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated stringDate - Date and time when this Azure Service Principal was last updated. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- Project
Id string - Provider
Name string - Role
Id string - Azure
Configs []GetCloud Provider Access Setup Azure Config - azure related configurations
- aws Map<String,String>
- aws related role information
- aws
Configs List<GetCloud Provider Access Setup Aws Config> - aws related role information
- created
Date String - Date on which this role was created.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated StringDate - Date and time when this Azure Service Principal was last updated. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- project
Id String - provider
Name String - role
Id String - azure
Configs List<GetCloud Provider Access Setup Azure Config> - azure related configurations
- aws {[key: string]: string}
- aws related role information
- aws
Configs GetCloud Provider Access Setup Aws Config[] - aws related role information
- created
Date string - Date on which this role was created.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Updated stringDate - Date and time when this Azure Service Principal was last updated. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- project
Id string - provider
Name string - role
Id string - azure
Configs GetCloud Provider Access Setup Azure Config[] - azure related configurations
- aws Mapping[str, str]
- aws related role information
- aws_
configs Sequence[GetCloud Provider Access Setup Aws Config] - aws related role information
- created_
date str - Date on which this role was created.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
updated_ strdate - Date and time when this Azure Service Principal was last updated. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- project_
id str - provider_
name str - role_
id str - azure_
configs Sequence[GetCloud Provider Access Setup Azure Config] - azure related configurations
- aws Map<String>
- aws related role information
- aws
Configs List<Property Map> - aws related role information
- created
Date String - Date on which this role was created.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated StringDate - Date and time when this Azure Service Principal was last updated. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- project
Id String - provider
Name String - role
Id String - azure
Configs List<Property Map> - azure related configurations
Supporting Types
GetCloudProviderAccessSetupAwsConfig
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
GetCloudProviderAccessSetupAzureConfig
- Atlas
Azure stringApp Id - Azure Active Directory Application ID of Atlas.
- Service
Principal stringId - UUID string that identifies the Azure Service Principal.
- Tenant
Id string - UUID String that identifies the Azure Active Directory Tenant ID.
- Atlas
Azure stringApp Id - Azure Active Directory Application ID of Atlas.
- Service
Principal stringId - UUID string that identifies the Azure Service Principal.
- Tenant
Id string - UUID String that identifies the Azure Active Directory Tenant ID.
- atlas
Azure StringApp Id - Azure Active Directory Application ID of Atlas.
- service
Principal StringId - UUID string that identifies the Azure Service Principal.
- tenant
Id String - UUID String that identifies the Azure Active Directory Tenant ID.
- atlas
Azure stringApp Id - Azure Active Directory Application ID of Atlas.
- service
Principal stringId - UUID string that identifies the Azure Service Principal.
- tenant
Id string - UUID String that identifies the Azure Active Directory Tenant ID.
- atlas_
azure_ strapp_ id - Azure Active Directory Application ID of Atlas.
- service_
principal_ strid - UUID string that identifies the Azure Service Principal.
- tenant_
id str - UUID String that identifies the Azure Active Directory Tenant ID.
- atlas
Azure StringApp Id - Azure Active Directory Application ID of Atlas.
- service
Principal StringId - UUID string that identifies the Azure Service Principal.
- tenant
Id String - UUID String that identifies the Azure Active Directory Tenant ID.
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlas
Terraform Provider.