pulumi-newrelic 5.19.0a1708333884__py3-none-any.whl → 5.20.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_newrelic/__init__.py +10 -0
- pulumi_newrelic/alert_policy.py +26 -0
- pulumi_newrelic/get_alert_policy.py +3 -3
- pulumi_newrelic/get_group.py +141 -0
- pulumi_newrelic/get_user.py +6 -6
- pulumi_newrelic/group.py +412 -0
- pulumi_newrelic/notification_channel.py +26 -0
- pulumi_newrelic/notification_destination.py +140 -2
- {pulumi_newrelic-5.19.0a1708333884.dist-info → pulumi_newrelic-5.20.0.dist-info}/METADATA +1 -1
- {pulumi_newrelic-5.19.0a1708333884.dist-info → pulumi_newrelic-5.20.0.dist-info}/RECORD +12 -10
- {pulumi_newrelic-5.19.0a1708333884.dist-info → pulumi_newrelic-5.20.0.dist-info}/WHEEL +0 -0
- {pulumi_newrelic-5.19.0a1708333884.dist-info → pulumi_newrelic-5.20.0.dist-info}/top_level.txt +0 -0
pulumi_newrelic/__init__.py
CHANGED
@@ -23,12 +23,14 @@ from .get_application import *
|
|
23
23
|
from .get_authentication_domain import *
|
24
24
|
from .get_cloud_account import *
|
25
25
|
from .get_entity import *
|
26
|
+
from .get_group import *
|
26
27
|
from .get_key_transaction import *
|
27
28
|
from .get_notification_destination import *
|
28
29
|
from .get_obfuscation_expression import *
|
29
30
|
from .get_service_level_alert_helper import *
|
30
31
|
from .get_test_grok_pattern import *
|
31
32
|
from .get_user import *
|
33
|
+
from .group import *
|
32
34
|
from .infra_alert_condition import *
|
33
35
|
from .log_parsing_rule import *
|
34
36
|
from .monitor_downtime import *
|
@@ -222,6 +224,14 @@ _utilities.register(
|
|
222
224
|
"newrelic:index/eventsToMetricsRule:EventsToMetricsRule": "EventsToMetricsRule"
|
223
225
|
}
|
224
226
|
},
|
227
|
+
{
|
228
|
+
"pkg": "newrelic",
|
229
|
+
"mod": "index/group",
|
230
|
+
"fqn": "pulumi_newrelic",
|
231
|
+
"classes": {
|
232
|
+
"newrelic:index/group:Group": "Group"
|
233
|
+
}
|
234
|
+
},
|
225
235
|
{
|
226
236
|
"pkg": "newrelic",
|
227
237
|
"mod": "index/infraAlertCondition",
|
pulumi_newrelic/alert_policy.py
CHANGED
@@ -191,6 +191,18 @@ class AlertPolicy(pulumi.CustomResource):
|
|
191
191
|
```
|
192
192
|
### Provision multiple notification channels and add those channels to a policy
|
193
193
|
|
194
|
+
The following arguments are supported:
|
195
|
+
|
196
|
+
* `name` - (Required) The name of the policy.
|
197
|
+
* `incident_preference` - (Optional) The rollup strategy for the policy, which can have one of the following values (the default value is `PER_POLICY`):
|
198
|
+
* `PER_POLICY` - This sets the incident grouping preference of the policy to **One issue per policy**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-policy) for more details on this incident grouping preference.
|
199
|
+
* `PER_CONDITION` - This sets the incident grouping preference of the policy to **One issue per condition**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-condition) for more details on this incident grouping preference.
|
200
|
+
* `PER_CONDITION_AND_TARGET` - This sets the incident grouping preference of the policy to **One issue per condition and signal**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-signal) for more details on this incident grouping preference.
|
201
|
+
* `channel_ids` - (Optional) **DEPRECATED** The `channel_ids` argument is deprecated and will be removed in the next major release of the provider. An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs _cannot_ be imported via `pulumi import` (see Import for info).
|
202
|
+
* `account_id` - (Optional) The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
|
203
|
+
## Additional Examples
|
204
|
+
|
205
|
+
##### Provision multiple notification channels and add those channels to a policy
|
194
206
|
```python
|
195
207
|
import pulumi
|
196
208
|
import pulumi_newrelic as newrelic
|
@@ -217,6 +229,7 @@ class AlertPolicy(pulumi.CustomResource):
|
|
217
229
|
email_channel.id,
|
218
230
|
])
|
219
231
|
```
|
232
|
+
|
220
233
|
### Reference existing notification channels and add those channel to a policy
|
221
234
|
```python
|
222
235
|
import pulumi
|
@@ -271,6 +284,18 @@ class AlertPolicy(pulumi.CustomResource):
|
|
271
284
|
```
|
272
285
|
### Provision multiple notification channels and add those channels to a policy
|
273
286
|
|
287
|
+
The following arguments are supported:
|
288
|
+
|
289
|
+
* `name` - (Required) The name of the policy.
|
290
|
+
* `incident_preference` - (Optional) The rollup strategy for the policy, which can have one of the following values (the default value is `PER_POLICY`):
|
291
|
+
* `PER_POLICY` - This sets the incident grouping preference of the policy to **One issue per policy**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-policy) for more details on this incident grouping preference.
|
292
|
+
* `PER_CONDITION` - This sets the incident grouping preference of the policy to **One issue per condition**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-condition) for more details on this incident grouping preference.
|
293
|
+
* `PER_CONDITION_AND_TARGET` - This sets the incident grouping preference of the policy to **One issue per condition and signal**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-signal) for more details on this incident grouping preference.
|
294
|
+
* `channel_ids` - (Optional) **DEPRECATED** The `channel_ids` argument is deprecated and will be removed in the next major release of the provider. An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs _cannot_ be imported via `pulumi import` (see Import for info).
|
295
|
+
* `account_id` - (Optional) The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
|
296
|
+
## Additional Examples
|
297
|
+
|
298
|
+
##### Provision multiple notification channels and add those channels to a policy
|
274
299
|
```python
|
275
300
|
import pulumi
|
276
301
|
import pulumi_newrelic as newrelic
|
@@ -297,6 +322,7 @@ class AlertPolicy(pulumi.CustomResource):
|
|
297
322
|
email_channel.id,
|
298
323
|
])
|
299
324
|
```
|
325
|
+
|
300
326
|
### Reference existing notification channels and add those channel to a policy
|
301
327
|
```python
|
302
328
|
import pulumi
|
@@ -66,7 +66,7 @@ class GetAlertPolicyResult:
|
|
66
66
|
@pulumi.getter(name="incidentPreference")
|
67
67
|
def incident_preference(self) -> Optional[str]:
|
68
68
|
"""
|
69
|
-
The rollup strategy for the policy
|
69
|
+
The rollup strategy for the policy, which can have one of the following values:
|
70
70
|
"""
|
71
71
|
return pulumi.get(self, "incident_preference")
|
72
72
|
|
@@ -107,7 +107,7 @@ def get_alert_policy(account_id: Optional[int] = None,
|
|
107
107
|
|
108
108
|
|
109
109
|
:param int account_id: The New Relic account ID to operate on. This allows you to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
|
110
|
-
:param str incident_preference: The rollup strategy for the policy
|
110
|
+
:param str incident_preference: The rollup strategy for the policy, which can have one of the following values:
|
111
111
|
:param str name: The name of the alert policy in New Relic.
|
112
112
|
"""
|
113
113
|
__args__ = dict()
|
@@ -136,7 +136,7 @@ def get_alert_policy_output(account_id: Optional[pulumi.Input[Optional[int]]] =
|
|
136
136
|
|
137
137
|
|
138
138
|
:param int account_id: The New Relic account ID to operate on. This allows you to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
|
139
|
-
:param str incident_preference: The rollup strategy for the policy
|
139
|
+
:param str incident_preference: The rollup strategy for the policy, which can have one of the following values:
|
140
140
|
:param str name: The name of the alert policy in New Relic.
|
141
141
|
"""
|
142
142
|
...
|
@@ -0,0 +1,141 @@
|
|
1
|
+
# coding=utf-8
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
4
|
+
|
5
|
+
import copy
|
6
|
+
import warnings
|
7
|
+
import pulumi
|
8
|
+
import pulumi.runtime
|
9
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
10
|
+
from . import _utilities
|
11
|
+
|
12
|
+
__all__ = [
|
13
|
+
'GetGroupResult',
|
14
|
+
'AwaitableGetGroupResult',
|
15
|
+
'get_group',
|
16
|
+
'get_group_output',
|
17
|
+
]
|
18
|
+
|
19
|
+
@pulumi.output_type
|
20
|
+
class GetGroupResult:
|
21
|
+
"""
|
22
|
+
A collection of values returned by getGroup.
|
23
|
+
"""
|
24
|
+
def __init__(__self__, authentication_domain_id=None, id=None, name=None, user_ids=None):
|
25
|
+
if authentication_domain_id and not isinstance(authentication_domain_id, str):
|
26
|
+
raise TypeError("Expected argument 'authentication_domain_id' to be a str")
|
27
|
+
pulumi.set(__self__, "authentication_domain_id", authentication_domain_id)
|
28
|
+
if id and not isinstance(id, str):
|
29
|
+
raise TypeError("Expected argument 'id' to be a str")
|
30
|
+
pulumi.set(__self__, "id", id)
|
31
|
+
if name and not isinstance(name, str):
|
32
|
+
raise TypeError("Expected argument 'name' to be a str")
|
33
|
+
pulumi.set(__self__, "name", name)
|
34
|
+
if user_ids and not isinstance(user_ids, list):
|
35
|
+
raise TypeError("Expected argument 'user_ids' to be a list")
|
36
|
+
pulumi.set(__self__, "user_ids", user_ids)
|
37
|
+
|
38
|
+
@property
|
39
|
+
@pulumi.getter(name="authenticationDomainId")
|
40
|
+
def authentication_domain_id(self) -> str:
|
41
|
+
return pulumi.get(self, "authentication_domain_id")
|
42
|
+
|
43
|
+
@property
|
44
|
+
@pulumi.getter
|
45
|
+
def id(self) -> str:
|
46
|
+
"""
|
47
|
+
The ID of the fetched matching group.
|
48
|
+
"""
|
49
|
+
return pulumi.get(self, "id")
|
50
|
+
|
51
|
+
@property
|
52
|
+
@pulumi.getter
|
53
|
+
def name(self) -> str:
|
54
|
+
return pulumi.get(self, "name")
|
55
|
+
|
56
|
+
@property
|
57
|
+
@pulumi.getter(name="userIds")
|
58
|
+
def user_ids(self) -> Sequence[str]:
|
59
|
+
"""
|
60
|
+
IDs of users who belong to the group. In the absence of any users in the group, the value of this attribute would be an empty list.
|
61
|
+
"""
|
62
|
+
return pulumi.get(self, "user_ids")
|
63
|
+
|
64
|
+
|
65
|
+
class AwaitableGetGroupResult(GetGroupResult):
|
66
|
+
# pylint: disable=using-constant-test
|
67
|
+
def __await__(self):
|
68
|
+
if False:
|
69
|
+
yield self
|
70
|
+
return GetGroupResult(
|
71
|
+
authentication_domain_id=self.authentication_domain_id,
|
72
|
+
id=self.id,
|
73
|
+
name=self.name,
|
74
|
+
user_ids=self.user_ids)
|
75
|
+
|
76
|
+
|
77
|
+
def get_group(authentication_domain_id: Optional[str] = None,
|
78
|
+
name: Optional[str] = None,
|
79
|
+
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetGroupResult:
|
80
|
+
"""
|
81
|
+
The `Group` data source helps search for a group by its name and retrieve the ID of the matching group and other associated attributes.
|
82
|
+
|
83
|
+
## Example Usage
|
84
|
+
|
85
|
+
The below example illustrates fetching the ID of a group (and IDs of users who belong to the group, if any) using the required arguments.
|
86
|
+
|
87
|
+
```python
|
88
|
+
import pulumi
|
89
|
+
import pulumi_newrelic as newrelic
|
90
|
+
|
91
|
+
foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
92
|
+
foo_group = newrelic.get_group(authentication_domain_id=foo_authentication_domain.id,
|
93
|
+
name="Test Group")
|
94
|
+
```
|
95
|
+
|
96
|
+
|
97
|
+
:param str authentication_domain_id: The ID of the authentication domain the group to be searched for belongs to.
|
98
|
+
:param str name: The name of the group to search for.
|
99
|
+
|
100
|
+
> **NOTE** The ID of an authentication domain can be retrieved using its name, via the data source `get_authentication_domain`, as shown in the example above. Head over to the documentation of this data source for more details and examples.
|
101
|
+
"""
|
102
|
+
__args__ = dict()
|
103
|
+
__args__['authenticationDomainId'] = authentication_domain_id
|
104
|
+
__args__['name'] = name
|
105
|
+
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
106
|
+
__ret__ = pulumi.runtime.invoke('newrelic:index/getGroup:getGroup', __args__, opts=opts, typ=GetGroupResult).value
|
107
|
+
|
108
|
+
return AwaitableGetGroupResult(
|
109
|
+
authentication_domain_id=pulumi.get(__ret__, 'authentication_domain_id'),
|
110
|
+
id=pulumi.get(__ret__, 'id'),
|
111
|
+
name=pulumi.get(__ret__, 'name'),
|
112
|
+
user_ids=pulumi.get(__ret__, 'user_ids'))
|
113
|
+
|
114
|
+
|
115
|
+
@_utilities.lift_output_func(get_group)
|
116
|
+
def get_group_output(authentication_domain_id: Optional[pulumi.Input[str]] = None,
|
117
|
+
name: Optional[pulumi.Input[str]] = None,
|
118
|
+
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetGroupResult]:
|
119
|
+
"""
|
120
|
+
The `Group` data source helps search for a group by its name and retrieve the ID of the matching group and other associated attributes.
|
121
|
+
|
122
|
+
## Example Usage
|
123
|
+
|
124
|
+
The below example illustrates fetching the ID of a group (and IDs of users who belong to the group, if any) using the required arguments.
|
125
|
+
|
126
|
+
```python
|
127
|
+
import pulumi
|
128
|
+
import pulumi_newrelic as newrelic
|
129
|
+
|
130
|
+
foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
131
|
+
foo_group = newrelic.get_group(authentication_domain_id=foo_authentication_domain.id,
|
132
|
+
name="Test Group")
|
133
|
+
```
|
134
|
+
|
135
|
+
|
136
|
+
:param str authentication_domain_id: The ID of the authentication domain the group to be searched for belongs to.
|
137
|
+
:param str name: The name of the group to search for.
|
138
|
+
|
139
|
+
> **NOTE** The ID of an authentication domain can be retrieved using its name, via the data source `get_authentication_domain`, as shown in the example above. Head over to the documentation of this data source for more details and examples.
|
140
|
+
"""
|
141
|
+
...
|
pulumi_newrelic/get_user.py
CHANGED
@@ -76,11 +76,11 @@ def get_user(authentication_domain_id: Optional[str] = None,
|
|
76
76
|
name: Optional[str] = None,
|
77
77
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetUserResult:
|
78
78
|
"""
|
79
|
-
The `User` data source
|
79
|
+
The `User` data source helps search for a user by their name and/or email ID, and accordingly, fetch the ID of the matching user.
|
80
80
|
|
81
81
|
## Example Usage
|
82
82
|
|
83
|
-
The below example illustrates fetching a
|
83
|
+
The below example illustrates fetching a the ID of a user (and other arguments) using the ID of the authentication domain the user belongs to, as well as a name and/or email ID, which can be used as criteria to search for a user who matches these specified parameters.
|
84
84
|
```python
|
85
85
|
import pulumi
|
86
86
|
import pulumi_newrelic as newrelic
|
@@ -98,7 +98,7 @@ def get_user(authentication_domain_id: Optional[str] = None,
|
|
98
98
|
|
99
99
|
It should be noted that either `name` or `email_id` must be specified in order to retrieve a matching user.
|
100
100
|
|
101
|
-
> **NOTE** If the
|
101
|
+
> **NOTE** If the `name` specified in the configuration matches the names of multiple users in the account, the data source will return the first match from the list of all matching users retrieved from the API. However, when using the `email_id` argument as the search criterion, only the user with the specified email ID will be returned, as each user has a unique email ID and multiple users cannot have the same email ID.
|
102
102
|
|
103
103
|
> **NOTE** The ID of an authentication domain can be retrieved using its name, via the data source `get_authentication_domain`, as shown in the example above. Head over to the documentation of this data source for more details and examples.
|
104
104
|
:param str name: The name of the user to search for.
|
@@ -123,11 +123,11 @@ def get_user_output(authentication_domain_id: Optional[pulumi.Input[str]] = None
|
|
123
123
|
name: Optional[pulumi.Input[Optional[str]]] = None,
|
124
124
|
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetUserResult]:
|
125
125
|
"""
|
126
|
-
The `User` data source
|
126
|
+
The `User` data source helps search for a user by their name and/or email ID, and accordingly, fetch the ID of the matching user.
|
127
127
|
|
128
128
|
## Example Usage
|
129
129
|
|
130
|
-
The below example illustrates fetching a
|
130
|
+
The below example illustrates fetching a the ID of a user (and other arguments) using the ID of the authentication domain the user belongs to, as well as a name and/or email ID, which can be used as criteria to search for a user who matches these specified parameters.
|
131
131
|
```python
|
132
132
|
import pulumi
|
133
133
|
import pulumi_newrelic as newrelic
|
@@ -145,7 +145,7 @@ def get_user_output(authentication_domain_id: Optional[pulumi.Input[str]] = None
|
|
145
145
|
|
146
146
|
It should be noted that either `name` or `email_id` must be specified in order to retrieve a matching user.
|
147
147
|
|
148
|
-
> **NOTE** If the
|
148
|
+
> **NOTE** If the `name` specified in the configuration matches the names of multiple users in the account, the data source will return the first match from the list of all matching users retrieved from the API. However, when using the `email_id` argument as the search criterion, only the user with the specified email ID will be returned, as each user has a unique email ID and multiple users cannot have the same email ID.
|
149
149
|
|
150
150
|
> **NOTE** The ID of an authentication domain can be retrieved using its name, via the data source `get_authentication_domain`, as shown in the example above. Head over to the documentation of this data source for more details and examples.
|
151
151
|
:param str name: The name of the user to search for.
|
pulumi_newrelic/group.py
ADDED
@@ -0,0 +1,412 @@
|
|
1
|
+
# coding=utf-8
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
4
|
+
|
5
|
+
import copy
|
6
|
+
import warnings
|
7
|
+
import pulumi
|
8
|
+
import pulumi.runtime
|
9
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
10
|
+
from . import _utilities
|
11
|
+
|
12
|
+
__all__ = ['GroupArgs', 'Group']
|
13
|
+
|
14
|
+
@pulumi.input_type
|
15
|
+
class GroupArgs:
|
16
|
+
def __init__(__self__, *,
|
17
|
+
authentication_domain_id: pulumi.Input[str],
|
18
|
+
name: Optional[pulumi.Input[str]] = None,
|
19
|
+
user_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
|
20
|
+
"""
|
21
|
+
The set of arguments for constructing a Group resource.
|
22
|
+
:param pulumi.Input[str] authentication_domain_id: The ID of the authentication domain to which the group to be created would belong.
|
23
|
+
:param pulumi.Input[str] name: The name of the group to be created.
|
24
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] user_ids: A list of IDs of users to be included in the group to be created.
|
25
|
+
|
26
|
+
> **NOTE** The ID of an authentication domain can be retrieved using its name, via the data source `get_authentication_domain`, as shown in the example above. Head over to the documentation of this data source for more details and examples.
|
27
|
+
|
28
|
+
> **WARNING:** Changing the `authentication_domain_id` of a `Group` resource that has already been applied would result in a **replacement** of the resource – destruction of the existing resource, followed by the addition of a new resource with the specified configuration. This is due to the fact that updating the `authentication_domain_id` of an existing group is not supported.
|
29
|
+
"""
|
30
|
+
pulumi.set(__self__, "authentication_domain_id", authentication_domain_id)
|
31
|
+
if name is not None:
|
32
|
+
pulumi.set(__self__, "name", name)
|
33
|
+
if user_ids is not None:
|
34
|
+
pulumi.set(__self__, "user_ids", user_ids)
|
35
|
+
|
36
|
+
@property
|
37
|
+
@pulumi.getter(name="authenticationDomainId")
|
38
|
+
def authentication_domain_id(self) -> pulumi.Input[str]:
|
39
|
+
"""
|
40
|
+
The ID of the authentication domain to which the group to be created would belong.
|
41
|
+
"""
|
42
|
+
return pulumi.get(self, "authentication_domain_id")
|
43
|
+
|
44
|
+
@authentication_domain_id.setter
|
45
|
+
def authentication_domain_id(self, value: pulumi.Input[str]):
|
46
|
+
pulumi.set(self, "authentication_domain_id", value)
|
47
|
+
|
48
|
+
@property
|
49
|
+
@pulumi.getter
|
50
|
+
def name(self) -> Optional[pulumi.Input[str]]:
|
51
|
+
"""
|
52
|
+
The name of the group to be created.
|
53
|
+
"""
|
54
|
+
return pulumi.get(self, "name")
|
55
|
+
|
56
|
+
@name.setter
|
57
|
+
def name(self, value: Optional[pulumi.Input[str]]):
|
58
|
+
pulumi.set(self, "name", value)
|
59
|
+
|
60
|
+
@property
|
61
|
+
@pulumi.getter(name="userIds")
|
62
|
+
def user_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
63
|
+
"""
|
64
|
+
A list of IDs of users to be included in the group to be created.
|
65
|
+
|
66
|
+
> **NOTE** The ID of an authentication domain can be retrieved using its name, via the data source `get_authentication_domain`, as shown in the example above. Head over to the documentation of this data source for more details and examples.
|
67
|
+
|
68
|
+
> **WARNING:** Changing the `authentication_domain_id` of a `Group` resource that has already been applied would result in a **replacement** of the resource – destruction of the existing resource, followed by the addition of a new resource with the specified configuration. This is due to the fact that updating the `authentication_domain_id` of an existing group is not supported.
|
69
|
+
"""
|
70
|
+
return pulumi.get(self, "user_ids")
|
71
|
+
|
72
|
+
@user_ids.setter
|
73
|
+
def user_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
74
|
+
pulumi.set(self, "user_ids", value)
|
75
|
+
|
76
|
+
|
77
|
+
@pulumi.input_type
|
78
|
+
class _GroupState:
|
79
|
+
def __init__(__self__, *,
|
80
|
+
authentication_domain_id: Optional[pulumi.Input[str]] = None,
|
81
|
+
name: Optional[pulumi.Input[str]] = None,
|
82
|
+
user_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
|
83
|
+
"""
|
84
|
+
Input properties used for looking up and filtering Group resources.
|
85
|
+
:param pulumi.Input[str] authentication_domain_id: The ID of the authentication domain to which the group to be created would belong.
|
86
|
+
:param pulumi.Input[str] name: The name of the group to be created.
|
87
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] user_ids: A list of IDs of users to be included in the group to be created.
|
88
|
+
|
89
|
+
> **NOTE** The ID of an authentication domain can be retrieved using its name, via the data source `get_authentication_domain`, as shown in the example above. Head over to the documentation of this data source for more details and examples.
|
90
|
+
|
91
|
+
> **WARNING:** Changing the `authentication_domain_id` of a `Group` resource that has already been applied would result in a **replacement** of the resource – destruction of the existing resource, followed by the addition of a new resource with the specified configuration. This is due to the fact that updating the `authentication_domain_id` of an existing group is not supported.
|
92
|
+
"""
|
93
|
+
if authentication_domain_id is not None:
|
94
|
+
pulumi.set(__self__, "authentication_domain_id", authentication_domain_id)
|
95
|
+
if name is not None:
|
96
|
+
pulumi.set(__self__, "name", name)
|
97
|
+
if user_ids is not None:
|
98
|
+
pulumi.set(__self__, "user_ids", user_ids)
|
99
|
+
|
100
|
+
@property
|
101
|
+
@pulumi.getter(name="authenticationDomainId")
|
102
|
+
def authentication_domain_id(self) -> Optional[pulumi.Input[str]]:
|
103
|
+
"""
|
104
|
+
The ID of the authentication domain to which the group to be created would belong.
|
105
|
+
"""
|
106
|
+
return pulumi.get(self, "authentication_domain_id")
|
107
|
+
|
108
|
+
@authentication_domain_id.setter
|
109
|
+
def authentication_domain_id(self, value: Optional[pulumi.Input[str]]):
|
110
|
+
pulumi.set(self, "authentication_domain_id", value)
|
111
|
+
|
112
|
+
@property
|
113
|
+
@pulumi.getter
|
114
|
+
def name(self) -> Optional[pulumi.Input[str]]:
|
115
|
+
"""
|
116
|
+
The name of the group to be created.
|
117
|
+
"""
|
118
|
+
return pulumi.get(self, "name")
|
119
|
+
|
120
|
+
@name.setter
|
121
|
+
def name(self, value: Optional[pulumi.Input[str]]):
|
122
|
+
pulumi.set(self, "name", value)
|
123
|
+
|
124
|
+
@property
|
125
|
+
@pulumi.getter(name="userIds")
|
126
|
+
def user_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
127
|
+
"""
|
128
|
+
A list of IDs of users to be included in the group to be created.
|
129
|
+
|
130
|
+
> **NOTE** The ID of an authentication domain can be retrieved using its name, via the data source `get_authentication_domain`, as shown in the example above. Head over to the documentation of this data source for more details and examples.
|
131
|
+
|
132
|
+
> **WARNING:** Changing the `authentication_domain_id` of a `Group` resource that has already been applied would result in a **replacement** of the resource – destruction of the existing resource, followed by the addition of a new resource with the specified configuration. This is due to the fact that updating the `authentication_domain_id` of an existing group is not supported.
|
133
|
+
"""
|
134
|
+
return pulumi.get(self, "user_ids")
|
135
|
+
|
136
|
+
@user_ids.setter
|
137
|
+
def user_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
138
|
+
pulumi.set(self, "user_ids", value)
|
139
|
+
|
140
|
+
|
141
|
+
class Group(pulumi.CustomResource):
|
142
|
+
@overload
|
143
|
+
def __init__(__self__,
|
144
|
+
resource_name: str,
|
145
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
146
|
+
authentication_domain_id: Optional[pulumi.Input[str]] = None,
|
147
|
+
name: Optional[pulumi.Input[str]] = None,
|
148
|
+
user_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
149
|
+
__props__=None):
|
150
|
+
"""
|
151
|
+
The `Group` resource facilitates creating, updating, and deleting groups in New Relic, while also enabling the addition and removal of users from these groups.
|
152
|
+
|
153
|
+
## Example Usage
|
154
|
+
|
155
|
+
```python
|
156
|
+
import pulumi
|
157
|
+
import pulumi_newrelic as newrelic
|
158
|
+
|
159
|
+
foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
160
|
+
foo_group = newrelic.Group("fooGroup",
|
161
|
+
authentication_domain_id=foo_authentication_domain.id,
|
162
|
+
user_ids=[
|
163
|
+
"0001112222",
|
164
|
+
"2221110000",
|
165
|
+
])
|
166
|
+
```
|
167
|
+
## Additional Examples
|
168
|
+
|
169
|
+
### Addition of New Users to a New Group
|
170
|
+
|
171
|
+
The following example illustrates the creation of a group using the `Group` resource, to which users created using the `User` resource are added.
|
172
|
+
|
173
|
+
```python
|
174
|
+
import pulumi
|
175
|
+
import pulumi_newrelic as newrelic
|
176
|
+
|
177
|
+
foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
178
|
+
foo_user = newrelic.User("fooUser",
|
179
|
+
email_id="test_user_one@test.com",
|
180
|
+
authentication_domain_id=foo_authentication_domain.id,
|
181
|
+
user_type="CORE_USER_TIER")
|
182
|
+
bar = newrelic.User("bar",
|
183
|
+
email_id="test_user_two@test.com",
|
184
|
+
authentication_domain_id=foo_authentication_domain.id,
|
185
|
+
user_type="BASIC_USER_TIER")
|
186
|
+
foo_group = newrelic.Group("fooGroup",
|
187
|
+
authentication_domain_id=foo_authentication_domain.id,
|
188
|
+
user_ids=[
|
189
|
+
foo_user.id,
|
190
|
+
bar.id,
|
191
|
+
])
|
192
|
+
```
|
193
|
+
|
194
|
+
### Addition of Existing Users to a New Group
|
195
|
+
|
196
|
+
The following example demonstrates the usage of the `Group` resource to create a group, wherein the `User` data source is employed to associate existing users with the newly formed group.
|
197
|
+
|
198
|
+
```python
|
199
|
+
import pulumi
|
200
|
+
import pulumi_newrelic as newrelic
|
201
|
+
|
202
|
+
foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
203
|
+
foo_user = newrelic.get_user(authentication_domain_id=foo_authentication_domain.id,
|
204
|
+
email_id="test_user_one@test.com")
|
205
|
+
bar = newrelic.get_user(authentication_domain_id=foo_authentication_domain.id,
|
206
|
+
name="Test User Two")
|
207
|
+
foo_group = newrelic.Group("fooGroup",
|
208
|
+
authentication_domain_id=foo_authentication_domain.id,
|
209
|
+
user_ids=[
|
210
|
+
foo_user.id,
|
211
|
+
bar.id,
|
212
|
+
])
|
213
|
+
```
|
214
|
+
|
215
|
+
> **NOTE** Please note that the addition of users to groups is only possible when both the group and the users to be added to it belong to the _same authentication domain_. If the group being created and the users being added to it belong to different authentication domains, an error indicating `user not found` or an equivalent error will be thrown.
|
216
|
+
|
217
|
+
## Import
|
218
|
+
|
219
|
+
A group can be imported using its ID. Example:
|
220
|
+
|
221
|
+
```sh
|
222
|
+
$ pulumi import newrelic:index/group:Group foo <group_id>
|
223
|
+
```
|
224
|
+
|
225
|
+
:param str resource_name: The name of the resource.
|
226
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
227
|
+
:param pulumi.Input[str] authentication_domain_id: The ID of the authentication domain to which the group to be created would belong.
|
228
|
+
:param pulumi.Input[str] name: The name of the group to be created.
|
229
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] user_ids: A list of IDs of users to be included in the group to be created.
|
230
|
+
|
231
|
+
> **NOTE** The ID of an authentication domain can be retrieved using its name, via the data source `get_authentication_domain`, as shown in the example above. Head over to the documentation of this data source for more details and examples.
|
232
|
+
|
233
|
+
> **WARNING:** Changing the `authentication_domain_id` of a `Group` resource that has already been applied would result in a **replacement** of the resource – destruction of the existing resource, followed by the addition of a new resource with the specified configuration. This is due to the fact that updating the `authentication_domain_id` of an existing group is not supported.
|
234
|
+
"""
|
235
|
+
...
|
236
|
+
@overload
|
237
|
+
def __init__(__self__,
|
238
|
+
resource_name: str,
|
239
|
+
args: GroupArgs,
|
240
|
+
opts: Optional[pulumi.ResourceOptions] = None):
|
241
|
+
"""
|
242
|
+
The `Group` resource facilitates creating, updating, and deleting groups in New Relic, while also enabling the addition and removal of users from these groups.
|
243
|
+
|
244
|
+
## Example Usage
|
245
|
+
|
246
|
+
```python
|
247
|
+
import pulumi
|
248
|
+
import pulumi_newrelic as newrelic
|
249
|
+
|
250
|
+
foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
251
|
+
foo_group = newrelic.Group("fooGroup",
|
252
|
+
authentication_domain_id=foo_authentication_domain.id,
|
253
|
+
user_ids=[
|
254
|
+
"0001112222",
|
255
|
+
"2221110000",
|
256
|
+
])
|
257
|
+
```
|
258
|
+
## Additional Examples
|
259
|
+
|
260
|
+
### Addition of New Users to a New Group
|
261
|
+
|
262
|
+
The following example illustrates the creation of a group using the `Group` resource, to which users created using the `User` resource are added.
|
263
|
+
|
264
|
+
```python
|
265
|
+
import pulumi
|
266
|
+
import pulumi_newrelic as newrelic
|
267
|
+
|
268
|
+
foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
269
|
+
foo_user = newrelic.User("fooUser",
|
270
|
+
email_id="test_user_one@test.com",
|
271
|
+
authentication_domain_id=foo_authentication_domain.id,
|
272
|
+
user_type="CORE_USER_TIER")
|
273
|
+
bar = newrelic.User("bar",
|
274
|
+
email_id="test_user_two@test.com",
|
275
|
+
authentication_domain_id=foo_authentication_domain.id,
|
276
|
+
user_type="BASIC_USER_TIER")
|
277
|
+
foo_group = newrelic.Group("fooGroup",
|
278
|
+
authentication_domain_id=foo_authentication_domain.id,
|
279
|
+
user_ids=[
|
280
|
+
foo_user.id,
|
281
|
+
bar.id,
|
282
|
+
])
|
283
|
+
```
|
284
|
+
|
285
|
+
### Addition of Existing Users to a New Group
|
286
|
+
|
287
|
+
The following example demonstrates the usage of the `Group` resource to create a group, wherein the `User` data source is employed to associate existing users with the newly formed group.
|
288
|
+
|
289
|
+
```python
|
290
|
+
import pulumi
|
291
|
+
import pulumi_newrelic as newrelic
|
292
|
+
|
293
|
+
foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
294
|
+
foo_user = newrelic.get_user(authentication_domain_id=foo_authentication_domain.id,
|
295
|
+
email_id="test_user_one@test.com")
|
296
|
+
bar = newrelic.get_user(authentication_domain_id=foo_authentication_domain.id,
|
297
|
+
name="Test User Two")
|
298
|
+
foo_group = newrelic.Group("fooGroup",
|
299
|
+
authentication_domain_id=foo_authentication_domain.id,
|
300
|
+
user_ids=[
|
301
|
+
foo_user.id,
|
302
|
+
bar.id,
|
303
|
+
])
|
304
|
+
```
|
305
|
+
|
306
|
+
> **NOTE** Please note that the addition of users to groups is only possible when both the group and the users to be added to it belong to the _same authentication domain_. If the group being created and the users being added to it belong to different authentication domains, an error indicating `user not found` or an equivalent error will be thrown.
|
307
|
+
|
308
|
+
## Import
|
309
|
+
|
310
|
+
A group can be imported using its ID. Example:
|
311
|
+
|
312
|
+
```sh
|
313
|
+
$ pulumi import newrelic:index/group:Group foo <group_id>
|
314
|
+
```
|
315
|
+
|
316
|
+
:param str resource_name: The name of the resource.
|
317
|
+
:param GroupArgs args: The arguments to use to populate this resource's properties.
|
318
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
319
|
+
"""
|
320
|
+
...
|
321
|
+
def __init__(__self__, resource_name: str, *args, **kwargs):
|
322
|
+
resource_args, opts = _utilities.get_resource_args_opts(GroupArgs, pulumi.ResourceOptions, *args, **kwargs)
|
323
|
+
if resource_args is not None:
|
324
|
+
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
325
|
+
else:
|
326
|
+
__self__._internal_init(resource_name, *args, **kwargs)
|
327
|
+
|
328
|
+
def _internal_init(__self__,
|
329
|
+
resource_name: str,
|
330
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
331
|
+
authentication_domain_id: Optional[pulumi.Input[str]] = None,
|
332
|
+
name: Optional[pulumi.Input[str]] = None,
|
333
|
+
user_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
334
|
+
__props__=None):
|
335
|
+
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
336
|
+
if not isinstance(opts, pulumi.ResourceOptions):
|
337
|
+
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
338
|
+
if opts.id is None:
|
339
|
+
if __props__ is not None:
|
340
|
+
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
341
|
+
__props__ = GroupArgs.__new__(GroupArgs)
|
342
|
+
|
343
|
+
if authentication_domain_id is None and not opts.urn:
|
344
|
+
raise TypeError("Missing required property 'authentication_domain_id'")
|
345
|
+
__props__.__dict__["authentication_domain_id"] = authentication_domain_id
|
346
|
+
__props__.__dict__["name"] = name
|
347
|
+
__props__.__dict__["user_ids"] = user_ids
|
348
|
+
super(Group, __self__).__init__(
|
349
|
+
'newrelic:index/group:Group',
|
350
|
+
resource_name,
|
351
|
+
__props__,
|
352
|
+
opts)
|
353
|
+
|
354
|
+
@staticmethod
|
355
|
+
def get(resource_name: str,
|
356
|
+
id: pulumi.Input[str],
|
357
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
358
|
+
authentication_domain_id: Optional[pulumi.Input[str]] = None,
|
359
|
+
name: Optional[pulumi.Input[str]] = None,
|
360
|
+
user_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None) -> 'Group':
|
361
|
+
"""
|
362
|
+
Get an existing Group resource's state with the given name, id, and optional extra
|
363
|
+
properties used to qualify the lookup.
|
364
|
+
|
365
|
+
:param str resource_name: The unique name of the resulting resource.
|
366
|
+
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
367
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
368
|
+
:param pulumi.Input[str] authentication_domain_id: The ID of the authentication domain to which the group to be created would belong.
|
369
|
+
:param pulumi.Input[str] name: The name of the group to be created.
|
370
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] user_ids: A list of IDs of users to be included in the group to be created.
|
371
|
+
|
372
|
+
> **NOTE** The ID of an authentication domain can be retrieved using its name, via the data source `get_authentication_domain`, as shown in the example above. Head over to the documentation of this data source for more details and examples.
|
373
|
+
|
374
|
+
> **WARNING:** Changing the `authentication_domain_id` of a `Group` resource that has already been applied would result in a **replacement** of the resource – destruction of the existing resource, followed by the addition of a new resource with the specified configuration. This is due to the fact that updating the `authentication_domain_id` of an existing group is not supported.
|
375
|
+
"""
|
376
|
+
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
377
|
+
|
378
|
+
__props__ = _GroupState.__new__(_GroupState)
|
379
|
+
|
380
|
+
__props__.__dict__["authentication_domain_id"] = authentication_domain_id
|
381
|
+
__props__.__dict__["name"] = name
|
382
|
+
__props__.__dict__["user_ids"] = user_ids
|
383
|
+
return Group(resource_name, opts=opts, __props__=__props__)
|
384
|
+
|
385
|
+
@property
|
386
|
+
@pulumi.getter(name="authenticationDomainId")
|
387
|
+
def authentication_domain_id(self) -> pulumi.Output[str]:
|
388
|
+
"""
|
389
|
+
The ID of the authentication domain to which the group to be created would belong.
|
390
|
+
"""
|
391
|
+
return pulumi.get(self, "authentication_domain_id")
|
392
|
+
|
393
|
+
@property
|
394
|
+
@pulumi.getter
|
395
|
+
def name(self) -> pulumi.Output[str]:
|
396
|
+
"""
|
397
|
+
The name of the group to be created.
|
398
|
+
"""
|
399
|
+
return pulumi.get(self, "name")
|
400
|
+
|
401
|
+
@property
|
402
|
+
@pulumi.getter(name="userIds")
|
403
|
+
def user_ids(self) -> pulumi.Output[Optional[Sequence[str]]]:
|
404
|
+
"""
|
405
|
+
A list of IDs of users to be included in the group to be created.
|
406
|
+
|
407
|
+
> **NOTE** The ID of an authentication domain can be retrieved using its name, via the data source `get_authentication_domain`, as shown in the example above. Head over to the documentation of this data source for more details and examples.
|
408
|
+
|
409
|
+
> **WARNING:** Changing the `authentication_domain_id` of a `Group` resource that has already been applied would result in a **replacement** of the resource – destruction of the existing resource, followed by the addition of a new resource with the specified configuration. This is due to the fact that updating the `authentication_domain_id` of an existing group is not supported.
|
410
|
+
"""
|
411
|
+
return pulumi.get(self, "user_ids")
|
412
|
+
|
@@ -398,6 +398,7 @@ class NotificationChannel(pulumi.CustomResource):
|
|
398
398
|
),
|
399
399
|
newrelic.NotificationChannelPropertyArgs(
|
400
400
|
key="service",
|
401
|
+
label="Service Name",
|
401
402
|
value="PTQK3FM",
|
402
403
|
),
|
403
404
|
newrelic.NotificationChannelPropertyArgs(
|
@@ -565,6 +566,18 @@ class NotificationChannel(pulumi.CustomResource):
|
|
565
566
|
|
566
567
|
> **NOTE:** `AlertChannel` are legacy resources.
|
567
568
|
|
569
|
+
## Import
|
570
|
+
|
571
|
+
Channels can only be used by a single workflow, therefore importing them is not particularly useful, because in the UI channels are created upon workflow creation.
|
572
|
+
|
573
|
+
Additionally, the channel id isn't available via the UI, and you'd need to look it up with the `channels` query in the NerdGraph API.
|
574
|
+
|
575
|
+
That being said, importing is possible using -
|
576
|
+
|
577
|
+
```sh
|
578
|
+
$ pulumi import newrelic:index/notificationChannel:NotificationChannel foo <destination_id>
|
579
|
+
```
|
580
|
+
|
568
581
|
:param str resource_name: The name of the resource.
|
569
582
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
570
583
|
:param pulumi.Input[int] account_id: Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
|
@@ -701,6 +714,7 @@ class NotificationChannel(pulumi.CustomResource):
|
|
701
714
|
),
|
702
715
|
newrelic.NotificationChannelPropertyArgs(
|
703
716
|
key="service",
|
717
|
+
label="Service Name",
|
704
718
|
value="PTQK3FM",
|
705
719
|
),
|
706
720
|
newrelic.NotificationChannelPropertyArgs(
|
@@ -868,6 +882,18 @@ class NotificationChannel(pulumi.CustomResource):
|
|
868
882
|
|
869
883
|
> **NOTE:** `AlertChannel` are legacy resources.
|
870
884
|
|
885
|
+
## Import
|
886
|
+
|
887
|
+
Channels can only be used by a single workflow, therefore importing them is not particularly useful, because in the UI channels are created upon workflow creation.
|
888
|
+
|
889
|
+
Additionally, the channel id isn't available via the UI, and you'd need to look it up with the `channels` query in the NerdGraph API.
|
890
|
+
|
891
|
+
That being said, importing is possible using -
|
892
|
+
|
893
|
+
```sh
|
894
|
+
$ pulumi import newrelic:index/notificationChannel:NotificationChannel foo <destination_id>
|
895
|
+
```
|
896
|
+
|
871
897
|
:param str resource_name: The name of the resource.
|
872
898
|
:param NotificationChannelArgs args: The arguments to use to populate this resource's properties.
|
873
899
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
@@ -301,7 +301,76 @@ class NotificationDestination(pulumi.CustomResource):
|
|
301
301
|
type: Optional[pulumi.Input[str]] = None,
|
302
302
|
__props__=None):
|
303
303
|
"""
|
304
|
-
|
304
|
+
## Import
|
305
|
+
|
306
|
+
Destination id can be found in the Destinations page -> three dots at the right of the chosen destination -> copy destination id to clipboard.
|
307
|
+
|
308
|
+
This example is especially useful for slack destinations which *must* be imported.
|
309
|
+
|
310
|
+
1. Add an empty resource to your terraform file:
|
311
|
+
|
312
|
+
terraform
|
313
|
+
|
314
|
+
resource "newrelic_notification_destination" "foo" {
|
315
|
+
|
316
|
+
}
|
317
|
+
|
318
|
+
```sh
|
319
|
+
$ pulumi import newrelic:index/notificationDestination:NotificationDestination
|
320
|
+
|
321
|
+
Run import command: `newrelic_notification_destination.foo <destination_id>`
|
322
|
+
```
|
323
|
+
|
324
|
+
3. Run the following command after the import successfully done and copy the information to your resource:
|
325
|
+
|
326
|
+
`terraform state show newrelic_notification_destination.foo`
|
327
|
+
|
328
|
+
4. Add `ignore_changes` attribute on `auth_token` in your imported resource:
|
329
|
+
|
330
|
+
terraform
|
331
|
+
|
332
|
+
lifecycle {
|
333
|
+
|
334
|
+
ignore_changes = [auth_token]
|
335
|
+
|
336
|
+
}
|
337
|
+
|
338
|
+
Your imported destination should look like that:
|
339
|
+
|
340
|
+
terraform
|
341
|
+
|
342
|
+
resource "newrelic_notification_destination" "foo" {
|
343
|
+
|
344
|
+
lifecycle {
|
345
|
+
|
346
|
+
ignore_changes = [auth_token]
|
347
|
+
|
348
|
+
}
|
349
|
+
|
350
|
+
name = "*********"
|
351
|
+
|
352
|
+
type = "SLACK"
|
353
|
+
|
354
|
+
auth_token {
|
355
|
+
|
356
|
+
prefix = "Bearer"
|
357
|
+
|
358
|
+
}
|
359
|
+
|
360
|
+
property {
|
361
|
+
|
362
|
+
key
|
363
|
+
|
364
|
+
= "teamName"
|
365
|
+
|
366
|
+
label = "Team Name"
|
367
|
+
|
368
|
+
value = "******"
|
369
|
+
|
370
|
+
}
|
371
|
+
|
372
|
+
}
|
373
|
+
|
305
374
|
:param str resource_name: The name of the resource.
|
306
375
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
307
376
|
:param pulumi.Input[int] account_id: Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
|
@@ -320,7 +389,76 @@ class NotificationDestination(pulumi.CustomResource):
|
|
320
389
|
args: NotificationDestinationArgs,
|
321
390
|
opts: Optional[pulumi.ResourceOptions] = None):
|
322
391
|
"""
|
323
|
-
|
392
|
+
## Import
|
393
|
+
|
394
|
+
Destination id can be found in the Destinations page -> three dots at the right of the chosen destination -> copy destination id to clipboard.
|
395
|
+
|
396
|
+
This example is especially useful for slack destinations which *must* be imported.
|
397
|
+
|
398
|
+
1. Add an empty resource to your terraform file:
|
399
|
+
|
400
|
+
terraform
|
401
|
+
|
402
|
+
resource "newrelic_notification_destination" "foo" {
|
403
|
+
|
404
|
+
}
|
405
|
+
|
406
|
+
```sh
|
407
|
+
$ pulumi import newrelic:index/notificationDestination:NotificationDestination
|
408
|
+
|
409
|
+
Run import command: `newrelic_notification_destination.foo <destination_id>`
|
410
|
+
```
|
411
|
+
|
412
|
+
3. Run the following command after the import successfully done and copy the information to your resource:
|
413
|
+
|
414
|
+
`terraform state show newrelic_notification_destination.foo`
|
415
|
+
|
416
|
+
4. Add `ignore_changes` attribute on `auth_token` in your imported resource:
|
417
|
+
|
418
|
+
terraform
|
419
|
+
|
420
|
+
lifecycle {
|
421
|
+
|
422
|
+
ignore_changes = [auth_token]
|
423
|
+
|
424
|
+
}
|
425
|
+
|
426
|
+
Your imported destination should look like that:
|
427
|
+
|
428
|
+
terraform
|
429
|
+
|
430
|
+
resource "newrelic_notification_destination" "foo" {
|
431
|
+
|
432
|
+
lifecycle {
|
433
|
+
|
434
|
+
ignore_changes = [auth_token]
|
435
|
+
|
436
|
+
}
|
437
|
+
|
438
|
+
name = "*********"
|
439
|
+
|
440
|
+
type = "SLACK"
|
441
|
+
|
442
|
+
auth_token {
|
443
|
+
|
444
|
+
prefix = "Bearer"
|
445
|
+
|
446
|
+
}
|
447
|
+
|
448
|
+
property {
|
449
|
+
|
450
|
+
key
|
451
|
+
|
452
|
+
= "teamName"
|
453
|
+
|
454
|
+
label = "Team Name"
|
455
|
+
|
456
|
+
value = "******"
|
457
|
+
|
458
|
+
}
|
459
|
+
|
460
|
+
}
|
461
|
+
|
324
462
|
:param str resource_name: The name of the resource.
|
325
463
|
:param NotificationDestinationArgs args: The arguments to use to populate this resource's properties.
|
326
464
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
@@ -1,11 +1,11 @@
|
|
1
|
-
pulumi_newrelic/__init__.py,sha256=
|
1
|
+
pulumi_newrelic/__init__.py,sha256=Ekxa_c_Z6YcPWbvb7FFvd3lBPGRctMTA9rQGGzd13Ts,11328
|
2
2
|
pulumi_newrelic/_inputs.py,sha256=IK3QSgzencxOTb3L-iSDvdaEvKORUTKYewvS8c5VeA8,476794
|
3
3
|
pulumi_newrelic/_utilities.py,sha256=b6gJn0IIeM1t6Q7EVjqw3yhuGyP-uENQhtL5yp7aHR8,9248
|
4
4
|
pulumi_newrelic/account_management.py,sha256=auMjKSSMQg57OSvOxBJ3MmN_E5z4LdwM4OAwm5AMD2k,8691
|
5
5
|
pulumi_newrelic/alert_channel.py,sha256=f0nLOEtmxakqQPeevuE9W4Sd0pch2RQnfP4sCWApI30,20890
|
6
6
|
pulumi_newrelic/alert_condition.py,sha256=X_2UfWFTWd7PJpmfRGSbgpX4eW1NmPoqtYNFfyR5U1o,45746
|
7
7
|
pulumi_newrelic/alert_muting_rule.py,sha256=nGTdLpOM2fk_wOEMWZLIZokEsMvnbJVH2Mm3Tu1qnHY,19077
|
8
|
-
pulumi_newrelic/alert_policy.py,sha256=
|
8
|
+
pulumi_newrelic/alert_policy.py,sha256=sBu7RkF3LVU2jSmtPHCluS3vzFbxxLV8VCtCtS3VYe4,26105
|
9
9
|
pulumi_newrelic/alert_policy_channel.py,sha256=-r72F1aLGwZcTFuTW68zz-pT497t7bojR_lpHOYJngI,15047
|
10
10
|
pulumi_newrelic/api_access_key.py,sha256=qxHUn8uyGbDNjxVa8Rf9PGKKe63iIlGR0SGD-2Dtdlg,22003
|
11
11
|
pulumi_newrelic/browser_application.py,sha256=pcN5YzkCDoHQFZImpDVQn875rou2vZb54Q9x2W6jles,20501
|
@@ -14,22 +14,24 @@ pulumi_newrelic/entity_tags.py,sha256=xFxM971c5_blXqlqvK5rsZzYZlDo_4iBIEitMxpn0T
|
|
14
14
|
pulumi_newrelic/events_to_metrics_rule.py,sha256=NGNxYo4jxww9nXRSwlvqL1B-WdJHGWa64Xa_xcEccro,15888
|
15
15
|
pulumi_newrelic/get_account.py,sha256=9UzKNb5Jjy97owe2HwcNx-fsUxPEel_V3anKifTC5Vo,4651
|
16
16
|
pulumi_newrelic/get_alert_channel.py,sha256=8fbAqBFL5BEXRWqTEf1RjfMnF_faYb59-ZiSf0R4-wk,5416
|
17
|
-
pulumi_newrelic/get_alert_policy.py,sha256=
|
17
|
+
pulumi_newrelic/get_alert_policy.py,sha256=bXG0H6FGgPJOlSif9jcX3C281YSH7RdQLUMMeTzDhks,5795
|
18
18
|
pulumi_newrelic/get_application.py,sha256=5ABKpvWzERwjIEsWwQDpeP3ZJba4shmYuyiNxKvHpnc,5312
|
19
19
|
pulumi_newrelic/get_authentication_domain.py,sha256=UmJnleWQupH_STEvT9v4rRQoS3xnACPkuauPlzmCdkY,3586
|
20
20
|
pulumi_newrelic/get_cloud_account.py,sha256=8yAYziHYdHd1wIfNggdgI_wLq39amS3_f4eW-a-_hMY,5187
|
21
21
|
pulumi_newrelic/get_entity.py,sha256=RNG2amzCxUcwWs3uBRyZL-je70lTzuwO-dpOqk9bpiU,10853
|
22
|
+
pulumi_newrelic/get_group.py,sha256=p50E6SFqYdF4O7QeK5z0mqs1e06MYba2p-0BSHta89A,5663
|
22
23
|
pulumi_newrelic/get_key_transaction.py,sha256=QOLqA1EZ4G6BxVQCSZt94rf0M9iJJwGwvW3ioSX71Y0,4081
|
23
24
|
pulumi_newrelic/get_notification_destination.py,sha256=x13_HISLPz42t8MnE9QGf1QEhhc_WfDN3OE4Cx1wB8Q,6365
|
24
25
|
pulumi_newrelic/get_obfuscation_expression.py,sha256=UUhLN7g-VnQ9ASzFt8M4-GE4EpWawIfoug8DJW0Mb_U,4867
|
25
26
|
pulumi_newrelic/get_service_level_alert_helper.py,sha256=yOxb_74lGurxVmmMlVhR6qGy5chm2wkvpwW2eUDmipo,20140
|
26
27
|
pulumi_newrelic/get_test_grok_pattern.py,sha256=Mxo8j32CyD6W_lGwk3BF_NnUA1mi9gfe9voa947HbtU,5504
|
27
|
-
pulumi_newrelic/get_user.py,sha256=
|
28
|
+
pulumi_newrelic/get_user.py,sha256=QxI7LiKvkiBOc-Ovj3ySFzD1l2SrGO1Y7-xnrGhfP3A,7284
|
29
|
+
pulumi_newrelic/group.py,sha256=Moi1VJ82NTlIj0u25FEfnxTuNatpbTiC89GrUuCSbSY,21045
|
28
30
|
pulumi_newrelic/infra_alert_condition.py,sha256=T2cW_J8mqiIReV9YNQT3KbNSU8_5GGvPrvpMzWiFYLU,56742
|
29
31
|
pulumi_newrelic/log_parsing_rule.py,sha256=nlGKJssQ3d6gjNG1LJZjdYxfbidGHdy7bRbTqw-LKsY,22270
|
30
32
|
pulumi_newrelic/monitor_downtime.py,sha256=qFGiikR2TMyGDjHn5t6vs9TKUz8Sdksd26rUKpvsUEE,45214
|
31
|
-
pulumi_newrelic/notification_channel.py,sha256=
|
32
|
-
pulumi_newrelic/notification_destination.py,sha256=
|
33
|
+
pulumi_newrelic/notification_channel.py,sha256=Jb08kGYDUSVSlao2mG8HYAOexEs-xbYxKJGC6Chj7jw,45108
|
34
|
+
pulumi_newrelic/notification_destination.py,sha256=4rdVen05b3UNVWkoRzSAelSSR9EWJtYlg6r9vl_U99A,28367
|
33
35
|
pulumi_newrelic/nrql_alert_condition.py,sha256=HrmjCKrj21H2l0StdxlE0-OHGdSCUPIOdkYUXUDUtbQ,105561
|
34
36
|
pulumi_newrelic/nrql_drop_rule.py,sha256=uOY6vN0Fqufl13vAUGHikXJLhKLeIRUYb-PB4vkh6nI,15726
|
35
37
|
pulumi_newrelic/obfuscation_expression.py,sha256=Ug-pkNbylLLndFS-qEgt2ohs-s0YMY7fqhvqxx6p1to,12291
|
@@ -81,7 +83,7 @@ pulumi_newrelic/synthetics/private_location.py,sha256=x2Ji28435eqLVwZY9tXLN4QV08
|
|
81
83
|
pulumi_newrelic/synthetics/script_monitor.py,sha256=4OQteFH88JhQnTC6j9GwBhXO-DYWarjGkkqX0WIEPeE,54582
|
82
84
|
pulumi_newrelic/synthetics/secure_credential.py,sha256=O5SFzx3UNw64KjxCRzxatsXoPjT_e6VyJ32JTa0f0Dw,15604
|
83
85
|
pulumi_newrelic/synthetics/step_monitor.py,sha256=SykPSAJYHcqMD9dNXSXx2cTpsKmF3cy6ObXNRqb2CTQ,35141
|
84
|
-
pulumi_newrelic-5.
|
85
|
-
pulumi_newrelic-5.
|
86
|
-
pulumi_newrelic-5.
|
87
|
-
pulumi_newrelic-5.
|
86
|
+
pulumi_newrelic-5.20.0.dist-info/METADATA,sha256=ZsUxsYnIKCllb5_CsHYdticIyFw3bE7WVsOeRXIbwjw,3889
|
87
|
+
pulumi_newrelic-5.20.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
88
|
+
pulumi_newrelic-5.20.0.dist-info/top_level.txt,sha256=BjE1Wsu6Ah_A7k08uV5vRSZ2R_5uY3wFvSWJaa7ZoQk,16
|
89
|
+
pulumi_newrelic-5.20.0.dist-info/RECORD,,
|
File without changes
|
{pulumi_newrelic-5.19.0a1708333884.dist-info → pulumi_newrelic-5.20.0.dist-info}/top_level.txt
RENAMED
File without changes
|