1. Packages
  2. Mongodbatlas Provider
  3. API Docs
  4. getCloudProviderAccessSetup
MongoDB Atlas v3.20.4 published on Wednesday, Oct 30, 2024 by Pulumi

mongodbatlas.getCloudProviderAccessSetup

Explore with Pulumi AI

mongodbatlas logo
MongoDB Atlas v3.20.4 published on Wednesday, Oct 30, 2024 by Pulumi

    # 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:

    ProjectId string
    The unique ID for the project to get all Cloud Provider Access
    ProviderName string
    cloud provider name, currently only AWS is supported
    RoleId string
    unique role id among all the aws roles provided by mongodb atlas
    AzureConfigs List<GetCloudProviderAccessSetupAzureConfig>
    azure related configurations
    ProjectId string
    The unique ID for the project to get all Cloud Provider Access
    ProviderName string
    cloud provider name, currently only AWS is supported
    RoleId string
    unique role id among all the aws roles provided by mongodb atlas
    AzureConfigs []GetCloudProviderAccessSetupAzureConfig
    azure related configurations
    projectId String
    The unique ID for the project to get all Cloud Provider Access
    providerName String
    cloud provider name, currently only AWS is supported
    roleId String
    unique role id among all the aws roles provided by mongodb atlas
    azureConfigs List<GetCloudProviderAccessSetupAzureConfig>
    azure related configurations
    projectId string
    The unique ID for the project to get all Cloud Provider Access
    providerName string
    cloud provider name, currently only AWS is supported
    roleId string
    unique role id among all the aws roles provided by mongodb atlas
    azureConfigs GetCloudProviderAccessSetupAzureConfig[]
    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[GetCloudProviderAccessSetupAzureConfig]
    azure related configurations
    projectId String
    The unique ID for the project to get all Cloud Provider Access
    providerName String
    cloud provider name, currently only AWS is supported
    roleId String
    unique role id among all the aws roles provided by mongodb atlas
    azureConfigs List<Property Map>
    azure related configurations

    getCloudProviderAccessSetup Result

    The following output properties are available:

    Aws Dictionary<string, string>
    aws related role information
    AwsConfigs List<GetCloudProviderAccessSetupAwsConfig>
    aws related role information
    CreatedDate string
    Date on which this role was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdatedDate string
    Date and time when this Azure Service Principal was last updated. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    ProjectId string
    ProviderName string
    RoleId string
    AzureConfigs List<GetCloudProviderAccessSetupAzureConfig>
    azure related configurations
    Aws map[string]string
    aws related role information
    AwsConfigs []GetCloudProviderAccessSetupAwsConfig
    aws related role information
    CreatedDate string
    Date on which this role was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdatedDate string
    Date and time when this Azure Service Principal was last updated. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    ProjectId string
    ProviderName string
    RoleId string
    AzureConfigs []GetCloudProviderAccessSetupAzureConfig
    azure related configurations
    aws Map<String,String>
    aws related role information
    awsConfigs List<GetCloudProviderAccessSetupAwsConfig>
    aws related role information
    createdDate String
    Date on which this role was created.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdatedDate String
    Date and time when this Azure Service Principal was last updated. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    projectId String
    providerName String
    roleId String
    azureConfigs List<GetCloudProviderAccessSetupAzureConfig>
    azure related configurations
    aws {[key: string]: string}
    aws related role information
    awsConfigs GetCloudProviderAccessSetupAwsConfig[]
    aws related role information
    createdDate string
    Date on which this role was created.
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdatedDate string
    Date and time when this Azure Service Principal was last updated. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    projectId string
    providerName string
    roleId string
    azureConfigs GetCloudProviderAccessSetupAzureConfig[]
    azure related configurations
    aws Mapping[str, str]
    aws related role information
    aws_configs Sequence[GetCloudProviderAccessSetupAwsConfig]
    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_date str
    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[GetCloudProviderAccessSetupAzureConfig]
    azure related configurations
    aws Map<String>
    aws related role information
    awsConfigs List<Property Map>
    aws related role information
    createdDate String
    Date on which this role was created.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdatedDate String
    Date and time when this Azure Service Principal was last updated. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    projectId String
    providerName String
    roleId String
    azureConfigs List<Property Map>
    azure related configurations

    Supporting Types

    GetCloudProviderAccessSetupAwsConfig

    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.
    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.
    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.
    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.
    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.
    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.

    GetCloudProviderAccessSetupAzureConfig

    AtlasAzureAppId string
    Azure Active Directory Application ID of Atlas.
    ServicePrincipalId string
    UUID string that identifies the Azure Service Principal.
    TenantId string
    UUID String that identifies the Azure Active Directory Tenant ID.
    AtlasAzureAppId string
    Azure Active Directory Application ID of Atlas.
    ServicePrincipalId string
    UUID string that identifies the Azure Service Principal.
    TenantId string
    UUID String that identifies the Azure Active Directory Tenant ID.
    atlasAzureAppId String
    Azure Active Directory Application ID of Atlas.
    servicePrincipalId String
    UUID string that identifies the Azure Service Principal.
    tenantId String
    UUID String that identifies the Azure Active Directory Tenant ID.
    atlasAzureAppId string
    Azure Active Directory Application ID of Atlas.
    servicePrincipalId string
    UUID string that identifies the Azure Service Principal.
    tenantId string
    UUID String that identifies the Azure Active Directory Tenant ID.
    atlas_azure_app_id str
    Azure Active Directory Application ID of Atlas.
    service_principal_id str
    UUID string that identifies the Azure Service Principal.
    tenant_id str
    UUID String that identifies the Azure Active Directory Tenant ID.
    atlasAzureAppId String
    Azure Active Directory Application ID of Atlas.
    servicePrincipalId String
    UUID string that identifies the Azure Service Principal.
    tenantId 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.
    mongodbatlas logo
    MongoDB Atlas v3.20.4 published on Wednesday, Oct 30, 2024 by Pulumi