/
getCloudProviderAccess.go
59 lines (54 loc) · 1.95 KB
/
getCloudProviderAccess.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package mongodbatlas
import (
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// `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
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-mongodbatlas/sdk/go/mongodbatlas"
// "github.com/pulumi/pulumi/sdk/v2/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
// }
// return nil
// })
// }
// ```
func LookupCloudProviderAccess(ctx *pulumi.Context, args *LookupCloudProviderAccessArgs, opts ...pulumi.InvokeOption) (*LookupCloudProviderAccessResult, error) {
var rv LookupCloudProviderAccessResult
err := ctx.Invoke("mongodbatlas:index/getCloudProviderAccess:getCloudProviderAccess", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getCloudProviderAccess.
type LookupCloudProviderAccessArgs struct {
// The unique ID for the project to get all Cloud Provider Access
ProjectId string `pulumi:"projectId"`
}
// A collection of values returned by getCloudProviderAccess.
type LookupCloudProviderAccessResult struct {
// A list where each represents a Cloud Provider Access Role.
AwsIamRoles []GetCloudProviderAccessAwsIamRole `pulumi:"awsIamRoles"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
ProjectId string `pulumi:"projectId"`
}