diff --git a/go.mod b/go.mod index ef2ec7564db4a..9c7f4b79b2482 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/satori/go.uuid v1.2.0 github.com/satori/uuid v0.0.0-20160927100844-b061729afc07 github.com/sergi/go-diff v1.1.0 - github.com/terraform-providers/terraform-provider-azuread v0.8.0 + github.com/terraform-providers/terraform-provider-azuread v0.9.0 github.com/tombuildsstuff/giovanni v0.10.0 golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 golang.org/x/net v0.0.0-20191009170851-d66e71096ffb diff --git a/go.sum b/go.sum index 6b0faf557556d..2f90ac37422c1 100644 --- a/go.sum +++ b/go.sum @@ -10,8 +10,6 @@ cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7 github.com/Azure/azure-sdk-for-go v21.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v35.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v40.3.0+incompatible h1:NthZg3psrLxvQLN6rVm07pZ9mv2wvGNaBNGQ3fnPvLE= -github.com/Azure/azure-sdk-for-go v40.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v42.1.0+incompatible h1:ZNliGuvGKIHedRdz8W9BTMSrxBv9Nzz5BjeobotQTAI= github.com/Azure/azure-sdk-for-go v42.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= @@ -219,8 +217,8 @@ github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0 github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/terraform-providers/terraform-provider-azuread v0.8.0 h1:ZcF5f+F3tFBK7N2T+OSjgFDpgLHYKfSWxhGRfUoPKUU= -github.com/terraform-providers/terraform-provider-azuread v0.8.0/go.mod h1:7RxccROJFJZmxJpmbRTHA+mn6U/s7UnVeEbOHLX6CQU= +github.com/terraform-providers/terraform-provider-azuread v0.9.0 h1:XLzFgVHakq6qjJ2L0o/tN2yHu/hT4vIW9sKtejr7gPs= +github.com/terraform-providers/terraform-provider-azuread v0.9.0/go.mod h1:sSDzB/8CD639+yWo5lZf+NJvGSYQBSS6z+GoET9IrzE= github.com/tombuildsstuff/giovanni v0.10.0 h1:XqZBPVD2hETa30FFdMz/zVfnidMnUrIMMmKIH7hWnWA= github.com/tombuildsstuff/giovanni v0.10.0/go.mod h1:WwPhFP2+WnhJzvPYDnsyBab2wOIksMX6xm+Tg+jVvKw= github.com/tombuildsstuff/go-autorest v14.0.1-0.20200416184303-d4e299a3c04a+incompatible h1:9645FYqYopS+TFknygW7EC9PCbIC5T4WvWUpktyE2JA= diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datashare/mgmt/2019-11-01/datashare/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datashare/mgmt/2019-11-01/datashare/version.go index 5a612e2b62094..96c9e9f231ae5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/datashare/mgmt/2019-11-01/datashare/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datashare/mgmt/2019-11-01/datashare/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " datashare/2019-11-01" + return "Azure-SDK-For-Go/" + Version() + " datashare/2019-11-01" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2020-04-01-preview/eventgrid/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2020-04-01-preview/eventgrid/version.go index 4f97ef4c465bc..4762ab415d18e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2020-04-01-preview/eventgrid/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/eventgrid/mgmt/2020-04-01-preview/eventgrid/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " eventgrid/2020-04-01-preview" + return "Azure-SDK-For-Go/" + Version() + " eventgrid/2020-04-01-preview" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iothub/mgmt/2019-03-22-preview/devices/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iothub/mgmt/2019-03-22-preview/devices/version.go index 5d1ff15181c54..43e7aa0be520f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iothub/mgmt/2019-03-22-preview/devices/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/iothub/mgmt/2019-03-22-preview/devices/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " devices/2019-03-22-preview" + return "Azure-SDK-For-Go/" + Version() + " devices/2019-03-22-preview" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/github.com/terraform-providers/terraform-provider-azuread/azuread/helpers/graph/user.go b/vendor/github.com/terraform-providers/terraform-provider-azuread/azuread/helpers/graph/user.go index 7b2d38516f2bf..8fff3a2b57ca0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-azuread/azuread/helpers/graph/user.go +++ b/vendor/github.com/terraform-providers/terraform-provider-azuread/azuread/helpers/graph/user.go @@ -9,7 +9,7 @@ import ( func UserGetByObjectId(client *graphrbac.UsersClient, ctx context.Context, objectId string) (*graphrbac.User, error) { filter := fmt.Sprintf("objectId eq '%s'", objectId) - resp, err := client.ListComplete(ctx, filter) + resp, err := client.ListComplete(ctx, filter, "") if err != nil { return nil, fmt.Errorf("Error listing Azure AD Users for filter %q: %+v", filter, err) } @@ -37,8 +37,8 @@ func UserGetByObjectId(client *graphrbac.UsersClient, ctx context.Context, objec } func UserGetByMailNickname(client *graphrbac.UsersClient, ctx context.Context, mailNickname string) (*graphrbac.User, error) { - filter := fmt.Sprintf("startswith(mailNickname,'%s')", mailNickname) - resp, err := client.ListComplete(ctx, filter) + filter := fmt.Sprintf("mailNickname eq '%s'", mailNickname) + resp, err := client.ListComplete(ctx, filter, "") if err != nil { return nil, fmt.Errorf("Error listing Azure AD Users for filter %q: %+v", filter, err) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-azuread/azuread/resource_application.go b/vendor/github.com/terraform-providers/terraform-provider-azuread/azuread/resource_application.go index 8c94a4665d802..fba0056db3322 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-azuread/azuread/resource_application.go +++ b/vendor/github.com/terraform-providers/terraform-provider-azuread/azuread/resource_application.go @@ -50,7 +50,8 @@ func resourceApplication() *schema.Resource { string(graphrbac.All), string(graphrbac.None), string(graphrbac.SecurityGroup), - "DirectoryRole", // missing from sdk: https://github.com/Azure/azure-sdk-for-go/issues/7857 + "DirectoryRole", // missing from sdk: https://github.com/Azure/azure-sdk-for-go/issues/7857 + "ApplicationGroup", //missing from sdk:https://github.com/Azure/azure-sdk-for-go/issues/8244 }, false), }, diff --git a/vendor/github.com/terraform-providers/terraform-provider-azuread/azuread/resource_service_principal.go b/vendor/github.com/terraform-providers/terraform-provider-azuread/azuread/resource_service_principal.go index 519d24cbea02f..c2d09d937f216 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-azuread/azuread/resource_service_principal.go +++ b/vendor/github.com/terraform-providers/terraform-provider-azuread/azuread/resource_service_principal.go @@ -55,7 +55,6 @@ func resourceServicePrincipal() *schema.Resource { "tags": { Type: schema.TypeSet, Optional: true, - ForceNew: true, Set: schema.HashString, Elem: &schema.Schema{ Type: schema.TypeString, @@ -115,6 +114,15 @@ func resourceServicePrincipalUpdate(d *schema.ResourceData, meta interface{}) er properties.AppRoleAssignmentRequired = p.Bool(d.Get("app_role_assignment_required").(bool)) } + if d.HasChange("tags") { + if v, ok := d.GetOk("tags"); ok { + properties.Tags = tf.ExpandStringSlicePtr(v.(*schema.Set).List()) + } else { + empty := []string{} // clear tags with empty array + properties.Tags = &empty + } + } + if _, err := client.Update(ctx, d.Id(), properties); err != nil { return fmt.Errorf("Error patching Azure AD Service Principal with ID %q: %+v", d.Id(), err) } diff --git a/vendor/modules.txt b/vendor/modules.txt index 88ea3ed760353..9450de73469f6 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -339,7 +339,7 @@ github.com/sergi/go-diff/diffmatchpatch # github.com/spf13/afero v1.2.2 github.com/spf13/afero github.com/spf13/afero/mem -# github.com/terraform-providers/terraform-provider-azuread v0.8.0 +# github.com/terraform-providers/terraform-provider-azuread v0.9.0 github.com/terraform-providers/terraform-provider-azuread/azuread github.com/terraform-providers/terraform-provider-azuread/azuread/helpers/ar github.com/terraform-providers/terraform-provider-azuread/azuread/helpers/graph