VPC Service Controls を使用すると、サポートされているマルチテナントGoogle Cloud サービスのリソースを分離し、データ引き出しのリスクを軽減できます。Terraform を使用すると、フォルダ内のプロジェクトをサービス境界に追加できます。
サービス境界にフォルダを自動的に追加するには、Cloud Run functions の関数を使用します。関数により、フォルダに追加された新しいプロジェクトが検出されると、Terraform スクリプトが実行され、新しいプロジェクトが境界に追加されます。同様に、プロジェクトを別のフォルダを移動すると、そのプロジェクトは境界から自動的に削除されます。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-04 UTC。"],[],[],null,["# Add projects to service perimeters using Terraform\n\nVPC Service Controls lets you isolate resources of a supported multi-tenant\nGoogle Cloud service to mitigate data exfiltration risks. You can use Terraform\nto add a project in a folder to a service perimeter.\n\nTo automatically add a folder to a service perimeter, you can use\nCloud Run functions. When the function detects a new project being added to the\nfolder, it executes the Terraform script to add the new project to the\nperimeter. Similarly, the function automatically removes projects from the\nperimeter if they are moved out of the folder.\n\nFor more information, see [Automatically secured folder](https://github.com/terraform-google-modules/terraform-google-vpc-service-controls/tree/master/examples/automatic_folder).\n\nWhat's next\n-----------\n\n- [Overview of a service perimeter](/vpc-service-controls/docs/service-perimeters)\n- [Create a service perimeter](/vpc-service-controls/docs/create-service-perimeters)"]]