@@ -49,6 +49,10 @@ func TestAccCESToolset_cesToolsetOpenapiServiceAccountAuthConfigExample_update(t
4949
5050func testAccCESToolset_cesToolsetOpenapiServiceAccountAuthConfigExample_full (context map [string ]interface {}) string {
5151 return acctest .Nprintf (`
52+ resource "google_service_account" "ces_test_service_account" {
53+ account_id = "tf-test-sa-ces-%{random_suffix}"
54+ }
55+
5256resource "google_ces_app" "ces_app_for_toolset" {
5357 app_id = "tf-test-app-id%{random_suffix}"
5458 location = "us"
@@ -95,7 +99,8 @@ resource "google_ces_toolset" "ces_toolset_openapi_service_account_auth_config"
9599 }
96100 api_authentication {
97101 service_account_auth_config {
98- service_account = "testaccount@gmail.com"
102+ service_account = "${google_service_account.ces_test_service_account.email}"
103+ scopes = ["https://www.googleapis.com/auth/cloud-platform"]
99104 }
100105 }
101106 }
@@ -105,6 +110,10 @@ resource "google_ces_toolset" "ces_toolset_openapi_service_account_auth_config"
105110
106111func testAccCESToolset_cesToolsetOpenapiServiceAccountAuthConfigExample_update (context map [string ]interface {}) string {
107112 return acctest .Nprintf (`
113+ resource "google_service_account" "ces_test_service_account" {
114+ account_id = "tf-test-sa-ces-%{random_suffix}"
115+ }
116+
108117resource "google_ces_app" "ces_app_for_toolset" {
109118 app_id = "tf-test-app-id%{random_suffix}"
110119 location = "us"
@@ -151,7 +160,8 @@ resource "google_ces_toolset" "ces_toolset_openapi_service_account_auth_config"
151160 }
152161 api_authentication {
153162 service_account_auth_config {
154- service_account = "testaccountupdated@gmail.com"
163+ service_account = "${google_service_account.ces_test_service_account.email}"
164+ scopes = ["https://www.googleapis.com/auth/cloud-platform"]
155165 }
156166 }
157167 }
@@ -814,6 +824,10 @@ func TestAccCESToolset_cesToolsetMcpServiceAccountAuthConfigExample_update(t *te
814824
815825func testAccCESToolset_cesToolsetMcpServiceAccountAuthConfigExample_full (context map [string ]interface {}) string {
816826 return acctest .Nprintf (`
827+ resource "google_service_account" "ces_test_service_account" {
828+ account_id = "tf-test-sa-ces-%{random_suffix}"
829+ }
830+
817831resource "google_ces_app" "ces_app_for_toolset" {
818832 app_id = "tf-test-app-id%{random_suffix}"
819833 location = "us"
@@ -847,7 +861,8 @@ resource "google_ces_toolset" "ces_toolset_mcp_service_account_auth_config" {
847861 }
848862 api_authentication {
849863 service_account_auth_config {
850- service_account = "testaccount@gmail.com"
864+ service_account = "${google_service_account.ces_test_service_account.email}"
865+ scopes = ["https://www.googleapis.com/auth/cloud-platform"]
851866 }
852867 }
853868 }
@@ -857,6 +872,10 @@ resource "google_ces_toolset" "ces_toolset_mcp_service_account_auth_config" {
857872
858873func testAccCESToolset_cesToolsetMcpServiceAccountAuthConfigExample_update (context map [string ]interface {}) string {
859874 return acctest .Nprintf (`
875+ resource "google_service_account" "ces_test_service_account" {
876+ account_id = "tf-test-sa-ces-%{random_suffix}"
877+ }
878+
860879resource "google_ces_app" "ces_app_for_toolset" {
861880 app_id = "tf-test-app-id%{random_suffix}"
862881 location = "us"
@@ -890,7 +909,8 @@ resource "google_ces_toolset" "ces_toolset_mcp_service_account_auth_config" {
890909 }
891910 api_authentication {
892911 service_account_auth_config {
893- service_account = "testaccountupdated@gmail.com"
912+ service_account = "${google_service_account.ces_test_service_account.email}"
913+ scopes = ["https://www.googleapis.com/auth/cloud-platform"]
894914 }
895915 }
896916 }
0 commit comments