/
getProjectIpAccessList.go
130 lines (110 loc) · 6.03 KB
/
getProjectIpAccessList.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package mongodbatlas
import (
"context"
"reflect"
"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// `ProjectIpAccessList` describes an IP Access List entry resource. The access list grants access from IPs, CIDRs or AWS Security Groups (if VPC Peering is enabled) to clusters within the Project.
//
// > **NOTE:** Groups and projects are synonymous terms. You may find `groupId` in the official documentation.
//
// > **IMPORTANT:**
// When you remove an entry from the access list, existing connections from the removed address(es) may remain open for a variable amount of time. How much time passes before Atlas closes the connection depends on several factors, including how the connection was established, the particular behavior of the application or driver using the address, and the connection protocol (e.g., TCP or UDP). This is particularly important to consider when changing an existing IP address or CIDR block as they cannot be updated via the Provider (comments can however), hence a change will force the destruction and recreation of entries.
//
// ## Example Usage
func LookupProjectIpAccessList(ctx *pulumi.Context, args *LookupProjectIpAccessListArgs, opts ...pulumi.InvokeOption) (*LookupProjectIpAccessListResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupProjectIpAccessListResult
err := ctx.Invoke("mongodbatlas:index/getProjectIpAccessList:getProjectIpAccessList", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getProjectIpAccessList.
type LookupProjectIpAccessListArgs struct {
// Unique identifier of the AWS security group to add to the access list.
AwsSecurityGroup *string `pulumi:"awsSecurityGroup"`
// Range of IP addresses in CIDR notation to be added to the access list.
CidrBlock *string `pulumi:"cidrBlock"`
// Single IP address to be added to the access list.
//
// > **NOTE:** One of the following attributes must set: `awsSecurityGroup`, `cidrBlock` or `ipAddress`.
IpAddress *string `pulumi:"ipAddress"`
// Unique identifier for the project to which you want to add one or more access list entries.
ProjectId string `pulumi:"projectId"`
}
// A collection of values returned by getProjectIpAccessList.
type LookupProjectIpAccessListResult struct {
AwsSecurityGroup string `pulumi:"awsSecurityGroup"`
CidrBlock string `pulumi:"cidrBlock"`
// Comment to add to the access list entry.
Comment string `pulumi:"comment"`
Id string `pulumi:"id"`
IpAddress string `pulumi:"ipAddress"`
ProjectId string `pulumi:"projectId"`
}
func LookupProjectIpAccessListOutput(ctx *pulumi.Context, args LookupProjectIpAccessListOutputArgs, opts ...pulumi.InvokeOption) LookupProjectIpAccessListResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupProjectIpAccessListResult, error) {
args := v.(LookupProjectIpAccessListArgs)
r, err := LookupProjectIpAccessList(ctx, &args, opts...)
var s LookupProjectIpAccessListResult
if r != nil {
s = *r
}
return s, err
}).(LookupProjectIpAccessListResultOutput)
}
// A collection of arguments for invoking getProjectIpAccessList.
type LookupProjectIpAccessListOutputArgs struct {
// Unique identifier of the AWS security group to add to the access list.
AwsSecurityGroup pulumi.StringPtrInput `pulumi:"awsSecurityGroup"`
// Range of IP addresses in CIDR notation to be added to the access list.
CidrBlock pulumi.StringPtrInput `pulumi:"cidrBlock"`
// Single IP address to be added to the access list.
//
// > **NOTE:** One of the following attributes must set: `awsSecurityGroup`, `cidrBlock` or `ipAddress`.
IpAddress pulumi.StringPtrInput `pulumi:"ipAddress"`
// Unique identifier for the project to which you want to add one or more access list entries.
ProjectId pulumi.StringInput `pulumi:"projectId"`
}
func (LookupProjectIpAccessListOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupProjectIpAccessListArgs)(nil)).Elem()
}
// A collection of values returned by getProjectIpAccessList.
type LookupProjectIpAccessListResultOutput struct{ *pulumi.OutputState }
func (LookupProjectIpAccessListResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupProjectIpAccessListResult)(nil)).Elem()
}
func (o LookupProjectIpAccessListResultOutput) ToLookupProjectIpAccessListResultOutput() LookupProjectIpAccessListResultOutput {
return o
}
func (o LookupProjectIpAccessListResultOutput) ToLookupProjectIpAccessListResultOutputWithContext(ctx context.Context) LookupProjectIpAccessListResultOutput {
return o
}
func (o LookupProjectIpAccessListResultOutput) AwsSecurityGroup() pulumi.StringOutput {
return o.ApplyT(func(v LookupProjectIpAccessListResult) string { return v.AwsSecurityGroup }).(pulumi.StringOutput)
}
func (o LookupProjectIpAccessListResultOutput) CidrBlock() pulumi.StringOutput {
return o.ApplyT(func(v LookupProjectIpAccessListResult) string { return v.CidrBlock }).(pulumi.StringOutput)
}
// Comment to add to the access list entry.
func (o LookupProjectIpAccessListResultOutput) Comment() pulumi.StringOutput {
return o.ApplyT(func(v LookupProjectIpAccessListResult) string { return v.Comment }).(pulumi.StringOutput)
}
func (o LookupProjectIpAccessListResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupProjectIpAccessListResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupProjectIpAccessListResultOutput) IpAddress() pulumi.StringOutput {
return o.ApplyT(func(v LookupProjectIpAccessListResult) string { return v.IpAddress }).(pulumi.StringOutput)
}
func (o LookupProjectIpAccessListResultOutput) ProjectId() pulumi.StringOutput {
return o.ApplyT(func(v LookupProjectIpAccessListResult) string { return v.ProjectId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupProjectIpAccessListResultOutput{})
}