pulumi-mongodbatlas 4.2.0a1769139905__py3-none-any.whl → 4.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pulumi_mongodbatlas/__init__.py +12 -0
- pulumi_mongodbatlas/_inputs.py +1 -21
- pulumi_mongodbatlas/alert_configuration.py +14 -13
- pulumi_mongodbatlas/database_user.py +18 -17
- pulumi_mongodbatlas/get_alert_configurations.py +44 -0
- pulumi_mongodbatlas/get_log_integration.py +270 -0
- pulumi_mongodbatlas/get_log_integrations.py +203 -0
- pulumi_mongodbatlas/get_private_endpoint_regional_mode.py +20 -0
- pulumi_mongodbatlas/get_project_ip_access_lists.py +147 -0
- pulumi_mongodbatlas/get_push_based_log_export.py +4 -0
- pulumi_mongodbatlas/log_integration.py +551 -0
- pulumi_mongodbatlas/network_peering.py +94 -0
- pulumi_mongodbatlas/outputs.py +138 -13
- pulumi_mongodbatlas/project_ip_access_list.py +2 -2
- pulumi_mongodbatlas/pulumi-plugin.json +1 -1
- {pulumi_mongodbatlas-4.2.0a1769139905.dist-info → pulumi_mongodbatlas-4.3.0.dist-info}/METADATA +1 -1
- {pulumi_mongodbatlas-4.2.0a1769139905.dist-info → pulumi_mongodbatlas-4.3.0.dist-info}/RECORD +19 -15
- {pulumi_mongodbatlas-4.2.0a1769139905.dist-info → pulumi_mongodbatlas-4.3.0.dist-info}/WHEEL +1 -1
- {pulumi_mongodbatlas-4.2.0a1769139905.dist-info → pulumi_mongodbatlas-4.3.0.dist-info}/top_level.txt +0 -0
pulumi_mongodbatlas/__init__.py
CHANGED
|
@@ -98,6 +98,8 @@ from .get_flex_snapshots import *
|
|
|
98
98
|
from .get_global_cluster_config import *
|
|
99
99
|
from .get_ldap_configuration import *
|
|
100
100
|
from .get_ldap_verify import *
|
|
101
|
+
from .get_log_integration import *
|
|
102
|
+
from .get_log_integrations import *
|
|
101
103
|
from .get_maintenance_window import *
|
|
102
104
|
from .get_mongodb_employee_access_grant import *
|
|
103
105
|
from .get_network_container import *
|
|
@@ -119,6 +121,7 @@ from .get_project_api_key import *
|
|
|
119
121
|
from .get_project_api_keys import *
|
|
120
122
|
from .get_project_invitation import *
|
|
121
123
|
from .get_project_ip_access_list import *
|
|
124
|
+
from .get_project_ip_access_lists import *
|
|
122
125
|
from .get_project_ip_addresses import *
|
|
123
126
|
from .get_project_service_account import *
|
|
124
127
|
from .get_project_service_account_access_list_entries import *
|
|
@@ -165,6 +168,7 @@ from .get_x509_authentication_database_user import *
|
|
|
165
168
|
from .global_cluster_config import *
|
|
166
169
|
from .ldap_configuration import *
|
|
167
170
|
from .ldap_verify import *
|
|
171
|
+
from .log_integration import *
|
|
168
172
|
from .maintenance_window import *
|
|
169
173
|
from .mongodb_employee_access_grant import *
|
|
170
174
|
from .network_container import *
|
|
@@ -487,6 +491,14 @@ _utilities.register(
|
|
|
487
491
|
"mongodbatlas:index/ldapVerify:LdapVerify": "LdapVerify"
|
|
488
492
|
}
|
|
489
493
|
},
|
|
494
|
+
{
|
|
495
|
+
"pkg": "mongodbatlas",
|
|
496
|
+
"mod": "index/logIntegration",
|
|
497
|
+
"fqn": "pulumi_mongodbatlas",
|
|
498
|
+
"classes": {
|
|
499
|
+
"mongodbatlas:index/logIntegration:LogIntegration": "LogIntegration"
|
|
500
|
+
}
|
|
501
|
+
},
|
|
490
502
|
{
|
|
491
503
|
"pkg": "mongodbatlas",
|
|
492
504
|
"mod": "index/maintenanceWindow",
|
pulumi_mongodbatlas/_inputs.py
CHANGED
|
@@ -9729,10 +9729,6 @@ if not MYPY:
|
|
|
9729
9729
|
"""
|
|
9730
9730
|
A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
|
|
9731
9731
|
"""
|
|
9732
|
-
update: NotRequired[pulumi.Input[_builtins.str]]
|
|
9733
|
-
"""
|
|
9734
|
-
A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
|
|
9735
|
-
"""
|
|
9736
9732
|
elif False:
|
|
9737
9733
|
ProjectIpAccessListTimeoutsArgsDict: TypeAlias = Mapping[str, Any]
|
|
9738
9734
|
|
|
@@ -9740,19 +9736,15 @@ elif False:
|
|
|
9740
9736
|
class ProjectIpAccessListTimeoutsArgs:
|
|
9741
9737
|
def __init__(__self__, *,
|
|
9742
9738
|
delete: Optional[pulumi.Input[_builtins.str]] = None,
|
|
9743
|
-
read: Optional[pulumi.Input[_builtins.str]] = None
|
|
9744
|
-
update: Optional[pulumi.Input[_builtins.str]] = None):
|
|
9739
|
+
read: Optional[pulumi.Input[_builtins.str]] = None):
|
|
9745
9740
|
"""
|
|
9746
9741
|
:param pulumi.Input[_builtins.str] delete: A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
|
|
9747
9742
|
:param pulumi.Input[_builtins.str] read: A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
|
|
9748
|
-
:param pulumi.Input[_builtins.str] update: A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
|
|
9749
9743
|
"""
|
|
9750
9744
|
if delete is not None:
|
|
9751
9745
|
pulumi.set(__self__, "delete", delete)
|
|
9752
9746
|
if read is not None:
|
|
9753
9747
|
pulumi.set(__self__, "read", read)
|
|
9754
|
-
if update is not None:
|
|
9755
|
-
pulumi.set(__self__, "update", update)
|
|
9756
9748
|
|
|
9757
9749
|
@_builtins.property
|
|
9758
9750
|
@pulumi.getter
|
|
@@ -9778,18 +9770,6 @@ class ProjectIpAccessListTimeoutsArgs:
|
|
|
9778
9770
|
def read(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
9779
9771
|
pulumi.set(self, "read", value)
|
|
9780
9772
|
|
|
9781
|
-
@_builtins.property
|
|
9782
|
-
@pulumi.getter
|
|
9783
|
-
def update(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
9784
|
-
"""
|
|
9785
|
-
A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
|
|
9786
|
-
"""
|
|
9787
|
-
return pulumi.get(self, "update")
|
|
9788
|
-
|
|
9789
|
-
@update.setter
|
|
9790
|
-
def update(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
9791
|
-
pulumi.set(self, "update", value)
|
|
9792
|
-
|
|
9793
9773
|
|
|
9794
9774
|
if not MYPY:
|
|
9795
9775
|
class ProjectIpAddressesArgsDict(TypedDict):
|
|
@@ -22,11 +22,11 @@ __all__ = ['AlertConfigurationArgs', 'AlertConfiguration']
|
|
|
22
22
|
class AlertConfigurationArgs:
|
|
23
23
|
def __init__(__self__, *,
|
|
24
24
|
event_type: pulumi.Input[_builtins.str],
|
|
25
|
+
notifications: pulumi.Input[Sequence[pulumi.Input['AlertConfigurationNotificationArgs']]],
|
|
25
26
|
project_id: pulumi.Input[_builtins.str],
|
|
26
27
|
enabled: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
27
28
|
matchers: Optional[pulumi.Input[Sequence[pulumi.Input['AlertConfigurationMatcherArgs']]]] = None,
|
|
28
29
|
metric_threshold_config: Optional[pulumi.Input['AlertConfigurationMetricThresholdConfigArgs']] = None,
|
|
29
|
-
notifications: Optional[pulumi.Input[Sequence[pulumi.Input['AlertConfigurationNotificationArgs']]]] = None,
|
|
30
30
|
severity_override: Optional[pulumi.Input[_builtins.str]] = None,
|
|
31
31
|
threshold_config: Optional[pulumi.Input['AlertConfigurationThresholdConfigArgs']] = None):
|
|
32
32
|
"""
|
|
@@ -42,6 +42,7 @@ class AlertConfigurationArgs:
|
|
|
42
42
|
:param pulumi.Input[_builtins.str] severity_override: Severity of the event. For the list of accepted values please read the [Create One Alert Configuration in One Project](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/operation/operation-creategroupalertconfig) API documentation.
|
|
43
43
|
"""
|
|
44
44
|
pulumi.set(__self__, "event_type", event_type)
|
|
45
|
+
pulumi.set(__self__, "notifications", notifications)
|
|
45
46
|
pulumi.set(__self__, "project_id", project_id)
|
|
46
47
|
if enabled is not None:
|
|
47
48
|
pulumi.set(__self__, "enabled", enabled)
|
|
@@ -49,8 +50,6 @@ class AlertConfigurationArgs:
|
|
|
49
50
|
pulumi.set(__self__, "matchers", matchers)
|
|
50
51
|
if metric_threshold_config is not None:
|
|
51
52
|
pulumi.set(__self__, "metric_threshold_config", metric_threshold_config)
|
|
52
|
-
if notifications is not None:
|
|
53
|
-
pulumi.set(__self__, "notifications", notifications)
|
|
54
53
|
if severity_override is not None:
|
|
55
54
|
pulumi.set(__self__, "severity_override", severity_override)
|
|
56
55
|
if threshold_config is not None:
|
|
@@ -73,6 +72,15 @@ class AlertConfigurationArgs:
|
|
|
73
72
|
def event_type(self, value: pulumi.Input[_builtins.str]):
|
|
74
73
|
pulumi.set(self, "event_type", value)
|
|
75
74
|
|
|
75
|
+
@_builtins.property
|
|
76
|
+
@pulumi.getter
|
|
77
|
+
def notifications(self) -> pulumi.Input[Sequence[pulumi.Input['AlertConfigurationNotificationArgs']]]:
|
|
78
|
+
return pulumi.get(self, "notifications")
|
|
79
|
+
|
|
80
|
+
@notifications.setter
|
|
81
|
+
def notifications(self, value: pulumi.Input[Sequence[pulumi.Input['AlertConfigurationNotificationArgs']]]):
|
|
82
|
+
pulumi.set(self, "notifications", value)
|
|
83
|
+
|
|
76
84
|
@_builtins.property
|
|
77
85
|
@pulumi.getter(name="projectId")
|
|
78
86
|
def project_id(self) -> pulumi.Input[_builtins.str]:
|
|
@@ -115,15 +123,6 @@ class AlertConfigurationArgs:
|
|
|
115
123
|
def metric_threshold_config(self, value: Optional[pulumi.Input['AlertConfigurationMetricThresholdConfigArgs']]):
|
|
116
124
|
pulumi.set(self, "metric_threshold_config", value)
|
|
117
125
|
|
|
118
|
-
@_builtins.property
|
|
119
|
-
@pulumi.getter
|
|
120
|
-
def notifications(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['AlertConfigurationNotificationArgs']]]]:
|
|
121
|
-
return pulumi.get(self, "notifications")
|
|
122
|
-
|
|
123
|
-
@notifications.setter
|
|
124
|
-
def notifications(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['AlertConfigurationNotificationArgs']]]]):
|
|
125
|
-
pulumi.set(self, "notifications", value)
|
|
126
|
-
|
|
127
126
|
@_builtins.property
|
|
128
127
|
@pulumi.getter(name="severityOverride")
|
|
129
128
|
def severity_override(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
@@ -685,6 +684,8 @@ class AlertConfiguration(pulumi.CustomResource):
|
|
|
685
684
|
__props__.__dict__["event_type"] = event_type
|
|
686
685
|
__props__.__dict__["matchers"] = matchers
|
|
687
686
|
__props__.__dict__["metric_threshold_config"] = metric_threshold_config
|
|
687
|
+
if notifications is None and not opts.urn:
|
|
688
|
+
raise TypeError("Missing required property 'notifications'")
|
|
688
689
|
__props__.__dict__["notifications"] = notifications
|
|
689
690
|
if project_id is None and not opts.urn:
|
|
690
691
|
raise TypeError("Missing required property 'project_id'")
|
|
@@ -801,7 +802,7 @@ class AlertConfiguration(pulumi.CustomResource):
|
|
|
801
802
|
|
|
802
803
|
@_builtins.property
|
|
803
804
|
@pulumi.getter
|
|
804
|
-
def notifications(self) -> pulumi.Output[
|
|
805
|
+
def notifications(self) -> pulumi.Output[Sequence['outputs.AlertConfigurationNotification']]:
|
|
805
806
|
return pulumi.get(self, "notifications")
|
|
806
807
|
|
|
807
808
|
@_builtins.property
|
|
@@ -23,6 +23,7 @@ class DatabaseUserArgs:
|
|
|
23
23
|
def __init__(__self__, *,
|
|
24
24
|
auth_database_name: pulumi.Input[_builtins.str],
|
|
25
25
|
project_id: pulumi.Input[_builtins.str],
|
|
26
|
+
roles: pulumi.Input[Sequence[pulumi.Input['DatabaseUserRoleArgs']]],
|
|
26
27
|
username: pulumi.Input[_builtins.str],
|
|
27
28
|
aws_iam_type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
28
29
|
description: Optional[pulumi.Input[_builtins.str]] = None,
|
|
@@ -30,7 +31,6 @@ class DatabaseUserArgs:
|
|
|
30
31
|
ldap_auth_type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
31
32
|
oidc_auth_type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
32
33
|
password: Optional[pulumi.Input[_builtins.str]] = None,
|
|
33
|
-
roles: Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseUserRoleArgs']]]] = None,
|
|
34
34
|
scopes: Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseUserScopeArgs']]]] = None,
|
|
35
35
|
x509_type: Optional[pulumi.Input[_builtins.str]] = None):
|
|
36
36
|
"""
|
|
@@ -38,6 +38,7 @@ class DatabaseUserArgs:
|
|
|
38
38
|
:param pulumi.Input[_builtins.str] auth_database_name: Database against which Atlas authenticates the user. A user must provide both a username and authentication database to log into MongoDB.
|
|
39
39
|
Accepted values include:
|
|
40
40
|
:param pulumi.Input[_builtins.str] project_id: The unique ID for the project to create the database user.
|
|
41
|
+
:param pulumi.Input[Sequence[pulumi.Input['DatabaseUserRoleArgs']]] roles: List of user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well. See Roles below for more details.
|
|
41
42
|
:param pulumi.Input[_builtins.str] username: Username for authenticating to MongoDB. USER_ARN or ROLE_ARN if `aws_iam_type` is USER or ROLE.
|
|
42
43
|
:param pulumi.Input[_builtins.str] aws_iam_type: If this value is set, the new database user authenticates with AWS IAM credentials. If no value is given, Atlas uses the default value of `NONE`. The accepted types are:
|
|
43
44
|
* `NONE` - The user does not use AWS IAM credentials.
|
|
@@ -52,7 +53,6 @@ class DatabaseUserArgs:
|
|
|
52
53
|
* `NONE` - The user does not use OIDC federated authentication.
|
|
53
54
|
* `IDP_GROUP` - OIDC Workforce federated authentication group. To learn more about OIDC federated authentication, see [Set up Workforce Identity Federation with OIDC](https://www.mongodb.com/docs/atlas/security-oidc/).
|
|
54
55
|
* `USER` - OIDC Workload federated authentication user. To learn more about OIDC federated authentication, see [Set up Workload Identity Federation with OIDC](https://www.mongodb.com/docs/atlas/security-oidc/).
|
|
55
|
-
:param pulumi.Input[Sequence[pulumi.Input['DatabaseUserRoleArgs']]] roles: List of user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well. See Roles below for more details.
|
|
56
56
|
:param pulumi.Input[_builtins.str] x509_type: X.509 method by which the provided username is authenticated. If no value is given, Atlas uses the default value of NONE. The accepted types are:
|
|
57
57
|
* `NONE` - The user does not use X.509 authentication.
|
|
58
58
|
* `MANAGED` - The user is being created for use with Atlas-managed X.509.Externally authenticated users can only be created on the `$external` database.
|
|
@@ -60,6 +60,7 @@ class DatabaseUserArgs:
|
|
|
60
60
|
"""
|
|
61
61
|
pulumi.set(__self__, "auth_database_name", auth_database_name)
|
|
62
62
|
pulumi.set(__self__, "project_id", project_id)
|
|
63
|
+
pulumi.set(__self__, "roles", roles)
|
|
63
64
|
pulumi.set(__self__, "username", username)
|
|
64
65
|
if aws_iam_type is not None:
|
|
65
66
|
pulumi.set(__self__, "aws_iam_type", aws_iam_type)
|
|
@@ -73,8 +74,6 @@ class DatabaseUserArgs:
|
|
|
73
74
|
pulumi.set(__self__, "oidc_auth_type", oidc_auth_type)
|
|
74
75
|
if password is not None:
|
|
75
76
|
pulumi.set(__self__, "password", password)
|
|
76
|
-
if roles is not None:
|
|
77
|
-
pulumi.set(__self__, "roles", roles)
|
|
78
77
|
if scopes is not None:
|
|
79
78
|
pulumi.set(__self__, "scopes", scopes)
|
|
80
79
|
if x509_type is not None:
|
|
@@ -105,6 +104,18 @@ class DatabaseUserArgs:
|
|
|
105
104
|
def project_id(self, value: pulumi.Input[_builtins.str]):
|
|
106
105
|
pulumi.set(self, "project_id", value)
|
|
107
106
|
|
|
107
|
+
@_builtins.property
|
|
108
|
+
@pulumi.getter
|
|
109
|
+
def roles(self) -> pulumi.Input[Sequence[pulumi.Input['DatabaseUserRoleArgs']]]:
|
|
110
|
+
"""
|
|
111
|
+
List of user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well. See Roles below for more details.
|
|
112
|
+
"""
|
|
113
|
+
return pulumi.get(self, "roles")
|
|
114
|
+
|
|
115
|
+
@roles.setter
|
|
116
|
+
def roles(self, value: pulumi.Input[Sequence[pulumi.Input['DatabaseUserRoleArgs']]]):
|
|
117
|
+
pulumi.set(self, "roles", value)
|
|
118
|
+
|
|
108
119
|
@_builtins.property
|
|
109
120
|
@pulumi.getter
|
|
110
121
|
def username(self) -> pulumi.Input[_builtins.str]:
|
|
@@ -192,18 +203,6 @@ class DatabaseUserArgs:
|
|
|
192
203
|
def password(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
193
204
|
pulumi.set(self, "password", value)
|
|
194
205
|
|
|
195
|
-
@_builtins.property
|
|
196
|
-
@pulumi.getter
|
|
197
|
-
def roles(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseUserRoleArgs']]]]:
|
|
198
|
-
"""
|
|
199
|
-
List of user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well. See Roles below for more details.
|
|
200
|
-
"""
|
|
201
|
-
return pulumi.get(self, "roles")
|
|
202
|
-
|
|
203
|
-
@roles.setter
|
|
204
|
-
def roles(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseUserRoleArgs']]]]):
|
|
205
|
-
pulumi.set(self, "roles", value)
|
|
206
|
-
|
|
207
206
|
@_builtins.property
|
|
208
207
|
@pulumi.getter
|
|
209
208
|
def scopes(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseUserScopeArgs']]]]:
|
|
@@ -811,6 +810,8 @@ class DatabaseUser(pulumi.CustomResource):
|
|
|
811
810
|
if project_id is None and not opts.urn:
|
|
812
811
|
raise TypeError("Missing required property 'project_id'")
|
|
813
812
|
__props__.__dict__["project_id"] = project_id
|
|
813
|
+
if roles is None and not opts.urn:
|
|
814
|
+
raise TypeError("Missing required property 'roles'")
|
|
814
815
|
__props__.__dict__["roles"] = roles
|
|
815
816
|
__props__.__dict__["scopes"] = scopes
|
|
816
817
|
if username is None and not opts.urn:
|
|
@@ -959,7 +960,7 @@ class DatabaseUser(pulumi.CustomResource):
|
|
|
959
960
|
|
|
960
961
|
@_builtins.property
|
|
961
962
|
@pulumi.getter
|
|
962
|
-
def roles(self) -> pulumi.Output[
|
|
963
|
+
def roles(self) -> pulumi.Output[Sequence['outputs.DatabaseUserRole']]:
|
|
963
964
|
"""
|
|
964
965
|
List of user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well. See Roles below for more details.
|
|
965
966
|
"""
|
|
@@ -111,6 +111,28 @@ def get_alert_configurations(list_options: Optional[Sequence[Union['GetAlertConf
|
|
|
111
111
|
|
|
112
112
|
> **NOTE:** Groups and projects are synonymous terms. You may find group_id in the official documentation.
|
|
113
113
|
|
|
114
|
+
## Example Usage
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
import pulumi
|
|
118
|
+
import pulumi_mongodbatlas as mongodbatlas
|
|
119
|
+
import pulumi_std as std
|
|
120
|
+
|
|
121
|
+
import_ = mongodbatlas.get_alert_configurations(project_id=project_id,
|
|
122
|
+
output_types=[
|
|
123
|
+
"resource_hcl",
|
|
124
|
+
"resource_import",
|
|
125
|
+
])
|
|
126
|
+
alerts = import_.results
|
|
127
|
+
outputs = std.index.flatten(input=[[] if alert.output == None else alert.output for i, alert in alerts])["result"]
|
|
128
|
+
output_values = std.index.compact(input=[o["value"] for i, o in outputs])["result"]
|
|
129
|
+
pulumi.export("alertOutput", std.index.join(separator="\\n",
|
|
130
|
+
input=output_values)["result"])
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Refer to the following for a full example on using this data_source as a tool to import all resources:
|
|
134
|
+
* atlas-alert-configurations
|
|
135
|
+
|
|
114
136
|
|
|
115
137
|
:param Sequence[Union['GetAlertConfigurationsListOptionArgs', 'GetAlertConfigurationsListOptionArgsDict']] list_options: Arguments that dictate how many and which results are returned by the data source
|
|
116
138
|
* `list_options.page_num` - Which page of results to retrieve (default to first page)
|
|
@@ -142,6 +164,28 @@ def get_alert_configurations_output(list_options: Optional[pulumi.Input[Optional
|
|
|
142
164
|
|
|
143
165
|
> **NOTE:** Groups and projects are synonymous terms. You may find group_id in the official documentation.
|
|
144
166
|
|
|
167
|
+
## Example Usage
|
|
168
|
+
|
|
169
|
+
```python
|
|
170
|
+
import pulumi
|
|
171
|
+
import pulumi_mongodbatlas as mongodbatlas
|
|
172
|
+
import pulumi_std as std
|
|
173
|
+
|
|
174
|
+
import_ = mongodbatlas.get_alert_configurations(project_id=project_id,
|
|
175
|
+
output_types=[
|
|
176
|
+
"resource_hcl",
|
|
177
|
+
"resource_import",
|
|
178
|
+
])
|
|
179
|
+
alerts = import_.results
|
|
180
|
+
outputs = std.index.flatten(input=[[] if alert.output == None else alert.output for i, alert in alerts])["result"]
|
|
181
|
+
output_values = std.index.compact(input=[o["value"] for i, o in outputs])["result"]
|
|
182
|
+
pulumi.export("alertOutput", std.index.join(separator="\\n",
|
|
183
|
+
input=output_values)["result"])
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Refer to the following for a full example on using this data_source as a tool to import all resources:
|
|
187
|
+
* atlas-alert-configurations
|
|
188
|
+
|
|
145
189
|
|
|
146
190
|
:param Sequence[Union['GetAlertConfigurationsListOptionArgs', 'GetAlertConfigurationsListOptionArgsDict']] list_options: Arguments that dictate how many and which results are returned by the data source
|
|
147
191
|
* `list_options.page_num` - Which page of results to retrieve (default to first page)
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import builtins as _builtins
|
|
6
|
+
import warnings
|
|
7
|
+
import sys
|
|
8
|
+
import pulumi
|
|
9
|
+
import pulumi.runtime
|
|
10
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
15
|
+
from . import _utilities
|
|
16
|
+
|
|
17
|
+
__all__ = [
|
|
18
|
+
'GetLogIntegrationResult',
|
|
19
|
+
'AwaitableGetLogIntegrationResult',
|
|
20
|
+
'get_log_integration',
|
|
21
|
+
'get_log_integration_output',
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
@pulumi.output_type
|
|
25
|
+
class GetLogIntegrationResult:
|
|
26
|
+
"""
|
|
27
|
+
A collection of values returned by getLogIntegration.
|
|
28
|
+
"""
|
|
29
|
+
def __init__(__self__, bucket_name=None, iam_role_id=None, id=None, integration_id=None, kms_key=None, log_types=None, prefix_path=None, project_id=None, type=None):
|
|
30
|
+
if bucket_name and not isinstance(bucket_name, str):
|
|
31
|
+
raise TypeError("Expected argument 'bucket_name' to be a str")
|
|
32
|
+
pulumi.set(__self__, "bucket_name", bucket_name)
|
|
33
|
+
if iam_role_id and not isinstance(iam_role_id, str):
|
|
34
|
+
raise TypeError("Expected argument 'iam_role_id' to be a str")
|
|
35
|
+
pulumi.set(__self__, "iam_role_id", iam_role_id)
|
|
36
|
+
if id and not isinstance(id, str):
|
|
37
|
+
raise TypeError("Expected argument 'id' to be a str")
|
|
38
|
+
pulumi.set(__self__, "id", id)
|
|
39
|
+
if integration_id and not isinstance(integration_id, str):
|
|
40
|
+
raise TypeError("Expected argument 'integration_id' to be a str")
|
|
41
|
+
pulumi.set(__self__, "integration_id", integration_id)
|
|
42
|
+
if kms_key and not isinstance(kms_key, str):
|
|
43
|
+
raise TypeError("Expected argument 'kms_key' to be a str")
|
|
44
|
+
pulumi.set(__self__, "kms_key", kms_key)
|
|
45
|
+
if log_types and not isinstance(log_types, list):
|
|
46
|
+
raise TypeError("Expected argument 'log_types' to be a list")
|
|
47
|
+
pulumi.set(__self__, "log_types", log_types)
|
|
48
|
+
if prefix_path and not isinstance(prefix_path, str):
|
|
49
|
+
raise TypeError("Expected argument 'prefix_path' to be a str")
|
|
50
|
+
pulumi.set(__self__, "prefix_path", prefix_path)
|
|
51
|
+
if project_id and not isinstance(project_id, str):
|
|
52
|
+
raise TypeError("Expected argument 'project_id' to be a str")
|
|
53
|
+
pulumi.set(__self__, "project_id", project_id)
|
|
54
|
+
if type and not isinstance(type, str):
|
|
55
|
+
raise TypeError("Expected argument 'type' to be a str")
|
|
56
|
+
pulumi.set(__self__, "type", type)
|
|
57
|
+
|
|
58
|
+
@_builtins.property
|
|
59
|
+
@pulumi.getter(name="bucketName")
|
|
60
|
+
def bucket_name(self) -> _builtins.str:
|
|
61
|
+
"""
|
|
62
|
+
Human-readable label that identifies the S3 bucket name for storing log files.
|
|
63
|
+
"""
|
|
64
|
+
return pulumi.get(self, "bucket_name")
|
|
65
|
+
|
|
66
|
+
@_builtins.property
|
|
67
|
+
@pulumi.getter(name="iamRoleId")
|
|
68
|
+
def iam_role_id(self) -> _builtins.str:
|
|
69
|
+
"""
|
|
70
|
+
Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket.
|
|
71
|
+
"""
|
|
72
|
+
return pulumi.get(self, "iam_role_id")
|
|
73
|
+
|
|
74
|
+
@_builtins.property
|
|
75
|
+
@pulumi.getter
|
|
76
|
+
def id(self) -> _builtins.str:
|
|
77
|
+
"""
|
|
78
|
+
The provider-assigned unique ID for this managed resource.
|
|
79
|
+
"""
|
|
80
|
+
return pulumi.get(self, "id")
|
|
81
|
+
|
|
82
|
+
@_builtins.property
|
|
83
|
+
@pulumi.getter(name="integrationId")
|
|
84
|
+
def integration_id(self) -> _builtins.str:
|
|
85
|
+
"""
|
|
86
|
+
Unique identifier of the log integration configuration.
|
|
87
|
+
"""
|
|
88
|
+
return pulumi.get(self, "integration_id")
|
|
89
|
+
|
|
90
|
+
@_builtins.property
|
|
91
|
+
@pulumi.getter(name="kmsKey")
|
|
92
|
+
def kms_key(self) -> _builtins.str:
|
|
93
|
+
"""
|
|
94
|
+
AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
|
|
95
|
+
"""
|
|
96
|
+
return pulumi.get(self, "kms_key")
|
|
97
|
+
|
|
98
|
+
@_builtins.property
|
|
99
|
+
@pulumi.getter(name="logTypes")
|
|
100
|
+
def log_types(self) -> Sequence[_builtins.str]:
|
|
101
|
+
"""
|
|
102
|
+
Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGOD*AUDIT, MONGOS*AUDIT.
|
|
103
|
+
"""
|
|
104
|
+
return pulumi.get(self, "log_types")
|
|
105
|
+
|
|
106
|
+
@_builtins.property
|
|
107
|
+
@pulumi.getter(name="prefixPath")
|
|
108
|
+
def prefix_path(self) -> _builtins.str:
|
|
109
|
+
"""
|
|
110
|
+
S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type.
|
|
111
|
+
"""
|
|
112
|
+
return pulumi.get(self, "prefix_path")
|
|
113
|
+
|
|
114
|
+
@_builtins.property
|
|
115
|
+
@pulumi.getter(name="projectId")
|
|
116
|
+
def project_id(self) -> _builtins.str:
|
|
117
|
+
"""
|
|
118
|
+
Unique 24-hexadecimal digit string that identifies your project.
|
|
119
|
+
"""
|
|
120
|
+
return pulumi.get(self, "project_id")
|
|
121
|
+
|
|
122
|
+
@_builtins.property
|
|
123
|
+
@pulumi.getter
|
|
124
|
+
def type(self) -> _builtins.str:
|
|
125
|
+
"""
|
|
126
|
+
Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type.
|
|
127
|
+
"""
|
|
128
|
+
return pulumi.get(self, "type")
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
class AwaitableGetLogIntegrationResult(GetLogIntegrationResult):
|
|
132
|
+
# pylint: disable=using-constant-test
|
|
133
|
+
def __await__(self):
|
|
134
|
+
if False:
|
|
135
|
+
yield self
|
|
136
|
+
return GetLogIntegrationResult(
|
|
137
|
+
bucket_name=self.bucket_name,
|
|
138
|
+
iam_role_id=self.iam_role_id,
|
|
139
|
+
id=self.id,
|
|
140
|
+
integration_id=self.integration_id,
|
|
141
|
+
kms_key=self.kms_key,
|
|
142
|
+
log_types=self.log_types,
|
|
143
|
+
prefix_path=self.prefix_path,
|
|
144
|
+
project_id=self.project_id,
|
|
145
|
+
type=self.type)
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
def get_log_integration(integration_id: Optional[_builtins.str] = None,
|
|
149
|
+
project_id: Optional[_builtins.str] = None,
|
|
150
|
+
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetLogIntegrationResult:
|
|
151
|
+
"""
|
|
152
|
+
`LogIntegration` describes the configuration for a log integration identified by its unique ID. Log integrations are managed at the project level and allow you to continually export `mongod`, `mongos`, and audit logs to an AWS S3 bucket with 1-minute log export intervals.
|
|
153
|
+
|
|
154
|
+
To use this data source, the requesting Service Account or API Key must have the Organization Owner or Project Owner role.
|
|
155
|
+
|
|
156
|
+
## Example Usage
|
|
157
|
+
|
|
158
|
+
```python
|
|
159
|
+
import pulumi
|
|
160
|
+
import pulumi_mongodbatlas as mongodbatlas
|
|
161
|
+
|
|
162
|
+
project = mongodbatlas.Project("project",
|
|
163
|
+
name=atlas_project_name,
|
|
164
|
+
org_id=atlas_org_id)
|
|
165
|
+
# Set up cloud provider access in Atlas using the created IAM role
|
|
166
|
+
setup_only = mongodbatlas.CloudProviderAccessSetup("setup_only",
|
|
167
|
+
project_id=project.id,
|
|
168
|
+
provider_name="AWS")
|
|
169
|
+
auth_role = mongodbatlas.CloudProviderAccessAuthorization("auth_role",
|
|
170
|
+
project_id=project.id,
|
|
171
|
+
role_id=setup_only.role_id,
|
|
172
|
+
aws={
|
|
173
|
+
"iam_assumed_role_arn": atlas_role["arn"],
|
|
174
|
+
})
|
|
175
|
+
# Set up log integration with authorized IAM role
|
|
176
|
+
example_log_integration = mongodbatlas.LogIntegration("example",
|
|
177
|
+
project_id=project.id,
|
|
178
|
+
bucket_name=log_bucket["bucket"],
|
|
179
|
+
iam_role_id=auth_role.role_id,
|
|
180
|
+
prefix_path="atlas-logs",
|
|
181
|
+
type="S3_LOG_EXPORT",
|
|
182
|
+
log_types=["MONGOD_AUDIT"])
|
|
183
|
+
example = mongodbatlas.get_log_integration_output(project_id=example_log_integration.project_id,
|
|
184
|
+
integration_id=example_log_integration.integration_id)
|
|
185
|
+
example_get_log_integrations = mongodbatlas.get_log_integrations_output(project_id=example_log_integration.project_id)
|
|
186
|
+
pulumi.export("logIntegrationBucketName", example.bucket_name)
|
|
187
|
+
pulumi.export("logIntegrationsResults", example_get_log_integrations.results)
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
:param _builtins.str integration_id: Unique identifier of the log integration configuration.
|
|
192
|
+
:param _builtins.str project_id: Unique 24-hexadecimal digit string that identifies your project.
|
|
193
|
+
"""
|
|
194
|
+
__args__ = dict()
|
|
195
|
+
__args__['integrationId'] = integration_id
|
|
196
|
+
__args__['projectId'] = project_id
|
|
197
|
+
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
198
|
+
__ret__ = pulumi.runtime.invoke('mongodbatlas:index/getLogIntegration:getLogIntegration', __args__, opts=opts, typ=GetLogIntegrationResult).value
|
|
199
|
+
|
|
200
|
+
return AwaitableGetLogIntegrationResult(
|
|
201
|
+
bucket_name=pulumi.get(__ret__, 'bucket_name'),
|
|
202
|
+
iam_role_id=pulumi.get(__ret__, 'iam_role_id'),
|
|
203
|
+
id=pulumi.get(__ret__, 'id'),
|
|
204
|
+
integration_id=pulumi.get(__ret__, 'integration_id'),
|
|
205
|
+
kms_key=pulumi.get(__ret__, 'kms_key'),
|
|
206
|
+
log_types=pulumi.get(__ret__, 'log_types'),
|
|
207
|
+
prefix_path=pulumi.get(__ret__, 'prefix_path'),
|
|
208
|
+
project_id=pulumi.get(__ret__, 'project_id'),
|
|
209
|
+
type=pulumi.get(__ret__, 'type'))
|
|
210
|
+
def get_log_integration_output(integration_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
211
|
+
project_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
212
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetLogIntegrationResult]:
|
|
213
|
+
"""
|
|
214
|
+
`LogIntegration` describes the configuration for a log integration identified by its unique ID. Log integrations are managed at the project level and allow you to continually export `mongod`, `mongos`, and audit logs to an AWS S3 bucket with 1-minute log export intervals.
|
|
215
|
+
|
|
216
|
+
To use this data source, the requesting Service Account or API Key must have the Organization Owner or Project Owner role.
|
|
217
|
+
|
|
218
|
+
## Example Usage
|
|
219
|
+
|
|
220
|
+
```python
|
|
221
|
+
import pulumi
|
|
222
|
+
import pulumi_mongodbatlas as mongodbatlas
|
|
223
|
+
|
|
224
|
+
project = mongodbatlas.Project("project",
|
|
225
|
+
name=atlas_project_name,
|
|
226
|
+
org_id=atlas_org_id)
|
|
227
|
+
# Set up cloud provider access in Atlas using the created IAM role
|
|
228
|
+
setup_only = mongodbatlas.CloudProviderAccessSetup("setup_only",
|
|
229
|
+
project_id=project.id,
|
|
230
|
+
provider_name="AWS")
|
|
231
|
+
auth_role = mongodbatlas.CloudProviderAccessAuthorization("auth_role",
|
|
232
|
+
project_id=project.id,
|
|
233
|
+
role_id=setup_only.role_id,
|
|
234
|
+
aws={
|
|
235
|
+
"iam_assumed_role_arn": atlas_role["arn"],
|
|
236
|
+
})
|
|
237
|
+
# Set up log integration with authorized IAM role
|
|
238
|
+
example_log_integration = mongodbatlas.LogIntegration("example",
|
|
239
|
+
project_id=project.id,
|
|
240
|
+
bucket_name=log_bucket["bucket"],
|
|
241
|
+
iam_role_id=auth_role.role_id,
|
|
242
|
+
prefix_path="atlas-logs",
|
|
243
|
+
type="S3_LOG_EXPORT",
|
|
244
|
+
log_types=["MONGOD_AUDIT"])
|
|
245
|
+
example = mongodbatlas.get_log_integration_output(project_id=example_log_integration.project_id,
|
|
246
|
+
integration_id=example_log_integration.integration_id)
|
|
247
|
+
example_get_log_integrations = mongodbatlas.get_log_integrations_output(project_id=example_log_integration.project_id)
|
|
248
|
+
pulumi.export("logIntegrationBucketName", example.bucket_name)
|
|
249
|
+
pulumi.export("logIntegrationsResults", example_get_log_integrations.results)
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
:param _builtins.str integration_id: Unique identifier of the log integration configuration.
|
|
254
|
+
:param _builtins.str project_id: Unique 24-hexadecimal digit string that identifies your project.
|
|
255
|
+
"""
|
|
256
|
+
__args__ = dict()
|
|
257
|
+
__args__['integrationId'] = integration_id
|
|
258
|
+
__args__['projectId'] = project_id
|
|
259
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
260
|
+
__ret__ = pulumi.runtime.invoke_output('mongodbatlas:index/getLogIntegration:getLogIntegration', __args__, opts=opts, typ=GetLogIntegrationResult)
|
|
261
|
+
return __ret__.apply(lambda __response__: GetLogIntegrationResult(
|
|
262
|
+
bucket_name=pulumi.get(__response__, 'bucket_name'),
|
|
263
|
+
iam_role_id=pulumi.get(__response__, 'iam_role_id'),
|
|
264
|
+
id=pulumi.get(__response__, 'id'),
|
|
265
|
+
integration_id=pulumi.get(__response__, 'integration_id'),
|
|
266
|
+
kms_key=pulumi.get(__response__, 'kms_key'),
|
|
267
|
+
log_types=pulumi.get(__response__, 'log_types'),
|
|
268
|
+
prefix_path=pulumi.get(__response__, 'prefix_path'),
|
|
269
|
+
project_id=pulumi.get(__response__, 'project_id'),
|
|
270
|
+
type=pulumi.get(__response__, 'type')))
|