@@ -72,7 +72,7 @@ func TestAccDataSourceGoogleServiceAccounts_basic(t *testing.T) {
7272 resource .TestCheckResourceAttr ("data.google_service_accounts.with_regex" , "accounts.0.email" , fmt .Sprintf ("%s@%s.iam.gserviceaccount.com" , sa_1 , project )),
7373
7474 // Check if the account_id matches the prefix
75- resource .TestCheckResourceAttr ("data.google_service_accounts.with_prefix_and_regex" , "accounts.0.account_id" , fmt . Sprintf ( sa_1 ) ),
75+ resource .TestCheckResourceAttr ("data.google_service_accounts.with_prefix_and_regex" , "accounts.0.account_id" , sa_1 ),
7676
7777 // Check if the email matches the regex
7878 resource .TestCheckResourceAttr ("data.google_service_accounts.with_prefix_and_regex" , "accounts.0.email" , fmt .Sprintf ("%s@%s.iam.gserviceaccount.com" , sa_1 , project )),
@@ -118,17 +118,19 @@ data "google_service_accounts" "with_prefix" {
118118
119119data "google_service_accounts" "with_regex" {
120120 project = local.project_id
121- regex = ".*${google_service_account.sa_one.account_id} .*@.*\\.gserviceaccount\\.com"
121+ regex = ".*%s .*@.*\\.gserviceaccount\\.com"
122122}
123123
124124data "google_service_accounts" "with_prefix_and_regex" {
125125 prefix = google_service_account.sa_one.account_id
126126 project = local.project_id
127- regex = ".*${google_service_account.sa_one.account_id} .*@.*\\.gserviceaccount\\.com"
127+ regex = ".*%s .*@.*\\.gserviceaccount\\.com"
128128}
129129` ,
130130 context ["project" ].(string ),
131131 context ["sa_1" ].(string ),
132132 context ["sa_2" ].(string ),
133+ context ["sa_1" ].(string ),
134+ context ["sa_1" ].(string ),
133135 )
134136}
0 commit comments