LoginSignup
2
1

More than 3 years have passed since last update.

VPC Service Controlその2

Last updated at Posted at 2020-02-28

はじめに

VPC Service Controlの境界ブリッジ(service perimeter bridge)を試してみます。
https://cloud.google.com/vpc-service-controls/docs/share-across-perimeters

VPC Service Controlの標準境界の記事はこちら。
https://qiita.com/atsumjp/items/096d101ba60f16b94349

境界ブリッジがない場合

以下の様に②つの標準境界を作成し、それぞれProdとDevのプロジェクトを追加します。
image.png

この状態で、gsutil cpコマンドでProdプロジェクトのバケットからDevプロジェクトのバケットにファイルをコピーした場合失敗します。

$ gsutil cp gs://bucket-a/test.txt gs://bucket-b/
Copying gs://bucket-a/test.txt [Content-Type=text/plain]...
AccessDeniedException: 403 Request is prohibited by organization's policy. vpcServiceControlsUniqueIdentifier: fde60e46b2154e0a

境界ブリッジがある場合

境界ブリッジを作成し、ProdプロジェクトとDevプロジェクトを追加します。

image.png

この状態としては、以下のようなイメージになります。

image.png

この状態で先程のgsutil cpコマンドを実行するとコピーが成功します。

$ gsutil cp gs://bucket-a/test.txt gs://bucket-b/
Copying gs://bucket-a/test.txt [Content-Type=text/plain]...
/ [1 files][  913.0 B/  913.0 B]
Operation completed over 1 objects/913.0 B.

VPC Service Controlに直接関係ないけど、プロジェクト跨いでバケット間でデータをコピーするのが、単一ユーザをプロジェクトごとに権限付与する仕組みなため、AWSよりシンプルに感じます

投稿内容は私個人の意見であり、所属企業・部門見解を代表するものではありません。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1