From e93cd9e1a5019fac84eb139d088b8fe5184cf145 Mon Sep 17 00:00:00 2001 From: Tom Bamford Date: Fri, 12 Jun 2020 23:14:03 +0100 Subject: [PATCH] Update acceptance test configs to use Terraform 0.12 expressions --- azuread/data_group_test.go | 8 +++---- azuread/data_groups_test.go | 4 ++-- azuread/data_service_principal_test.go | 6 ++--- azuread/data_user_test.go | 6 ++--- azuread/data_users_test.go | 6 ++--- .../resource_application_certificate_test.go | 16 +++++++------- azuread/resource_application_password_test.go | 18 +++++++-------- azuread/resource_group_member_test.go | 22 +++++++++---------- ...urce_service_principal_certificate_test.go | 18 +++++++-------- ...esource_service_principal_password_test.go | 18 +++++++-------- azuread/resource_service_principal_test.go | 4 ++-- 11 files changed, 63 insertions(+), 63 deletions(-) diff --git a/azuread/data_group_test.go b/azuread/data_group_test.go index 0bf4933bb9..420fe9c06b 100644 --- a/azuread/data_group_test.go +++ b/azuread/data_group_test.go @@ -99,7 +99,7 @@ func testAccDataSourceAzureADGroup_name(id int) string { %s data "azuread_group" "test" { - name = "${azuread_group.test.name}" + name = azuread_group.test.name } `, testAccAzureADGroup_basic(id)) } @@ -109,7 +109,7 @@ func testAccDataSourceAzureADGroup_objectId(id int) string { %s data "azuread_group" "test" { - object_id = "${azuread_group.test.object_id}" + object_id = azuread_group.test.object_id } `, testAccAzureADGroup_basic(id)) } @@ -119,7 +119,7 @@ func testAccDataSourceAzureADGroup_members(id int, password string) string { %s data "azuread_group" "test" { - object_id = "${azuread_group.test.object_id}" + object_id = azuread_group.test.object_id } `, testAccAzureADGroupWithThreeMembers(id, password)) } @@ -129,7 +129,7 @@ func testAccDataSourceAzureADGroup_owners(id int, password string) string { %s data "azuread_group" "test" { - object_id = "${azuread_group.test.object_id}" + object_id = azuread_group.test.object_id } `, testAccAzureADGroupWithThreeOwners(id, password)) } diff --git a/azuread/data_groups_test.go b/azuread/data_groups_test.go index ce428c7a61..81d1788d1f 100644 --- a/azuread/data_groups_test.go +++ b/azuread/data_groups_test.go @@ -84,7 +84,7 @@ func testAccAzureADGroupsDataSource_byDisplayNames(id int) string { %s data "azuread_groups" "test" { - names = ["${azuread_group.testA.name}", "${azuread_group.testB.name}"] + names = [azuread_group.testA.name, azuread_group.testB.name] } `, testAccAzureADGroup_multiple(id)) } @@ -94,7 +94,7 @@ func testAccAzureADGroupsDataSource_byObjectIds(id int) string { %s data "azuread_groups" "test" { - object_ids = ["${azuread_group.testA.object_id}", "${azuread_group.testB.object_id}"] + object_ids = [azuread_group.testA.object_id, azuread_group.testB.object_id] } `, testAccAzureADGroup_multiple(id)) } diff --git a/azuread/data_service_principal_test.go b/azuread/data_service_principal_test.go index 78296f907c..8afbb71029 100644 --- a/azuread/data_service_principal_test.go +++ b/azuread/data_service_principal_test.go @@ -83,7 +83,7 @@ func testAccAzureADServicePrincipalDataSource_byApplicationId(id string) string %s data "azuread_service_principal" "test" { - application_id = "${azuread_service_principal.test.application_id}" + application_id = azuread_service_principal.test.application_id } `, template) } @@ -94,7 +94,7 @@ func testAccAzureADServicePrincipalDataSource_byDisplayName(id string) string { %s data "azuread_service_principal" "test" { - display_name = "${azuread_service_principal.test.display_name}" + display_name = azuread_service_principal.test.display_name } `, template) } @@ -105,7 +105,7 @@ func testAccAzureADServicePrincipalDataSource_byObjectId(id string) string { %s data "azuread_service_principal" "test" { - object_id = "${azuread_service_principal.test.object_id}" + object_id = azuread_service_principal.test.object_id } `, template) } diff --git a/azuread/data_user_test.go b/azuread/data_user_test.go index 5d665f2677..a3303444af 100644 --- a/azuread/data_user_test.go +++ b/azuread/data_user_test.go @@ -81,7 +81,7 @@ func testAccAzureADUserDataSource_byUserPrincipalName(id int, password string) s %s data "azuread_user" "test" { - user_principal_name = "${azuread_user.test.user_principal_name}" + user_principal_name = azuread_user.test.user_principal_name } `, testAccADUser_basic(id, password)) } @@ -91,7 +91,7 @@ func testAccAzureADUserDataSource_byObjectId(id int, password string) string { %s data "azuread_user" "test" { - object_id = "${azuread_user.test.object_id}" + object_id = azuread_user.test.object_id } `, testAccADUser_basic(id, password)) } @@ -101,7 +101,7 @@ func testAccAzureADUserDataSource_byMailNickname(id int, password string) string %s data "azuread_user" "test" { - mail_nickname = "${azuread_user.test.mail_nickname}" + mail_nickname = azuread_user.test.mail_nickname } `, testAccADUser_basic(id, password)) } diff --git a/azuread/data_users_test.go b/azuread/data_users_test.go index bf891c4c92..aa476f2392 100644 --- a/azuread/data_users_test.go +++ b/azuread/data_users_test.go @@ -95,7 +95,7 @@ func testAccAzureADUsersDataSource_byUserPrincipalNames(id int, password string) %s data "azuread_users" "test" { - user_principal_names = ["${azuread_user.testA.user_principal_name}", "${azuread_user.testB.user_principal_name}"] + user_principal_names = [azuread_user.testA.user_principal_name, azuread_user.testB.user_principal_name] } `, testAccADUser_threeUsersABC(id, password)) } @@ -105,7 +105,7 @@ func testAccAzureADUsersDataSource_byObjectIds(id int, password string) string { %s data "azuread_users" "test" { - object_ids = ["${azuread_user.testA.object_id}", "${azuread_user.testB.object_id}"] + object_ids = [azuread_user.testA.object_id, azuread_user.testB.object_id] } `, testAccADUser_threeUsersABC(id, password)) } @@ -115,7 +115,7 @@ func testAccAzureADUsersDataSource_byMailNicknames(id int, password string) stri %s data "azuread_users" "test" { - mail_nicknames = ["${azuread_user.testA.mail_nickname}", "${azuread_user.testB.mail_nickname}"] + mail_nicknames = [azuread_user.testA.mail_nickname, azuread_user.testB.mail_nickname] } `, testAccADUser_threeUsersABC(id, password)) } diff --git a/azuread/resource_application_certificate_test.go b/azuread/resource_application_certificate_test.go index 81e724bd7a..74c049f7e2 100644 --- a/azuread/resource_application_certificate_test.go +++ b/azuread/resource_application_certificate_test.go @@ -236,7 +236,7 @@ func testAccADObjectCertificateApplication_basic(ri int, keyType, endDate, value %s resource "azuread_application_certificate" "test" { - application_object_id = "${azuread_application.test.id}" + application_object_id = azuread_application.test.id type = "%s" end_date = "%s" value = <