mongodbatlas.CloudProviderAccess
Explore with Pulumi AI
Authorize role
Once the resource is created add the field iam_assumed_role_arn
see Set Up Unified AWS Access , and execute a new pulumi up
this will create a PATCH request.
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const testRole = new mongodbatlas.CloudProviderAccess("testRole", {
iamAssumedRoleArn: "arn:aws:iam::772401394250:role/test-user-role",
projectId: "<PROJECT-ID>",
providerName: "AWS",
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test_role = mongodbatlas.CloudProviderAccess("testRole",
iam_assumed_role_arn="arn:aws:iam::772401394250:role/test-user-role",
project_id="<PROJECT-ID>",
provider_name="AWS")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var testRole = new Mongodbatlas.CloudProviderAccess("testRole", new()
{
IamAssumedRoleArn = "arn:aws:iam::772401394250:role/test-user-role",
ProjectId = "<PROJECT-ID>",
ProviderName = "AWS",
});
});
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 {
_, err := mongodbatlas.NewCloudProviderAccess(ctx, "testRole", &mongodbatlas.CloudProviderAccessArgs{
IamAssumedRoleArn: pulumi.String("arn:aws:iam::772401394250:role/test-user-role"),
ProjectId: pulumi.String("<PROJECT-ID>"),
ProviderName: pulumi.String("AWS"),
})
if err != nil {
return err
}
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 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()
.iamAssumedRoleArn("arn:aws:iam::772401394250:role/test-user-role")
.projectId("<PROJECT-ID>")
.providerName("AWS")
.build());
}
}
resources:
testRole:
type: mongodbatlas:CloudProviderAccess
properties:
iamAssumedRoleArn: arn:aws:iam::772401394250:role/test-user-role
projectId: <PROJECT-ID>
providerName: AWS
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var testRole = new Mongodbatlas.CloudProviderAccess("testRole", new()
{
ProjectId = "64259ee860c43338194b0f8e",
ProviderName = "AWS",
});
});
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 {
_, err := mongodbatlas.NewCloudProviderAccess(ctx, "testRole", &mongodbatlas.CloudProviderAccessArgs{
ProjectId: pulumi.String("64259ee860c43338194b0f8e"),
ProviderName: pulumi.String("AWS"),
})
if err != nil {
return err
}
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 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("64259ee860c43338194b0f8e")
.providerName("AWS")
.build());
}
}
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test_role = mongodbatlas.CloudProviderAccess("testRole",
project_id="64259ee860c43338194b0f8e",
provider_name="AWS")
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const testRole = new mongodbatlas.CloudProviderAccess("testRole", {
projectId: "64259ee860c43338194b0f8e",
providerName: "AWS",
});
resources:
testRole:
type: mongodbatlas:CloudProviderAccess
properties:
projectId: 64259ee860c43338194b0f8e
providerName: AWS
With AWS
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var testRole = new Mongodbatlas.CloudProviderAccessSetup("testRole", new()
{
ProjectId = "64259ee860c43338194b0f8e",
ProviderName = "AWS",
});
});
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 {
_, err := mongodbatlas.NewCloudProviderAccessSetup(ctx, "testRole", &mongodbatlas.CloudProviderAccessSetupArgs{
ProjectId: pulumi.String("64259ee860c43338194b0f8e"),
ProviderName: pulumi.String("AWS"),
})
if err != nil {
return err
}
return nil
})
}
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 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());
}
}
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test_role = mongodbatlas.CloudProviderAccessSetup("testRole",
project_id="64259ee860c43338194b0f8e",
provider_name="AWS")
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const testRole = new mongodbatlas.CloudProviderAccessSetup("testRole", {
projectId: "64259ee860c43338194b0f8e",
providerName: "AWS",
});
resources:
testRole:
type: mongodbatlas:CloudProviderAccessSetup
properties:
projectId: 64259ee860c43338194b0f8e
providerName: AWS
With Azure
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var testRole = new Mongodbatlas.CloudProviderAccessSetup("testRole", new()
{
AzureConfigs = new[]
{
new Mongodbatlas.Inputs.CloudProviderAccessSetupAzureConfigArgs
{
AtlasAzureAppId = "9f2deb0d-be22-4524-a403-df531868bac0",
ServicePrincipalId = "22f1d2a6-d0e9-482a-83a4-b8dd7dddc2c1",
TenantId = "91402384-d71e-22f5-22dd-759e272cdc1c",
},
},
ProjectId = "64259ee860c43338194b0f8e",
ProviderName = "AZURE",
});
});
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 {
_, err := mongodbatlas.NewCloudProviderAccessSetup(ctx, "testRole", &mongodbatlas.CloudProviderAccessSetupArgs{
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"),
},
},
ProjectId: pulumi.String("64259ee860c43338194b0f8e"),
ProviderName: pulumi.String("AZURE"),
})
if err != nil {
return err
}
return nil
})
}
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 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()
.azureConfigs(CloudProviderAccessSetupAzureConfigArgs.builder()
.atlasAzureAppId("9f2deb0d-be22-4524-a403-df531868bac0")
.servicePrincipalId("22f1d2a6-d0e9-482a-83a4-b8dd7dddc2c1")
.tenantId("91402384-d71e-22f5-22dd-759e272cdc1c")
.build())
.projectId("64259ee860c43338194b0f8e")
.providerName("AZURE")
.build());
}
}
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test_role = mongodbatlas.CloudProviderAccessSetup("testRole",
azure_configs=[mongodbatlas.CloudProviderAccessSetupAzureConfigArgs(
atlas_azure_app_id="9f2deb0d-be22-4524-a403-df531868bac0",
service_principal_id="22f1d2a6-d0e9-482a-83a4-b8dd7dddc2c1",
tenant_id="91402384-d71e-22f5-22dd-759e272cdc1c",
)],
project_id="64259ee860c43338194b0f8e",
provider_name="AZURE")
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const testRole = new mongodbatlas.CloudProviderAccessSetup("testRole", {
azureConfigs: [{
atlasAzureAppId: "9f2deb0d-be22-4524-a403-df531868bac0",
servicePrincipalId: "22f1d2a6-d0e9-482a-83a4-b8dd7dddc2c1",
tenantId: "91402384-d71e-22f5-22dd-759e272cdc1c",
}],
projectId: "64259ee860c43338194b0f8e",
providerName: "AZURE",
});
resources:
testRole:
type: mongodbatlas:CloudProviderAccessSetup
properties:
azureConfigs:
- atlasAzureAppId: 9f2deb0d-be22-4524-a403-df531868bac0
servicePrincipalId: 22f1d2a6-d0e9-482a-83a4-b8dd7dddc2c1
tenantId: 91402384-d71e-22f5-22dd-759e272cdc1c
projectId: 64259ee860c43338194b0f8e
providerName: AZURE
With AWS
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var setupOnly = new Mongodbatlas.CloudProviderAccessSetup("setupOnly", new()
{
ProjectId = "64259ee860c43338194b0f8e",
ProviderName = "AWS",
});
var authRole = new Mongodbatlas.CloudProviderAccessAuthorization("authRole", new()
{
ProjectId = setupOnly.ProjectId,
RoleId = setupOnly.RoleId,
Aws = new Mongodbatlas.Inputs.CloudProviderAccessAuthorizationAwsArgs
{
IamAssumedRoleArn = "arn:aws:iam::772401394250:role/test-user-role",
},
});
});
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 {
setupOnly, err := mongodbatlas.NewCloudProviderAccessSetup(ctx, "setupOnly", &mongodbatlas.CloudProviderAccessSetupArgs{
ProjectId: pulumi.String("64259ee860c43338194b0f8e"),
ProviderName: pulumi.String("AWS"),
})
if err != nil {
return err
}
_, err = mongodbatlas.NewCloudProviderAccessAuthorization(ctx, "authRole", &mongodbatlas.CloudProviderAccessAuthorizationArgs{
ProjectId: setupOnly.ProjectId,
RoleId: setupOnly.RoleId,
Aws: &mongodbatlas.CloudProviderAccessAuthorizationAwsArgs{
IamAssumedRoleArn: pulumi.String("arn:aws:iam::772401394250:role/test-user-role"),
},
})
if err != nil {
return err
}
return nil
})
}
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.CloudProviderAccessAuthorization;
import com.pulumi.mongodbatlas.CloudProviderAccessAuthorizationArgs;
import com.pulumi.mongodbatlas.inputs.CloudProviderAccessAuthorizationAwsArgs;
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 setupOnly = new CloudProviderAccessSetup("setupOnly", CloudProviderAccessSetupArgs.builder()
.projectId("64259ee860c43338194b0f8e")
.providerName("AWS")
.build());
var authRole = new CloudProviderAccessAuthorization("authRole", CloudProviderAccessAuthorizationArgs.builder()
.projectId(setupOnly.projectId())
.roleId(setupOnly.roleId())
.aws(CloudProviderAccessAuthorizationAwsArgs.builder()
.iamAssumedRoleArn("arn:aws:iam::772401394250:role/test-user-role")
.build())
.build());
}
}
import pulumi
import pulumi_mongodbatlas as mongodbatlas
setup_only = mongodbatlas.CloudProviderAccessSetup("setupOnly",
project_id="64259ee860c43338194b0f8e",
provider_name="AWS")
auth_role = mongodbatlas.CloudProviderAccessAuthorization("authRole",
project_id=setup_only.project_id,
role_id=setup_only.role_id,
aws=mongodbatlas.CloudProviderAccessAuthorizationAwsArgs(
iam_assumed_role_arn="arn:aws:iam::772401394250:role/test-user-role",
))
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const setupOnly = new mongodbatlas.CloudProviderAccessSetup("setupOnly", {
projectId: "64259ee860c43338194b0f8e",
providerName: "AWS",
});
const authRole = new mongodbatlas.CloudProviderAccessAuthorization("authRole", {
projectId: setupOnly.projectId,
roleId: setupOnly.roleId,
aws: {
iamAssumedRoleArn: "arn:aws:iam::772401394250:role/test-user-role",
},
});
resources:
setupOnly:
type: mongodbatlas:CloudProviderAccessSetup
properties:
projectId: 64259ee860c43338194b0f8e
providerName: AWS
authRole:
type: mongodbatlas:CloudProviderAccessAuthorization
properties:
projectId: ${setupOnly.projectId}
roleId: ${setupOnly.roleId}
aws:
iamAssumedRoleArn: arn:aws:iam::772401394250:role/test-user-role
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var setupOnly = new Mongodbatlas.CloudProviderAccessSetup("setupOnly", 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 authRole = new Mongodbatlas.CloudProviderAccessAuthorization("authRole", new()
{
ProjectId = setupOnly.ProjectId,
RoleId = setupOnly.RoleId,
Azure = new Mongodbatlas.Inputs.CloudProviderAccessAuthorizationAzureArgs
{
AtlasAzureAppId = "9f2deb0d-be22-4524-a403-df531868bac0",
ServicePrincipalId = "22f1d2a6-d0e9-482a-83a4-b8dd7dddc2c1",
TenantId = "91402384-d71e-22f5-22dd-759e272cdc1c",
},
});
});
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 {
setupOnly, err := mongodbatlas.NewCloudProviderAccessSetup(ctx, "setupOnly", &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
}
_, err = mongodbatlas.NewCloudProviderAccessAuthorization(ctx, "authRole", &mongodbatlas.CloudProviderAccessAuthorizationArgs{
ProjectId: setupOnly.ProjectId,
RoleId: setupOnly.RoleId,
Azure: &mongodbatlas.CloudProviderAccessAuthorizationAzureArgs{
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
}
return nil
})
}
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.CloudProviderAccessAuthorization;
import com.pulumi.mongodbatlas.CloudProviderAccessAuthorizationArgs;
import com.pulumi.mongodbatlas.inputs.CloudProviderAccessAuthorizationAzureArgs;
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 setupOnly = new CloudProviderAccessSetup("setupOnly", 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());
var authRole = new CloudProviderAccessAuthorization("authRole", CloudProviderAccessAuthorizationArgs.builder()
.projectId(setupOnly.projectId())
.roleId(setupOnly.roleId())
.azure(CloudProviderAccessAuthorizationAzureArgs.builder()
.atlasAzureAppId("9f2deb0d-be22-4524-a403-df531868bac0")
.servicePrincipalId("22f1d2a6-d0e9-482a-83a4-b8dd7dddc2c1")
.tenantId("91402384-d71e-22f5-22dd-759e272cdc1c")
.build())
.build());
}
}
import pulumi
import pulumi_mongodbatlas as mongodbatlas
setup_only = mongodbatlas.CloudProviderAccessSetup("setupOnly",
project_id="64259ee860c43338194b0f8e",
provider_name="AZURE",
azure_configs=[mongodbatlas.CloudProviderAccessSetupAzureConfigArgs(
atlas_azure_app_id="9f2deb0d-be22-4524-a403-df531868bac0",
service_principal_id="22f1d2a6-d0e9-482a-83a4-b8dd7dddc2c1",
tenant_id="91402384-d71e-22f5-22dd-759e272cdc1c",
)])
auth_role = mongodbatlas.CloudProviderAccessAuthorization("authRole",
project_id=setup_only.project_id,
role_id=setup_only.role_id,
azure=mongodbatlas.CloudProviderAccessAuthorizationAzureArgs(
atlas_azure_app_id="9f2deb0d-be22-4524-a403-df531868bac0",
service_principal_id="22f1d2a6-d0e9-482a-83a4-b8dd7dddc2c1",
tenant_id="91402384-d71e-22f5-22dd-759e272cdc1c",
))
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const setupOnly = new mongodbatlas.CloudProviderAccessSetup("setupOnly", {
projectId: "64259ee860c43338194b0f8e",
providerName: "AZURE",
azureConfigs: [{
atlasAzureAppId: "9f2deb0d-be22-4524-a403-df531868bac0",
servicePrincipalId: "22f1d2a6-d0e9-482a-83a4-b8dd7dddc2c1",
tenantId: "91402384-d71e-22f5-22dd-759e272cdc1c",
}],
});
const authRole = new mongodbatlas.CloudProviderAccessAuthorization("authRole", {
projectId: setupOnly.projectId,
roleId: setupOnly.roleId,
azure: {
atlasAzureAppId: "9f2deb0d-be22-4524-a403-df531868bac0",
servicePrincipalId: "22f1d2a6-d0e9-482a-83a4-b8dd7dddc2c1",
tenantId: "91402384-d71e-22f5-22dd-759e272cdc1c",
},
});
resources:
setupOnly:
type: mongodbatlas:CloudProviderAccessSetup
properties:
projectId: 64259ee860c43338194b0f8e
providerName: AZURE
azureConfigs:
- atlasAzureAppId: 9f2deb0d-be22-4524-a403-df531868bac0
servicePrincipalId: 22f1d2a6-d0e9-482a-83a4-b8dd7dddc2c1
tenantId: 91402384-d71e-22f5-22dd-759e272cdc1c
authRole:
type: mongodbatlas:CloudProviderAccessAuthorization
properties:
projectId: ${setupOnly.projectId}
roleId: ${setupOnly.roleId}
azure:
atlasAzureAppId: 9f2deb0d-be22-4524-a403-df531868bac0
servicePrincipalId: 22f1d2a6-d0e9-482a-83a4-b8dd7dddc2c1
tenantId: 91402384-d71e-22f5-22dd-759e272cdc1c
this will create a PATCH request.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var testRole = new Mongodbatlas.CloudProviderAccess("testRole", new()
{
IamAssumedRoleArn = "arn:aws:iam::772401394250:role/test-user-role",
ProjectId = "<PROJECT-ID>",
ProviderName = "AWS",
});
});
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 {
_, err := mongodbatlas.NewCloudProviderAccess(ctx, "testRole", &mongodbatlas.CloudProviderAccessArgs{
IamAssumedRoleArn: pulumi.String("arn:aws:iam::772401394250:role/test-user-role"),
ProjectId: pulumi.String("<PROJECT-ID>"),
ProviderName: pulumi.String("AWS"),
})
if err != nil {
return err
}
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 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()
.iamAssumedRoleArn("arn:aws:iam::772401394250:role/test-user-role")
.projectId("<PROJECT-ID>")
.providerName("AWS")
.build());
}
}
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test_role = mongodbatlas.CloudProviderAccess("testRole",
iam_assumed_role_arn="arn:aws:iam::772401394250:role/test-user-role",
project_id="<PROJECT-ID>",
provider_name="AWS")
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const testRole = new mongodbatlas.CloudProviderAccess("testRole", {
iamAssumedRoleArn: "arn:aws:iam::772401394250:role/test-user-role",
projectId: "<PROJECT-ID>",
providerName: "AWS",
});
resources:
testRole:
type: mongodbatlas:CloudProviderAccess
properties:
iamAssumedRoleArn: arn:aws:iam::772401394250:role/test-user-role
projectId: <PROJECT-ID>
providerName: AWS
Create CloudProviderAccess Resource
new CloudProviderAccess(name: string, args: CloudProviderAccessArgs, opts?: CustomResourceOptions);
@overload
def CloudProviderAccess(resource_name: str,
opts: Optional[ResourceOptions] = None,
iam_assumed_role_arn: Optional[str] = None,
project_id: Optional[str] = None,
provider_name: Optional[str] = None)
@overload
def CloudProviderAccess(resource_name: str,
args: CloudProviderAccessArgs,
opts: Optional[ResourceOptions] = None)
func NewCloudProviderAccess(ctx *Context, name string, args CloudProviderAccessArgs, opts ...ResourceOption) (*CloudProviderAccess, error)
public CloudProviderAccess(string name, CloudProviderAccessArgs args, CustomResourceOptions? opts = null)
public CloudProviderAccess(String name, CloudProviderAccessArgs args)
public CloudProviderAccess(String name, CloudProviderAccessArgs args, CustomResourceOptions options)
type: mongodbatlas:CloudProviderAccess
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CloudProviderAccessArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CloudProviderAccessArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CloudProviderAccessArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CloudProviderAccessArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CloudProviderAccessArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CloudProviderAccess Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The CloudProviderAccess resource accepts the following input properties:
- Project
Id string The unique ID for the project
- Provider
Name string The cloud provider for which to create a new role. Currently only AWS is supported.
- Iam
Assumed stringRole Arn ARN of the IAM Role that Atlas assumes when accessing resources in your AWS account. This value is required after the creation (register of the role) as part of Set Up Unified AWS Access.
- Project
Id string The unique ID for the project
- Provider
Name string The cloud provider for which to create a new role. Currently only AWS is supported.
- Iam
Assumed stringRole Arn ARN of the IAM Role that Atlas assumes when accessing resources in your AWS account. This value is required after the creation (register of the role) as part of Set Up Unified AWS Access.
- project
Id String The unique ID for the project
- provider
Name String The cloud provider for which to create a new role. Currently only AWS is supported.
- iam
Assumed StringRole Arn ARN of the IAM Role that Atlas assumes when accessing resources in your AWS account. This value is required after the creation (register of the role) as part of Set Up Unified AWS Access.
- project
Id string The unique ID for the project
- provider
Name string The cloud provider for which to create a new role. Currently only AWS is supported.
- iam
Assumed stringRole Arn ARN of the IAM Role that Atlas assumes when accessing resources in your AWS account. This value is required after the creation (register of the role) as part of Set Up Unified AWS Access.
- project_
id str The unique ID for the project
- provider_
name str The cloud provider for which to create a new role. Currently only AWS is supported.
- iam_
assumed_ strrole_ arn ARN of the IAM Role that Atlas assumes when accessing resources in your AWS account. This value is required after the creation (register of the role) as part of Set Up Unified AWS Access.
- project
Id String The unique ID for the project
- provider
Name String The cloud provider for which to create a new role. Currently only AWS is supported.
- iam
Assumed StringRole Arn ARN of the IAM Role that Atlas assumes when accessing resources in your AWS account. This value is required after the creation (register of the role) as part of Set Up Unified AWS Access.
Outputs
All input properties are implicitly available as output properties. Additionally, the CloudProviderAccess resource produces the following output properties:
- 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<CloudProvider Access Feature Usage> Atlas features this AWS IAM role is linked to.
- Id string
The provider-assigned unique ID for this managed resource.
- Role
Id string Unique ID of this role returned by mongodb atlas api
Conditional
- 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 []CloudProvider Access Feature Usage Atlas features this AWS IAM role is linked to.
- Id string
The provider-assigned unique ID for this managed resource.
- Role
Id string Unique ID of this role returned by mongodb atlas api
Conditional
- 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<CloudProvider Access Feature Usage> Atlas features this AWS IAM role is linked to.
- id String
The provider-assigned unique ID for this managed resource.
- role
Id String Unique ID of this role returned by mongodb atlas api
Conditional
- 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 CloudProvider Access Feature Usage[] Atlas features this AWS IAM role is linked to.
- id string
The provider-assigned unique ID for this managed resource.
- role
Id string Unique ID of this role returned by mongodb atlas api
Conditional
- 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[CloudProvider Access Feature Usage] Atlas features this AWS IAM role is linked to.
- id str
The provider-assigned unique ID for this managed resource.
- role_
id str Unique ID of this role returned by mongodb atlas api
Conditional
- 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.
- id String
The provider-assigned unique ID for this managed resource.
- role
Id String Unique ID of this role returned by mongodb atlas api
Conditional
Look up Existing CloudProviderAccess Resource
Get an existing CloudProviderAccess resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: CloudProviderAccessState, opts?: CustomResourceOptions): CloudProviderAccess
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
atlas_assumed_role_external_id: Optional[str] = None,
atlas_aws_account_arn: Optional[str] = None,
authorized_date: Optional[str] = None,
created_date: Optional[str] = None,
feature_usages: Optional[Sequence[CloudProviderAccessFeatureUsageArgs]] = None,
iam_assumed_role_arn: Optional[str] = None,
project_id: Optional[str] = None,
provider_name: Optional[str] = None,
role_id: Optional[str] = None) -> CloudProviderAccess
func GetCloudProviderAccess(ctx *Context, name string, id IDInput, state *CloudProviderAccessState, opts ...ResourceOption) (*CloudProviderAccess, error)
public static CloudProviderAccess Get(string name, Input<string> id, CloudProviderAccessState? state, CustomResourceOptions? opts = null)
public static CloudProviderAccess get(String name, Output<String> id, CloudProviderAccessState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- 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<CloudProvider Access 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. This value is required after the creation (register of the role) as part of Set Up Unified AWS Access.
- Project
Id string The unique ID for the project
- Provider
Name string The cloud provider for which to create a new role. Currently only AWS is supported.
- Role
Id string Unique ID of this role returned by mongodb atlas api
Conditional
- 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 []CloudProvider Access Feature Usage Args 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. This value is required after the creation (register of the role) as part of Set Up Unified AWS Access.
- Project
Id string The unique ID for the project
- Provider
Name string The cloud provider for which to create a new role. Currently only AWS is supported.
- Role
Id string Unique ID of this role returned by mongodb atlas api
Conditional
- 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<CloudProvider Access 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. This value is required after the creation (register of the role) as part of Set Up Unified AWS Access.
- project
Id String The unique ID for the project
- provider
Name String The cloud provider for which to create a new role. Currently only AWS is supported.
- role
Id String Unique ID of this role returned by mongodb atlas api
Conditional
- 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 CloudProvider Access 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. This value is required after the creation (register of the role) as part of Set Up Unified AWS Access.
- project
Id string The unique ID for the project
- provider
Name string The cloud provider for which to create a new role. Currently only AWS is supported.
- role
Id string Unique ID of this role returned by mongodb atlas api
Conditional
- 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[CloudProvider Access Feature Usage Args] 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. This value is required after the creation (register of the role) as part of Set Up Unified AWS Access.
- project_
id str The unique ID for the project
- provider_
name str The cloud provider for which to create a new role. Currently only AWS is supported.
- role_
id str Unique ID of this role returned by mongodb atlas api
Conditional
- 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. This value is required after the creation (register of the role) as part of Set Up Unified AWS Access.
- project
Id String The unique ID for the project
- provider
Name String The cloud provider for which to create a new role. Currently only AWS is supported.
- role
Id String Unique ID of this role returned by mongodb atlas api
Conditional
Supporting Types
CloudProviderAccessFeatureUsage, CloudProviderAccessFeatureUsageArgs
- 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
Import
The Cloud Provider Access resource can be imported using project ID and the provider name and mongodbatlas role id, in the format project_id
-provider_name
-role_id
, e.g.
$ pulumi import mongodbatlas:index/cloudProviderAccess:CloudProviderAccess my_role 1112222b3bf99403840e8934-AWS-5fc17d476f7a33224f5b224e
See MongoDB Atlas API Documentation for more information.
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
mongodbatlas
Terraform Provider.