Skip to content

Commit

Permalink
upgrade go sdk to 54.3 (#11813)
Browse files Browse the repository at this point in the history
  • Loading branch information
njuCZ authored May 24, 2021
1 parent fc9ab22 commit 238dd31
Show file tree
Hide file tree
Showing 10 changed files with 203 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func resourceArmRoleAssignmentCreate(d *schema.ResourceData, meta interface{}) e
name = uuid
}

existing, err := roleAssignmentsClient.Get(ctx, scope, name)
existing, err := roleAssignmentsClient.Get(ctx, scope, name, "")
if err != nil {
if !utils.ResponseWasNotFound(existing.Response) {
return fmt.Errorf("Error checking for presence of existing Role Assignment ID for %q (Scope %q): %+v", name, scope, err)
Expand Down Expand Up @@ -203,7 +203,7 @@ func resourceArmRoleAssignmentCreate(d *schema.ResourceData, meta interface{}) e
return err
}

read, err := roleAssignmentsClient.Get(ctx, scope, name)
read, err := roleAssignmentsClient.Get(ctx, scope, name, "")
if err != nil {
return err
}
Expand All @@ -221,7 +221,7 @@ func resourceArmRoleAssignmentRead(d *schema.ResourceData, meta interface{}) err
ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d)
defer cancel()

resp, err := client.GetByID(ctx, d.Id())
resp, err := client.GetByID(ctx, d.Id(), "")
if err != nil {
if utils.ResponseWasNotFound(resp.Response) {
log.Printf("[DEBUG] Role Assignment ID %q was not found - removing from state", d.Id())
Expand Down Expand Up @@ -269,7 +269,7 @@ func resourceArmRoleAssignmentDelete(d *schema.ResourceData, meta interface{}) e
return err
}

resp, err := client.Delete(ctx, id.scope, id.name)
resp, err := client.Delete(ctx, id.scope, id.name, "")
if err != nil {
if !utils.ResponseWasNotFound(resp.Response) {
return err
Expand Down Expand Up @@ -343,7 +343,7 @@ func parseRoleAssignmentId(input string) (*roleAssignmentId, error) {

func roleAssignmentCreateStateRefreshFunc(ctx context.Context, client *authorization.RoleAssignmentsClient, roleID string) resource.StateRefreshFunc {
return func() (interface{}, string, error) {
resp, err := client.GetByID(ctx, roleID)
resp, err := client.GetByID(ctx, roleID, "")
if err != nil {
if utils.ResponseWasNotFound(resp.Response) {
return resp, "pending", nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func (r RoleAssignmentResource) Exists(ctx context.Context, client *clients.Clie
return nil, err
}

resp, err := client.Authorization.RoleAssignmentsClient.GetByID(ctx, state.ID)
resp, err := client.Authorization.RoleAssignmentsClient.GetByID(ctx, state.ID, "")
if err != nil {
if utils.ResponseWasNotFound(resp.Response) {
return utils.Bool(false), nil
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 v54.2.0+incompatible
github.com/Azure/azure-sdk-for-go v54.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/validation v0.3.1
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 v54.2.0+incompatible h1:LYKBbC9PubUJnrkLZttkPmtOPNEQDhtzTjw114FJKBQ=
github.com/Azure/azure-sdk-for-go v54.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v54.3.0+incompatible h1:aJ/WT32eVP8YmWpuSHLgnFJWjZzUFmhR3wBxxszo4PE=
github.com/Azure/azure-sdk-for-go v54.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

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

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

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

Loading

0 comments on commit 238dd31

Please sign in to comment.