@@ -240,6 +240,8 @@ func TestAccPubsubSubscriptionBigQuery_serviceAccount(t *testing.T) {
240240 table := fmt .Sprintf ("tf-test-table-%s" , acctest .RandString (t , 10 ))
241241 topic := fmt .Sprintf ("tf-test-topic-%s" , acctest .RandString (t , 10 ))
242242 subscriptionShort := fmt .Sprintf ("tf-test-sub-%s" , acctest .RandString (t , 10 ))
243+ serviceAccount := fmt .Sprintf ("bq-test-sa-%s" , acctest .RandString (t , 10 ))
244+ serviceAccount2 := fmt .Sprintf ("bq-test-sa2-%s" , acctest .RandString (t , 10 ))
243245
244246 acctest .BootstrapIamMembers (t , []acctest.IamMember {
245247 {
@@ -261,7 +263,7 @@ func TestAccPubsubSubscriptionBigQuery_serviceAccount(t *testing.T) {
261263 },
262264 Steps : []resource.TestStep {
263265 {
264- Config : testAccPubsubSubscriptionBigQuery_basic (dataset , table , topic , subscriptionShort , false , "bq-test-sa" ),
266+ Config : testAccPubsubSubscriptionBigQuery_basic (dataset , table , topic , subscriptionShort , false , serviceAccount ),
265267 },
266268 {
267269 ResourceName : "google_pubsub_subscription.foo" ,
@@ -279,7 +281,7 @@ func TestAccPubsubSubscriptionBigQuery_serviceAccount(t *testing.T) {
279281 ImportStateVerify : true ,
280282 },
281283 {
282- Config : testAccPubsubSubscriptionBigQuery_basic (dataset , table , topic , subscriptionShort , true , "bq-test-sa2" ),
284+ Config : testAccPubsubSubscriptionBigQuery_basic (dataset , table , topic , subscriptionShort , true , serviceAccount2 ),
283285 },
284286 {
285287 ResourceName : "google_pubsub_subscription.foo" ,
@@ -390,14 +392,16 @@ func TestAccPubsubSubscriptionCloudStorage_serviceAccount(t *testing.T) {
390392 bucket := fmt .Sprintf ("tf-test-bucket-%s" , acctest .RandString (t , 10 ))
391393 topic := fmt .Sprintf ("tf-test-topic-%s" , acctest .RandString (t , 10 ))
392394 subscriptionShort := fmt .Sprintf ("tf-test-sub-%s" , acctest .RandString (t , 10 ))
395+ serviceAccount := fmt .Sprintf ("gcs-test-sa-%s" , acctest .RandString (t , 10 ))
396+ serviceAccount2 := fmt .Sprintf ("gcs-test-sa2-%s" , acctest .RandString (t , 10 ))
393397
394398 acctest .VcrTest (t , resource.TestCase {
395399 PreCheck : func () { acctest .AccTestPreCheck (t ) },
396400 ProtoV5ProviderFactories : acctest .ProtoV5ProviderFactories (t ),
397401 CheckDestroy : testAccCheckPubsubSubscriptionDestroyProducer (t ),
398402 Steps : []resource.TestStep {
399403 {
400- Config : testAccPubsubSubscriptionCloudStorage_basic (bucket , topic , subscriptionShort , "" , "" , "" , 0 , "" , 0 , "gcs-test-sa" , "text" ),
404+ Config : testAccPubsubSubscriptionCloudStorage_basic (bucket , topic , subscriptionShort , "" , "" , "" , 0 , "" , 0 , serviceAccount , "text" ),
401405 },
402406 {
403407 ResourceName : "google_pubsub_subscription.foo" ,
@@ -415,7 +419,7 @@ func TestAccPubsubSubscriptionCloudStorage_serviceAccount(t *testing.T) {
415419 ImportStateVerify : true ,
416420 },
417421 {
418- Config : testAccPubsubSubscriptionCloudStorage_basic (bucket , topic , subscriptionShort , "" , "" , "" , 0 , "" , 0 , "gcs-test-sa2" , "avro" ),
422+ Config : testAccPubsubSubscriptionCloudStorage_basic (bucket , topic , subscriptionShort , "" , "" , "" , 0 , "" , 0 , serviceAccount2 , "avro" ),
419423 },
420424 {
421425 ResourceName : "google_pubsub_subscription.foo" ,
0 commit comments