Skip to content

Commit ab4e946

Browse files
authored
INTMDB-5: added parameter team name for alert configurations (#648)
* added parameter team name for alert configurations resource and datasource * chore: updated vendor
1 parent 1439182 commit ab4e946

File tree

6 files changed

+14
-1
lines changed

6 files changed

+14
-1
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ require (
1212
github.com/mwielbut/pointy v1.1.0
1313
github.com/spf13/cast v1.4.1
1414
github.com/terraform-providers/terraform-provider-aws v1.60.1-0.20210625132053-af2d5c0ad54f
15-
go.mongodb.org/atlas v0.14.1-0.20211130093552-cb00594ec51e
15+
go.mongodb.org/atlas v0.14.1-0.20220104180936-6afea6036494
1616
go.mongodb.org/realm v0.1.0
1717
)

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,8 @@ go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsX
12111211
go.mongodb.org/atlas v0.12.0/go.mod h1:wVCnHcm/7/IfTjEB6K8K35PLG70yGz8BdkRwX0oK9/M=
12121212
go.mongodb.org/atlas v0.14.1-0.20211130093552-cb00594ec51e h1:kYgaXVVngAzJFFXYrwL1x+73Y7zrJ37KQw/1huAOWJY=
12131213
go.mongodb.org/atlas v0.14.1-0.20211130093552-cb00594ec51e/go.mod h1:lQhRHIxc6jQHEK3/q9WLu/SdBkPj2fQYhjLGUF6Z3U8=
1214+
go.mongodb.org/atlas v0.14.1-0.20220104180936-6afea6036494 h1:nRJ7gjh1nNLKdQ1cCgppSoYZl1rAhwrLOzv4tNHYrQc=
1215+
go.mongodb.org/atlas v0.14.1-0.20220104180936-6afea6036494/go.mod h1:lQhRHIxc6jQHEK3/q9WLu/SdBkPj2fQYhjLGUF6Z3U8=
12141216
go.mongodb.org/realm v0.1.0 h1:zJiXyLaZrznQ+Pz947ziSrDKUep39DO4SfA0Fzx8M4M=
12151217
go.mongodb.org/realm v0.1.0/go.mod h1:4Vj6iy+Puo1TDERcoh4XZ+pjtwbOzPpzqy3Cwe8ZmDM=
12161218
go.mozilla.org/mozlog v0.0.0-20170222151521-4bb13139d403/go.mod h1:jHoPAGnDrCy6kaI2tAze5Prf0Nr0w/oNkROt2lw3n3o=

mongodbatlas/data_source_mongodbatlas_alert_configuration.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ func dataSourceMongoDBAtlasAlertConfiguration() *schema.Resource {
198198
Type: schema.TypeString,
199199
Computed: true,
200200
},
201+
"team_name": {
202+
Type: schema.TypeString,
203+
Computed: true,
204+
},
201205
"type_name": {
202206
Type: schema.TypeString,
203207
Computed: true,

mongodbatlas/resource_mongodbatlas_alert_configuration.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ func resourceMongoDBAtlasAlertConfiguration() *schema.Resource {
270270
Type: schema.TypeString,
271271
Optional: true,
272272
},
273+
"team_name": {
274+
Type: schema.TypeString,
275+
Computed: true,
276+
},
273277
"type_name": {
274278
Type: schema.TypeString,
275279
Optional: true,
@@ -748,6 +752,7 @@ func flattenAlertConfigurationNotifications(notifications []matlas.Notification)
748752
"service_key": notifications[i].ServiceKey,
749753
"sms_enabled": notifications[i].SMSEnabled,
750754
"team_id": notifications[i].TeamID,
755+
"team_name": notifications[i].TeamName,
751756
"type_name": notifications[i].TypeName,
752757
"username": notifications[i].Username,
753758
"victor_ops_api_key": notifications[i].VictorOpsAPIKey,

website/docs/d/alert_configuration.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ Notifications to send when an alert condition is detected.
221221
* `service_key` - PagerDuty service key. Required for the PAGER_DUTY notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key.
222222
* `sms_enabled` - Flag indicating if text message notifications should be sent. Configurable for `ORG`, `GROUP`, and `USER` notifications types.
223223
* `team_id` - Unique identifier of a team.
224+
* `team_name` - Label for the team that receives this notification.
224225
* `type_name` - Type of alert notification.
225226
Accepted values are:
226227
- `DATADOG`

website/docs/r/alert_configuration.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ List of notifications to send when an alert condition is detected.
244244
* `service_key` - PagerDuty service key. Required for the PAGER_DUTY notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key.
245245
* `sms_enabled` - Flag indicating if text message notifications should be sent. Configurable for `ORG`, `GROUP`, and `USER` notifications types.
246246
* `team_id` - Unique identifier of a team.
247+
* `team_name` - Label for the team that receives this notification.
247248
* `type_name` - Type of alert notification.
248249
Accepted values are:
249250
- `DATADOG`

0 commit comments

Comments
 (0)