Skip to content

Commit

Permalink
Merge pull request #12263 from magodo/update_go_sdk_55_3_0
Browse files Browse the repository at this point in the history
Update Go SDK to v55.3.0
  • Loading branch information
tombuildsstuff authored Jun 18, 2021
2 parents 89d0f87 + 2f75bab commit f36a701
Show file tree
Hide file tree
Showing 20 changed files with 3,334 additions and 1,781 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ func resourceSecurityCenterAutomation() *pluginsdk.Resource {
Type: pluginsdk.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{
string(security.Alerts),
string(security.Assessments),
string(security.SecureScoreControls),
string(security.SecureScores),
string(security.SubAssessments),
string(security.EventSourceAlerts),
string(security.EventSourceAssessments),
string(security.EventSourceSecureScoreControls),
string(security.EventSourceSecureScores),
string(security.EventSourceSubAssessments),
}, false),
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ func resourceServerVulnerabilityAssessment() *pluginsdk.Resource {
Timeouts: &pluginsdk.ResourceTimeout{
Create: pluginsdk.DefaultTimeout(5 * time.Minute),
Read: pluginsdk.DefaultTimeout(5 * time.Minute),
Update: pluginsdk.DefaultTimeout(5 * time.Minute),
Delete: pluginsdk.DefaultTimeout(5 * time.Minute),
Delete: pluginsdk.DefaultTimeout(10 * time.Minute),
},

Schema: map[string]*pluginsdk.Schema{
Expand Down Expand Up @@ -147,17 +146,14 @@ func resourceServerVulnerabilityAssessmentDelete(d *pluginsdk.ResourceData, meta
time.Sleep(time.Duration(retry) * time.Second)
}

response, err := client.Delete(ctx, targetId.ResourceGroup, targetId.Provider, targetId.ResourceType, targetId.Name)
future, err := client.Delete(ctx, targetId.ResourceGroup, targetId.Provider, targetId.ResourceType, targetId.Name)
if err != nil {
// https://github.com/Azure/azure-rest-api-specs/issues/12308 the API report error even if delete was successful
if utils.ResponseWasStatusCode(response, 202) {
return nil
} else {
return fmt.Errorf("removing Server Vulnerability Assessment for %q: %+v\n", targetId.Id, err)
}
} else {
return nil
return fmt.Errorf("deleting Server Vulnerability Assessment %s: %v", targetId.Id, err)
}
if err := future.WaitForCompletionRef(ctx, client.Client); err != nil {
return fmt.Errorf("waiting for deletion of Server Vulnerability Assessment %s: %v", targetId.Id, err)
}
return nil
}

type TargetId struct {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module github.com/terraform-providers/terraform-provider-azurerm

require (
github.com/Azure/azure-sdk-for-go v55.2.0+incompatible
github.com/Azure/azure-sdk-for-go v55.3.0+incompatible
github.com/Azure/go-autorest/autorest v0.11.18
github.com/Azure/go-autorest/autorest/date v0.3.0
github.com/Azure/go-autorest/autorest/to v0.4.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ github.com/Azure/azure-sdk-for-go v42.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9mo
github.com/Azure/azure-sdk-for-go v45.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v47.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v51.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v55.2.0+incompatible h1:TL2/vJWJEPOrmv97nHcbvjXES0Ntlb9P95hqGA1J2dU=
github.com/Azure/azure-sdk-for-go v55.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v55.3.0+incompatible h1:rLKCdFMMCAXt/QZ96skZJUArYS3UDo9Qm1ZWzoDtC9E=
github.com/Azure/azure-sdk-for-go v55.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs=
github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
Expand Down

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Loading

0 comments on commit f36a701

Please sign in to comment.