@@ -737,32 +737,44 @@ func flattenAlertConfigurationNotifications(d *schema.ResourceData, notification
737
737
return nil
738
738
}
739
739
740
+ if len (notificationsSchema ) > 0 {
741
+ for i := range notificationsSchema {
742
+ notifications [i ].APIToken = notificationsSchema [i ].APIToken
743
+ notifications [i ].DatadogAPIKey = notificationsSchema [i ].DatadogAPIKey
744
+ notifications [i ].FlowdockAPIToken = notificationsSchema [i ].FlowdockAPIToken
745
+ notifications [i ].OpsGenieAPIKey = notificationsSchema [i ].OpsGenieAPIKey
746
+ notifications [i ].ServiceKey = notificationsSchema [i ].ServiceKey
747
+ notifications [i ].VictorOpsAPIKey = notificationsSchema [i ].VictorOpsAPIKey
748
+ notifications [i ].VictorOpsRoutingKey = notificationsSchema [i ].VictorOpsRoutingKey
749
+ }
750
+ }
751
+
740
752
nts := make ([]map [string ]interface {}, len (notifications ))
741
753
742
754
for i := range notifications {
743
755
nts [i ] = map [string ]interface {}{
744
- "api_token" : notificationsSchema [i ].APIToken ,
756
+ "api_token" : notifications [i ].APIToken ,
745
757
"channel_name" : notifications [i ].ChannelName ,
746
- "datadog_api_key" : notificationsSchema [i ].DatadogAPIKey ,
758
+ "datadog_api_key" : notifications [i ].DatadogAPIKey ,
747
759
"datadog_region" : notifications [i ].DatadogRegion ,
748
760
"delay_min" : notifications [i ].DelayMin ,
749
761
"email_address" : notifications [i ].EmailAddress ,
750
762
"email_enabled" : notifications [i ].EmailEnabled ,
751
- "flowdock_api_token" : notificationsSchema [i ].FlowdockAPIToken ,
763
+ "flowdock_api_token" : notifications [i ].FlowdockAPIToken ,
752
764
"flow_name" : notifications [i ].FlowName ,
753
765
"interval_min" : notifications [i ].IntervalMin ,
754
766
"mobile_number" : notifications [i ].MobileNumber ,
755
- "ops_genie_api_key" : notificationsSchema [i ].OpsGenieAPIKey ,
767
+ "ops_genie_api_key" : notifications [i ].OpsGenieAPIKey ,
756
768
"ops_genie_region" : notifications [i ].OpsGenieRegion ,
757
769
"org_name" : notifications [i ].OrgName ,
758
- "service_key" : notificationsSchema [i ].ServiceKey ,
770
+ "service_key" : notifications [i ].ServiceKey ,
759
771
"sms_enabled" : notifications [i ].SMSEnabled ,
760
772
"team_id" : notifications [i ].TeamID ,
761
773
"team_name" : notifications [i ].TeamName ,
762
774
"type_name" : notifications [i ].TypeName ,
763
775
"username" : notifications [i ].Username ,
764
- "victor_ops_api_key" : notificationsSchema [i ].VictorOpsAPIKey ,
765
- "victor_ops_routing_key" : notificationsSchema [i ].VictorOpsRoutingKey ,
776
+ "victor_ops_api_key" : notifications [i ].VictorOpsAPIKey ,
777
+ "victor_ops_routing_key" : notifications [i ].VictorOpsRoutingKey ,
766
778
"microsoft_teams_webhook_url" : notifications [i ].MicrosoftTeamsWebhookURL ,
767
779
"webhook_secret" : notifications [i ].WebhookSecret ,
768
780
"webhook_url" : notifications [i ].WebhookURL ,
0 commit comments