From 9fa4c57dd3a4e6ec7b00a35887deb52f6754aae7 Mon Sep 17 00:00:00 2001 From: Tom Bamford Date: Wed, 10 Jun 2020 01:35:24 +0100 Subject: [PATCH] more WIP --- azuread/resource_application.go | 8 +++++--- azuread/resource_application_test.go | 20 +++++++++++--------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/azuread/resource_application.go b/azuread/resource_application.go index 5219a602a0..7a3518792e 100644 --- a/azuread/resource_application.go +++ b/azuread/resource_application.go @@ -108,12 +108,14 @@ func resourceApplication() *schema.Resource { "app_role": { Type: schema.TypeSet, Optional: true, + Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "id": { - Type: schema.TypeString, - Optional: true, - Computed: true, + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validate.UUID, }, "allowed_member_types": { diff --git a/azuread/resource_application_test.go b/azuread/resource_application_test.go index 48bea923c2..3f4082d597 100644 --- a/azuread/resource_application_test.go +++ b/azuread/resource_application_test.go @@ -140,6 +140,7 @@ func TestAccAzureADApplication_update(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "identifier_uris.#", "0"), resource.TestCheckResourceAttr(resourceName, "reply_urls.#", "0"), resource.TestCheckResourceAttr(resourceName, "optional_claims.#", "0"), + resource.TestCheckResourceAttr(resourceName, "oauth2_permissions.#", "0"), ), }, { @@ -661,6 +662,7 @@ func testAccADApplication_basicEmpty(ri int) string { resource "azuread_application" "test" { name = "acctest-APP-%[1]d" identifier_uris = [] + oauth2_permissions = [] reply_urls = [] group_membership_claims = "None" } @@ -815,15 +817,15 @@ resource "azuread_application" "test" { name = "acctest-APP-%[1]d" app_role { - allowed_member_types = [ - "User", - //"Application", - ] - - description = "Admins can manage roles and perform all task actions" - display_name = "Admin" - is_enabled = true - value = "Admin" + allowed_member_types = [ + "User", + //"Application", + ] + + description = "Admins can manage roles and perform all task actions" + display_name = "Admin" + is_enabled = true + value = "Admin" } } `, ri)