Skip to content

Commit fee83cc

Browse files
committed
upgrade sdk to 42 and fix build
1 parent 5e53ba6 commit fee83cc

File tree

161 files changed

+23849
-4883
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+23849
-4883
lines changed

azurerm/internal/services/sentinel/client/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package client
22

33
import (
4-
"github.com/Azure/azure-sdk-for-go/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight"
4+
"github.com/Azure/azure-sdk-for-go/services/preview/securityinsight/mgmt/2019-01-01-preview/securityinsight"
55
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/common"
66
)
77

azurerm/internal/services/sentinel/data_source_sentinel_alert_rule.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func dataSourceArmSentinelAlertRuleRead(d *schema.ResourceData, meta interface{}
4848
return err
4949
}
5050

51-
resp, err := client.Get(ctx, workspaceID.ResourceGroup, workspaceID.Name, name)
51+
resp, err := client.Get(ctx, workspaceID.ResourceGroup, "Microsoft.OperationalInsights", workspaceID.Name, name)
5252
if err != nil {
5353
if utils.ResponseWasNotFound(resp.Response) {
5454
return fmt.Errorf("Sentinel Alert Rule %q (Resource Group %q / Workspace: %q) was not found", name, workspaceID.ResourceGroup, workspaceID.Name)

azurerm/internal/services/sentinel/resource_arm_sentinel_alert_rule_ms_security_incident.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"time"
77

8-
"github.com/Azure/azure-sdk-for-go/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight"
8+
"github.com/Azure/azure-sdk-for-go/services/preview/securityinsight/mgmt/2019-01-01-preview/securityinsight"
99
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
1010
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
1111
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf"
@@ -122,7 +122,7 @@ func resourceArmSentinelAlertRuleMsSecurityIncidentCreateUpdate(d *schema.Resour
122122
}
123123

124124
if d.IsNewResource() {
125-
resp, err := client.Get(ctx, workspaceID.ResourceGroup, workspaceID.Name, name)
125+
resp, err := client.Get(ctx, workspaceID.ResourceGroup, "Microsoft.OperationalInsights", workspaceID.Name, name)
126126
if err != nil {
127127
if !utils.ResponseWasNotFound(resp.Response) {
128128
return fmt.Errorf("checking for existing Sentinel Alert Rule Ms Security Incident %q (Resource Group %q): %+v", name, workspaceID.ResourceGroup, err)
@@ -152,7 +152,7 @@ func resourceArmSentinelAlertRuleMsSecurityIncidentCreateUpdate(d *schema.Resour
152152

153153
// Service avoid concurrent update of this resource via checking the "etag" to guarantee it is the same value as last Read.
154154
if !d.IsNewResource() {
155-
resp, err := client.Get(ctx, workspaceID.ResourceGroup, workspaceID.Name, name)
155+
resp, err := client.Get(ctx, workspaceID.ResourceGroup, "Microsoft.OperationalInsights", workspaceID.Name, name)
156156
if err != nil {
157157
return fmt.Errorf("retrieving Sentinel Alert Rule Ms Security Incident %q (Resource Group %q / Workspace: %q): %+v", name, workspaceID.ResourceGroup, workspaceID.Name, err)
158158
}
@@ -163,11 +163,11 @@ func resourceArmSentinelAlertRuleMsSecurityIncidentCreateUpdate(d *schema.Resour
163163
param.Etag = resp.Value.(securityinsight.MicrosoftSecurityIncidentCreationAlertRule).Etag
164164
}
165165

166-
if _, err := client.CreateOrUpdate(ctx, workspaceID.ResourceGroup, workspaceID.Name, name, param); err != nil {
166+
if _, err := client.CreateOrUpdate(ctx, workspaceID.ResourceGroup, "Microsoft.OperationalInsights", workspaceID.Name, name, param); err != nil {
167167
return fmt.Errorf("creating Sentinel Alert Rule Ms Security Incident %q (Resource Group %q / Workspace: %q): %+v", name, workspaceID.ResourceGroup, workspaceID.Name, err)
168168
}
169169

170-
resp, err := client.Get(ctx, workspaceID.ResourceGroup, workspaceID.Name, name)
170+
resp, err := client.Get(ctx, workspaceID.ResourceGroup, "Microsoft.OperationalInsights", workspaceID.Name, name)
171171
if err != nil {
172172
return fmt.Errorf("retrieving Sentinel Alert Rule Ms Security Incident %q (Resource Group %q / Workspace: %q): %+v", name, workspaceID.ResourceGroup, workspaceID.Name, err)
173173
}
@@ -191,7 +191,7 @@ func resourceArmSentinelAlertRuleMsSecurityIncidentRead(d *schema.ResourceData,
191191
return err
192192
}
193193

194-
resp, err := client.Get(ctx, id.ResourceGroup, id.Workspace, id.Name)
194+
resp, err := client.Get(ctx, id.ResourceGroup, "Microsoft.OperationalInsights", id.Workspace, id.Name)
195195
if err != nil {
196196
if utils.ResponseWasNotFound(resp.Response) {
197197
log.Printf("[DEBUG] Sentinel Alert Rule Ms Security Incident %q was not found in Workspace: %q in Resource Group %q - removing from state!", id.Name, id.Workspace, id.ResourceGroup)
@@ -241,7 +241,7 @@ func resourceArmSentinelAlertRuleMsSecurityIncidentDelete(d *schema.ResourceData
241241
return err
242242
}
243243

244-
if _, err := client.Delete(ctx, id.ResourceGroup, id.Workspace, id.Name); err != nil {
244+
if _, err := client.Delete(ctx, id.ResourceGroup, "Microsoft.OperationalInsights", id.Workspace, id.Name); err != nil {
245245
return fmt.Errorf("deleting Sentinel Alert Rule Ms Security Incident %q (Resource Group %q / Workspace: %q): %+v", id.Name, id.ResourceGroup, id.Workspace, err)
246246
}
247247

azurerm/internal/services/sentinel/resource_arm_sentinel_alert_rule_scheduled.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"time"
77

8-
"github.com/Azure/azure-sdk-for-go/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight"
8+
"github.com/Azure/azure-sdk-for-go/services/preview/securityinsight/mgmt/2019-01-01-preview/securityinsight"
99
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
1010
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
1111
"github.com/rickb777/date/period"
@@ -171,7 +171,7 @@ func resourceArmSentinelAlertRuleScheduledCreateUpdate(d *schema.ResourceData, m
171171
}
172172

173173
if d.IsNewResource() {
174-
resp, err := client.Get(ctx, workspaceID.ResourceGroup, workspaceID.Name, name)
174+
resp, err := client.Get(ctx, workspaceID.ResourceGroup, "Microsoft.OperationalInsights", workspaceID.Name, name)
175175
if err != nil {
176176
if !utils.ResponseWasNotFound(resp.Response) {
177177
return fmt.Errorf("checking for existing Sentinel Alert Rule Scheduled %q (Resource Group %q / Workspace %q): %+v", name, workspaceID.ResourceGroup, workspaceID.Name, err)
@@ -226,7 +226,7 @@ func resourceArmSentinelAlertRuleScheduledCreateUpdate(d *schema.ResourceData, m
226226

227227
// Service avoid concurrent update of this resource via checking the "etag" to guarantee it is the same value as last Read.
228228
if !d.IsNewResource() {
229-
resp, err := client.Get(ctx, workspaceID.ResourceGroup, workspaceID.Name, name)
229+
resp, err := client.Get(ctx, workspaceID.ResourceGroup, "Microsoft.OperationalInsights", workspaceID.Name, name)
230230
if err != nil {
231231
return fmt.Errorf("retrieving Sentinel Alert Rule Scheduled %q (Resource Group %q / Workspace %q): %+v", name, workspaceID.ResourceGroup, workspaceID.Name, err)
232232
}
@@ -237,11 +237,11 @@ func resourceArmSentinelAlertRuleScheduledCreateUpdate(d *schema.ResourceData, m
237237
param.Etag = resp.Value.(securityinsight.ScheduledAlertRule).Etag
238238
}
239239

240-
if _, err := client.CreateOrUpdate(ctx, workspaceID.ResourceGroup, workspaceID.Name, name, param); err != nil {
240+
if _, err := client.CreateOrUpdate(ctx, workspaceID.ResourceGroup, "Microsoft.OperationalInsights", workspaceID.Name, name, param); err != nil {
241241
return fmt.Errorf("creating Sentinel Alert Rule Scheduled %q (Resource Group %q / Workspace %q): %+v", name, workspaceID.ResourceGroup, workspaceID.Name, err)
242242
}
243243

244-
resp, err := client.Get(ctx, workspaceID.ResourceGroup, workspaceID.Name, name)
244+
resp, err := client.Get(ctx, workspaceID.ResourceGroup, "Microsoft.OperationalInsights", workspaceID.Name, name)
245245
if err != nil {
246246
return fmt.Errorf("retrieving Sentinel Alert Rule Scheduled %q (Resource Group %q / Workspace %q): %+v", name, workspaceID.ResourceGroup, workspaceID.Name, err)
247247
}
@@ -266,7 +266,7 @@ func resourceArmSentinelAlertRuleScheduledRead(d *schema.ResourceData, meta inte
266266
return err
267267
}
268268

269-
resp, err := client.Get(ctx, id.ResourceGroup, id.Workspace, id.Name)
269+
resp, err := client.Get(ctx, id.ResourceGroup, "Microsoft.OperationalInsights", id.Workspace, id.Name)
270270
if err != nil {
271271
if utils.ResponseWasNotFound(resp.Response) {
272272
log.Printf("[DEBUG] Sentinel Alert Rule Scheduled %q was not found in Workspace %q in Resource Group %q - removing from state!", id.Name, id.Workspace, id.ResourceGroup)
@@ -326,7 +326,7 @@ func resourceArmSentinelAlertRuleScheduledDelete(d *schema.ResourceData, meta in
326326
return err
327327
}
328328

329-
if _, err := client.Delete(ctx, id.ResourceGroup, id.Workspace, id.Name); err != nil {
329+
if _, err := client.Delete(ctx, id.ResourceGroup, "Microsoft.OperationalInsights", id.Workspace, id.Name); err != nil {
330330
return fmt.Errorf("deleting Sentinel Alert Rule Scheduled %q (Resource Group %q / Workspace %q): %+v", id.Name, id.ResourceGroup, id.Workspace, err)
331331
}
332332

azurerm/internal/services/sentinel/sentinel_alert_rule.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package sentinel
33
import (
44
"fmt"
55

6-
"github.com/Azure/azure-sdk-for-go/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight"
6+
"github.com/Azure/azure-sdk-for-go/services/preview/securityinsight/mgmt/2019-01-01-preview/securityinsight"
77
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
88
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients"
99
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/sentinel/parse"
@@ -37,7 +37,7 @@ func importSentinelAlertRule(expectKind securityinsight.AlertRuleKind) func(d *s
3737
ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d)
3838
defer cancel()
3939

40-
resp, err := client.Get(ctx, id.ResourceGroup, id.Workspace, id.Name)
40+
resp, err := client.Get(ctx, id.ResourceGroup, "Microsoft.OperationalInsights", id.Workspace, id.Name)
4141
if err != nil {
4242
return nil, fmt.Errorf("retrieving Sentinel Alert Rule %q (Resource Group %q / Workspace: %q): %+v", id.Name, id.ResourceGroup, id.Workspace, err)
4343
}

azurerm/internal/services/sentinel/tests/resource_arm_sentinel_alert_rule_ms_security_incident_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func testCheckAzureRMSentinelAlertRuleMsSecurityIncidentExists(resourceName stri
117117
return err
118118
}
119119

120-
if resp, err := client.Get(ctx, id.ResourceGroup, id.Workspace, id.Name); err != nil {
120+
if resp, err := client.Get(ctx, id.ResourceGroup, "Microsoft.OperationalInsights", id.Workspace, id.Name); err != nil {
121121
if utils.ResponseWasNotFound(resp.Response) {
122122
return fmt.Errorf("Sentinel Alert Rule Ms Security Incident %q (Resource Group %q / Workspace: %q) does not exist", id.Name, id.ResourceGroup, id.Workspace)
123123
}
@@ -142,7 +142,7 @@ func testCheckAzureRMSentinelAlertRuleMsSecurityIncidentDestroy(s *terraform.Sta
142142
return err
143143
}
144144

145-
if resp, err := client.Get(ctx, id.ResourceGroup, id.Workspace, id.Name); err != nil {
145+
if resp, err := client.Get(ctx, id.ResourceGroup, "Microsoft.OperationalInsights", id.Workspace, id.Name); err != nil {
146146
if !utils.ResponseWasNotFound(resp.Response) {
147147
return fmt.Errorf("Getting on Sentinel.AlertRules: %+v", err)
148148
}

azurerm/internal/services/sentinel/tests/resource_arm_sentinel_alert_rule_scheduled_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func testCheckAzureRMSentinelAlertRuleScheduledExists(resourceName string) resou
117117
return err
118118
}
119119

120-
if resp, err := client.Get(ctx, id.ResourceGroup, id.Workspace, id.Name); err != nil {
120+
if resp, err := client.Get(ctx, id.ResourceGroup, "Microsoft.OperationalInsights", id.Workspace, id.Name); err != nil {
121121
if utils.ResponseWasNotFound(resp.Response) {
122122
return fmt.Errorf("Sentinel Alert Rule Scheduled %q (Resource Group %q) does not exist", id.Name, id.ResourceGroup)
123123
}
@@ -142,7 +142,7 @@ func testCheckAzureRMSentinelAlertRuleScheduledDestroy(s *terraform.State) error
142142
return err
143143
}
144144

145-
if resp, err := client.Get(ctx, id.ResourceGroup, id.Workspace, id.Name); err != nil {
145+
if resp, err := client.Get(ctx, id.ResourceGroup, "Microsoft.OperationalInsights", id.Workspace, id.Name); err != nil {
146146
if !utils.ResponseWasNotFound(resp.Response) {
147147
return fmt.Errorf("Getting on Sentinel.AlertRules: %+v", err)
148148
}

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module github.com/terraform-providers/terraform-provider-azurerm
22

33
require (
4-
github.com/Azure/azure-sdk-for-go v41.2.0+incompatible
4+
github.com/Azure/azure-sdk-for-go v42.1.0+incompatible
55
github.com/Azure/go-autorest/autorest v0.10.0
66
github.com/Azure/go-autorest/autorest/date v0.2.0
77
github.com/btubbs/datetime v0.1.0
@@ -18,7 +18,7 @@ require (
1818
github.com/satori/go.uuid v1.2.0
1919
github.com/satori/uuid v0.0.0-20160927100844-b061729afc07
2020
github.com/sergi/go-diff v1.1.0
21-
github.com/terraform-providers/terraform-provider-azuread v0.8.0
21+
github.com/terraform-providers/terraform-provider-azuread v0.9.0
2222
github.com/tombuildsstuff/giovanni v0.10.0
2323
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413
2424
golang.org/x/net v0.0.0-20191009170851-d66e71096ffb

go.sum

+4-6
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7
1010
github.com/Azure/azure-sdk-for-go v21.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
1111
github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
1212
github.com/Azure/azure-sdk-for-go v35.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
13-
github.com/Azure/azure-sdk-for-go v40.3.0+incompatible h1:NthZg3psrLxvQLN6rVm07pZ9mv2wvGNaBNGQ3fnPvLE=
14-
github.com/Azure/azure-sdk-for-go v40.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
15-
github.com/Azure/azure-sdk-for-go v41.2.0+incompatible h1:JOlv1wDuxcJi1ExJpQLNfEj6znsTFt2TiwQMow2YaXI=
16-
github.com/Azure/azure-sdk-for-go v41.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
13+
github.com/Azure/azure-sdk-for-go v42.1.0+incompatible h1:ZNliGuvGKIHedRdz8W9BTMSrxBv9Nzz5BjeobotQTAI=
14+
github.com/Azure/azure-sdk-for-go v42.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
1715
github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
1816
github.com/Azure/go-autorest/autorest/adal v0.6.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
1917
github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
@@ -219,8 +217,8 @@ github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0
219217
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
220218
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
221219
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
222-
github.com/terraform-providers/terraform-provider-azuread v0.8.0 h1:ZcF5f+F3tFBK7N2T+OSjgFDpgLHYKfSWxhGRfUoPKUU=
223-
github.com/terraform-providers/terraform-provider-azuread v0.8.0/go.mod h1:7RxccROJFJZmxJpmbRTHA+mn6U/s7UnVeEbOHLX6CQU=
220+
github.com/terraform-providers/terraform-provider-azuread v0.9.0 h1:XLzFgVHakq6qjJ2L0o/tN2yHu/hT4vIW9sKtejr7gPs=
221+
github.com/terraform-providers/terraform-provider-azuread v0.9.0/go.mod h1:sSDzB/8CD639+yWo5lZf+NJvGSYQBSS6z+GoET9IrzE=
224222
github.com/tombuildsstuff/giovanni v0.10.0 h1:XqZBPVD2hETa30FFdMz/zVfnidMnUrIMMmKIH7hWnWA=
225223
github.com/tombuildsstuff/giovanni v0.10.0/go.mod h1:WwPhFP2+WnhJzvPYDnsyBab2wOIksMX6xm+Tg+jVvKw=
226224
github.com/tombuildsstuff/go-autorest v14.0.1-0.20200416184303-d4e299a3c04a+incompatible h1:9645FYqYopS+TFknygW7EC9PCbIC5T4WvWUpktyE2JA=

vendor/github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2017-08-01/analysisservices/version.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-12-01/apimanagement/version.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/Azure/azure-sdk-for-go/services/appconfiguration/mgmt/2019-10-01/appconfiguration/version.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/version.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/version.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2019-08-01/batch/version.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2019-04-15/cdn/version.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/version.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)