Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Memberikan peran yang diperlukan
Agen Layanan Cloud Workstations memungkinkan Cloud Workstations melakukan tugas layanan di project Anda. Saat Anda mengaktifkan
Layanan Cloud Workstations di project, agen layanan akan
dibuat secara otomatis. Untuk mengizinkan Cloud Workstations menggunakan jaringan dan subnetwork VPC Bersama Anda, berikan peran Pengguna Jaringan Compute Engine (roles/compute.networkUser) kepada Agen Layanan Cloud Workstations untuk project Anda di subnetwork VPC Bersama.
Untuk mengambil Agen Layanan Cloud Workstations untuk project Anda, gunakan
perintah berikut:
Ganti WORKSTATIONS_PROJECT_ID dengan ID project tempat Anda akan membuat cluster workstation.
Agen Layanan Cloud Workstations menggunakan format berikut: service-$WORKSTATIONS_PROJECT_NUMBER@gcp-sa-workstations..
Berikan peran Compute Engine Network User
(roles/compute.networkUser) kepada Agen Layanan Cloud Workstations di subnet VPC Bersama.
Membuat cluster workstation menggunakan VPC Bersama
Saat Anda membuat cluster workstation
di konsol Google Cloud , tentukan jaringan dan subnetwork VPC Bersama.
Langkah ini hanya dapat dilakukan jika subnet dibagikan kepada pengguna menggunakan
konsol. Untuk mengetahui informasi selengkapnya, lihat Menyediakan VPC Bersama
.
Untuk mengetahui informasi umum tentang akses VPC Bersama, lihat
VPC Bersama
.
Saat Anda membuat cluster workstation, Cloud Workstations akan mengaitkan cluster dengan subnet tertentu dan semua workstation ditempatkan di subnet tersebut. Untuk
mengaktifkan Log Alur VPC, pastikan Anda mengaktifkan logging untuk
subnet tersebut. Untuk mengetahui informasi selengkapnya, lihat
Mengaktifkan Log Alur VPC untuk subnet yang ada.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-03 UTC."],[],[],null,["# Set up Shared VPC access\n\nGrant the required roles\n------------------------\n\nThe [Cloud Workstations Service\nAgent](/workstations/docs/service-accounts#workstations-service-agent) allows\nCloud Workstations perform service duties on your project. When you activated\nthe Cloud Workstations Service in your project, the service agent was\nautomatically created. To enable Cloud Workstations to use your Shared VPC\nnetwork and subnetwork, grant the Cloud Workstations Service Agent for your\nproject the [Compute Engine Network User\nrole](/compute/docs/access/iam#compute.networkUser)\n(`roles/compute.networkUser`) on the Shared VPC subnet.\n\n1. To retrieve the Cloud Workstations Service Agent for your project, use the\n following command:\n\n gcloud beta services identity create \\\n --service=workstations.googleapis.com \\\n --project=\u003cvar translate=\"no\"\u003eWORKSTATIONS_PROJECT_ID\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003eWORKSTATIONS_PROJECT_ID\u003c/var\u003e with the ID of the\n project where you will create your workstations cluster.\n\n The Cloud Workstations Service Agent uses the following format: \n\n `service-`\u003cvar translate=\"no\"\u003e$WORKSTATIONS_PROJECT_NUMBER\u003c/var\u003e`@gcp-sa-workstations.iam.gserviceaccount.com`.\n2. Grant the Cloud Workstations Service Agent the [Compute Engine Network\n User role](/compute/docs/access/iam#compute.networkUser)\n (`roles/compute.networkUser`) role on the Shared VPC subnet.\n\nCreate workstation clusters using a Shared VPC\n----------------------------------------------\n\nWhen you [create your workstation\ncluster](/workstations/docs/create-configuration)\nin the Google Cloud console, specify the Shared VPC network and subnetwork.\nThis step is only possible if the subnet is shared with the user using the\nconsole. For more information, see [Provision\nShared VPC](/vpc/docs/provisioning-shared-vpc)\n.\n\nFor general information about Shared VPC access, see\n[Shared VPC](/vpc/docs/shared-vpc)\n.\n\nWhen you create a workstation cluster, Cloud Workstations associates the cluster\nwith a particular subnet and all workstations are placed in that subnet. To\nenable VPC Flow Logs, make sure that you turn on logging for\nthat subnet. For more information, see\n[Enable VPC Flow Logs for an existing subnet](/vpc/docs/using-flow-logs#enable-logging-existing).\n| **Tip:** When using Shared VPC, make sure that you add and configure firewall rules for the Shared VPC network. For more information, see [Configure firewall\n| rules](/workstations/docs/configure-firewall-rules) .\n\nWhat's next\n-----------\n\n- [Troubleshoot policy and access problems](/vpc/docs/troubleshooting-policy-and-access-problems)\n- [Configure VPC Service Controls and private clusters](/workstations/docs/configure-vpc-service-controls-private-clusters)\n- [Enable VPC Flow Logs](/vpc/docs/using-flow-logs#enabling-vpc-flow-logs)"]]