diff --git a/api/api.go b/api/api.go index 03118787..39e9d282 100644 --- a/api/api.go +++ b/api/api.go @@ -7,7 +7,7 @@ import ( "context" "time" - "github.com/Azure/azure-sdk-for-go/services/authorization/mgmt/2020-10-01/authorization" + "github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-09-01-preview/authorization" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" ) diff --git a/api/application_msgraph.go b/api/application_msgraph.go index c26c78c9..a06fea37 100644 --- a/api/application_msgraph.go +++ b/api/application_msgraph.go @@ -10,7 +10,7 @@ import ( "net/url" "time" - "github.com/Azure/azure-sdk-for-go/services/authorization/mgmt/2020-10-01/authorization" + "github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-09-01-preview/authorization" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/date" diff --git a/client.go b/client.go index ae43e315..3009e6a5 100644 --- a/client.go +++ b/client.go @@ -13,7 +13,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/authorization/mgmt/2020-10-01/authorization" + "github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-09-01-preview/authorization" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/to" @@ -175,7 +175,7 @@ func (c *client) assignRoles(ctx context.Context, spID string, roles []*AzureRol } ra, err := c.provider.CreateRoleAssignment(ctx, role.Scope, assignmentIDs[i], authorization.RoleAssignmentCreateParameters{ - Properties: &authorization.RoleAssignmentProperties{ + RoleAssignmentProperties: &authorization.RoleAssignmentProperties{ RoleDefinitionID: &role.RoleID, PrincipalID: &spID, }, diff --git a/mock_provider_test.go b/mock_provider_test.go index 3ec295f5..478b06a9 100644 --- a/mock_provider_test.go +++ b/mock_provider_test.go @@ -9,7 +9,7 @@ import ( reflect "reflect" time "time" - authorization "github.com/Azure/azure-sdk-for-go/services/authorization/mgmt/2020-10-01/authorization" + authorization "github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-09-01-preview/authorization" gomock "github.com/golang/mock/gomock" api "github.com/hashicorp/vault-plugin-secrets-azure/api" ) diff --git a/path_roles.go b/path_roles.go index 5cf791bb..edcc97da 100644 --- a/path_roles.go +++ b/path_roles.go @@ -10,7 +10,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/authorization/mgmt/2020-10-01/authorization" + "github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-09-01-preview/authorization" "github.com/Azure/go-autorest/autorest/to" "github.com/hashicorp/vault-plugin-secrets-azure/api" "github.com/hashicorp/vault/sdk/framework" diff --git a/path_service_principal_test.go b/path_service_principal_test.go index a432baa7..b743d3b4 100644 --- a/path_service_principal_test.go +++ b/path_service_principal_test.go @@ -777,7 +777,7 @@ func TestRoleAssignmentWALRollback(t *testing.T) { roleDefs, err := provider.ListRoleDefinitions(context.Background(), fmt.Sprintf("subscriptions/%s", subscriptionID), "") assertErrorIsNil(t, err) - defID := *ra.Properties.RoleDefinitionID + defID := *ra.RoleAssignmentPropertiesWithScope.RoleDefinitionID found := false for _, def := range roleDefs { if *def.ID == defID && *def.RoleName == "Storage Blob Data Owner" { @@ -992,7 +992,7 @@ func TestCredentialInteg_msgraph(t *testing.T) { roleDefs, err := provider.ListRoleDefinitions(context.Background(), fmt.Sprintf("subscriptions/%s", subscriptionID), "") assertErrorIsNil(t, err) - defID := *ra.Properties.RoleDefinitionID + defID := *ra.RoleAssignmentPropertiesWithScope.RoleDefinitionID found := false for _, def := range roleDefs { if *def.ID == defID && *def.RoleName == "Storage Blob Data Owner" { diff --git a/provider.go b/provider.go index 56092e06..1ff3db2b 100644 --- a/provider.go +++ b/provider.go @@ -7,7 +7,7 @@ import ( "context" "time" - "github.com/Azure/azure-sdk-for-go/services/authorization/mgmt/2020-10-01/authorization" + "github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-09-01-preview/authorization" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure/auth" "github.com/hashicorp/vault-plugin-secrets-azure/api" diff --git a/provider_mock_test.go b/provider_mock_test.go index 35eb6423..ef5cc7ef 100644 --- a/provider_mock_test.go +++ b/provider_mock_test.go @@ -12,7 +12,7 @@ import ( "sync" "time" - "github.com/Azure/azure-sdk-for-go/services/authorization/mgmt/2020-10-01/authorization" + "github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-09-01-preview/authorization" "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" "github.com/hashicorp/vault-plugin-secrets-azure/api"