Openflowの設定 - BYOC

このトピックでは、Openflow のセットアップ手順について説明します。

Openflow のセットアップには、以下のステップがあります。

前提条件

Snowflakeおよび AWS アカウントで完了する前提条件は以下のとおりです。

Snowflakeアカウント

You'll need to first define privileges at the Snowflake account level.

  1. Run the following SQL commands to grant the required privileges to the Openflow admin role:

    USE ROLE ACCOUNTADMIN;
    
    GRANT CREATE OPENFLOW DATA PLANE INTEGRATION ON ACCOUNT TO ROLE $openflow_admin_role;
    GRANT CREATE OPENFLOW RUNTIME INTEGRATION ON ACCOUNT TO ROLE $openflow_admin_role;
    
    Copy

    The new privileges are assigned to the ACCOUNTADMIN role as part of the default set of privileges, and that role can grant the privileges to a role of their choosing for the Openflow admin role, denoted as $openflow_admin_role in the code.

  2. 次に、すべてのOpenflowユーザーに対して default_secondary_rolesALL に設定します。

    1. ACCOUNTADMIN が Openflow を使用するために割り当てたロールで Snowflake にサインインします。

      これは次のロール ACCOUNTADMIN ORGADMIN、 GLOBALORGADMIN、または SECURITYADMIN のいずれでもありません。

      Openflowへのログイン時に空白の画面が表示されたり、エラー「メッセージ:無効な同意リクエスト」が表示された場合は、ロールをリストにないロールに変更します。

      詳細については、 `前提条件 `_ をご参照ください。

    2. Run the following code, replacing $openflow_user for each Openflow user:

    USE ROLE ACCOUNTADMIN;
    ALTER USER $openflow_user SET DEFAULT_SECONDARY_ROLES = ('ALL');
    
    Copy

    Openflowアクションは、既定のロールだけでなく、認証されたユーザーのロールのいずれかを使用することで承認されるため、この設定が必要です。

デプロイメント統合権限

デプロイメント統合オブジェクトは、1 つ以上の Snowflake Openflow ランタイムをデプロイするためにプロビジョニングされたリソースのセットを表します。独自のクラウドリソースを持ち込む組織の場合、デプロイメント統合オブジェクトは、管理されたKubernetesクラスタとその関連ノードを表します。

Snowflake アカウントの CREATE DATA PLANE INTEGRATION 権限を持つユーザーは、デプロイメント統合オブジェクトを作成および削除できます。

デプロイメント統合オブジェクトに直接追加の権限を定義して、アクセスの差別化をサポートすることができます。

デプロイメント統合オブジェクトには、次の権限を付与できます。

  • OWNERSHIP: デプロイメントの削除など、デプロイメントアクション オブジェクトの完全な制御が可能になります。

  • USAGE: ランタイム子オブジェクトの作成を可能にします。

ランタイム権限

The runtime object represents a cluster of one or more Snowflake Openflow runtime servers, provisioned to run flow definitions. For Kubernetes deployments, the runtime object represents a stateful set of Snowflake Openflow runtime containers deployed in a namespace, along with supporting components.

親展開統合オブジェクトの権限(OWNERSHIP)とアカウント レベルの権限(CREATE RUNTIME INTEGRATION)を持つユーザーは、ランタイム統合オブジェクトを作成できます。ランタイム統合オブジェクトに直接追加権限を定義して、アクセスの差別化をサポートすることができます。

ランタイム統合オブジェクトには、以下の権限を付与できます。

  • OWNERSHIP: 関連するランタイムの削除やランタイムフロー定義の変更を含む、ランタイムアクションの完全な制御を可能にします。

  • USAGE: Enables read access to the deployed runtime for observing health and status, without making any changes.

Snowflake role

A Snowflake role is a Snowflake role that is associated with a specific Openflow runtime and used for the following tasks:

  • Snowflakeリソースへのアクセスを付与します。

  • コネクタ固有のリソースへのアクセス許可

Snowflake roles are linked to Openflow Snowflake managed tokens, avoiding the need for customers to create separate service users and key pairs for authentication to Snowflake. Snowflake roles require CREATE USER privilege to set Snowflake roles as OpenFlow helps manage the service users used by Workload identity federation.

注釈

<RUNTIMENAME> は、関連するランタイムの名前を示します。

To create a Snowflake role:

  1. Create the required Snowflake role.

    USE ROLE ACCOUNTADMIN;
    CREATE ROLE IF NOT EXISTS OPENFLOW_RUNTIME_ROLE_<RUNTIMENAME>
    
    Copy
  2. Grant the Snowflake role access to a warehouse. Snowflake recommends using a dedicated warehouse for data ingestion. This warehouse should be used when configuring your connectors for runtimes where you will be using this Snowflake role.

    GRANT USAGE, OPERATE ON WAREHOUSE <OPENFLOW_INGEST_WAREHOUSE> TO ROLE OPENFLOW_RUNTIME_ROLE_<RUNTIMENAME>;
    
    Copy
  3. Allow the Snowflake role to use, create or otherwise access Snowflake objects.

    注釈

    作成されるOpenflowコネクタに応じて、基礎となる必須オブジェクトは異なります。以下の例は、説明のみを目的としています。

    GRANT USAGE ON DATABASE <OPENFLOW_DATABASE> TO ROLE OPENFLOW_RUNTIME_ROLE_<RUNTIMENAME>;
    GRANT USAGE ON SCHEMA <OPENFLOW_SCHEMA> TO ROLE OPENFLOW_RUNTIME_ROLE_<RUNTIMENAME>;
    
    Copy
  4. Allow the runtime manager to manage Snowflake role

    GRANT OWNERSHIP ON ROLE OPENFLOW_RUNTIME_ROLE_<RUNTIMENAME> TO ROLE deployment1_runtime_manager_1;
    GRANT ROLE OPENFLOW_RUNTIME_ROLE_<RUNTIMENAME> TO ROLE deployment1_runtime_manager_1;
    
    Copy

ロール設定の例

次のロールを設定する必要があるシナリオを考えてみましょう。

  • accountadmin: Snowflakeのすぐに使えるロールで、次の2つの CREATE 権限を持ちます。

    • CREATE OPENFLOW DATA PLANE INTEGRATION

    • CREATE OPENFLOW RUNTIME INTEGRATION

  • deployment_manager: デプロイメントを作成、管理、削除できます。

  • deployment1_runtime_manager_1: Can create a runtime only within deployment 1. It can modify and delete a runtime that it created within deployment 1, but not a runtime created by deployment1_runtime_manager_2.

  • deployment1_runtime_manager_2: Can create a runtime only within deployment 1. It can modify and delete a runtime that it created within deployment 1, but not a runtime created by deployment1_runtime_manager_1.

  • deployment1_runtime_viewer_1: deployment1_runtime_manager_1によって作成されたdeployment 1内のランタイムキャンバスを表示できます。

  • deployment1_runtime_viewer_2: deployment1_runtime_manager_2によって作成されたdeployment 1内のランタイムキャンバスを表示できます。

  • deployment2_runtime_manager: deployment 2内でのみランタイムを作成できます。

  • deployment2_runtime_viewer: deployment 2内でランタイムキャンバスを表示できます。

これらのロールでOpenflowを設定するには、以下のステップに従います。

  1. 新しいロールを作成し、関連する権限を割り当てます。

    use role ACCOUNTADMIN;
    create role if not exists deployment_manager;
    create role if not exists deployment1_runtime_manager_1;
    create role if not exists deployment1_runtime_manager_2;
    create role if not exists deployment1_runtime_viewer_1;
    create role if not exists deployment1_runtime_viewer_2;
    create role if not exists deployment2_runtime_manager;
    create role if not exists deployment2_runtime_viewer;
    
    
    -- Assign create deployment privilege to roles. (This privilege cannot be granted in Openflow UI.)
    
    grant create openflow data plane integration on account to role deployment_manager;
    
    
    -- Assign create runtime privilege to roles. (This privilege cannot be granted in the Control Pane UI.)
    
    grant create openflow runtime integration on account to role deployment1_runtime_manager_1;
    grant create openflow runtime integration on account to role deployment1_runtime_manager_2;
    grant create openflow runtime integration on account to role deployment2_runtime_manager;
    
    -- Grant roles to users. (Repeat this step for each user.)
    
    grant role <role name> to user <username>;
    
    Copy
  2. デプロイメントを作成するには、以下の手順に従います。

    1. deploy_managerとしてSnowsightにサインインします。

    2. ナビゲーションメニューで Ingestion » Openflow を選択します。

    3. deployment 1を作成するには Create a deployment を選択し、USAGE 権限をdeployment1_runtime_manager_1およびdeployment1_runtime_manager_2に付与します。

    4. deployment 2を作成するには Create a deployment を選択し、USAGE 権限をdeployment2_runtime_managerに付与します。

  3. deployment 1でランタイムを作成するには、以下のステップに従います。

    1. deployment1_runtime_manager_1としてログインします。

    2. Create a runtime as described in the following sections. deployment1_runtime_manager_1 should be able to create runtimes and manage any runtimes it created within this deployment.

    3. Openflow UI で deployment1_runtime_viewer_1 を選択し、 USAGE 権限を付与します。

AWS アカウント

AWS アカウントで以下を確認してください。

  • CloudFormation スタックの作成に必要な権限を持つ AWS アカウントを持っています。

  • 組織の AWS 管理者は、CloudFormation スクリプトを実行して新しい VPC(CloudFormation が作成)または既存の VPC 内でAmazon Elastic Kubernetes Service(EKS)を設定できます。BYO-VPC(既存の VPC)の前提条件 をご参照ください。

注釈

AWS アカウントで Openflow のインストールがどのように行われるか、また、 CloudFormation テンプレートで構成されるパーミッションについては、 インストールプロセス を参照してください。

BYO-VPC (既存の VPC) の前提条件

If you want to use an existing VPC and your own subnets, ensure that you have the following:

  • Snowflakeが管理するイングレスの場合、以下を備えた2つのパブリックサブネット:

    • Different availability zones

    • 少なくとも /27 CIDR 範囲と32の利用可能な IPs 。

    • Routes for destination 0.0.0.0/0 and target internet gateway or some other egress routing to the internet.

    • Openflowにロードバランサーの作成を許可するタグ。

      • Key: kubernetes.io/role/elb

      • Value: 1

    • パブリックサブネットが他の EKS クラスターによって使用されている場合、Openflowが他のロードバランサーと一緒にロードバランサーを作成できるようにするタグです。

      • キー: kubernetes.io/cluster/{deployment-key}

      • Value: 1

    注釈

    独自のイングレスを管理することで、パブリックサブネットは不要になりますが、 AWS アカウントで追加の構成が必要になります。詳細については、 オープンフロー BYOC - カスタムイングレスの設定 をご参照ください。

  • 以下を備えた2つのプライベートサブネット:

    • Different availability zones

    • At least /24 CIDR ranges with 255 available IPs. This limits the number and scale of runtimes you can create, so it may be more appropriate to use a larger range for the deployment.

    • Connectivity to Snowflake and AWS services from Private Subnet 1 where the Openflow deployment runs.

      • 多くのオプションの中で、ルートテーブルを NAT Gateway、Transit Gateway、または PrivateLink VPC エンドポイントに接続することができます。

      • Without this connectivity, the Openflow deployment will not initialize or set up properly and no infrastructure will be provisioned.

    • Snowflake管理のイングレスの場合は、 LetsEncrypt.org へのエグレス接続で、これにより TLS 証明書がプロビジョニングされます。

Openflowの利用規約に同意します。

このステップは、あなたの組織で一度だけ必要です。

  1. ORGADMIN ロールを持つユーザーとしてSnowflakeにログインします。

  2. ナビゲーションメニューで Ingestion » Openflow を選択します。

  3. Openflow の利用規約に同意します。

クラウドにデプロイメントを作成

Snowflakeアカウントでデプロイメントを構成する

重要

ACCOUNTADMIN が Openflow を使用するために割り当てたロールで Snowflake にサインインします。

これは次のロール ACCOUNTADMIN ORGADMIN、 GLOBALORGADMIN、または SECURITYADMIN のいずれでもありません。

Openflowへのログイン時に空白の画面が表示されたり、エラー「メッセージ:無効な同意リクエスト」が表示された場合は、ロールをリストにないロールに変更します。

詳細については、 `前提条件 `_ をご参照ください。

  1. ナビゲーションメニューで Ingestion » Openflow を選択します。

  2. Launch Openflow を選択します。

  3. Openflow UI で、Create a deployment を選択します。

  4. Deployments タブで、 Create a deployment を選択します。Creating a deployment ウィザードが開きます。

  5. Prerequisites ステップで、すべての要件を満たしていることを確認し、Next を選択します。

  6. Deployment location ステップで、デプロイメントの場所として Amazon Web Services を選択し、デプロイメントの名前を入力してから Next を選択します。

  7. Configuration ステップで、以下のオプションのいずれかを選択します。

    • Managed VPC:VPC をSnowflakeに管理させたい場合は、このオプションを選択します。

    • Bring your own VPC: 既存の VPC を使用する場合は、このオプションを選択します。

AWS アカウントで CloudFormation テンプレートを適用します。

  1. AWS アカウントで、テンプレートを使用して新しい CloudFormation スタックを作成します。OpenflowデプロイメントエージェントのAmazon Elastic Compute Cloud(EC2)インスタンスが作成された後、コードスクリプトとしてインフラストラクチャを使用して インストールプロセス の残りを完了します。インストールの進捗を追跡する で説明されているように、インストールの進捗を追跡できます。

    既存の VPC を使用している場合、CloudFormation テンプレートをアップロードする際、2つのプライベートサブネットと VPC のドロップダウンリストでそれぞれの値を選択します。

SnowflakeアカウントでOpenflowのネットワークルールを作成する

このステップは、ネットワークポリシーを使用してSnowflakeへのアクセスを制御している場合にのみ必要です。ネットワークポリシーは IP アドレスがSnowflakeアカウントにアクセスする操作を制御するルールのセットです。

  1. Snowflakeアカウントに移動します。

  2. CloudFormation スタックの一部として作成された NAT ゲートウェイパブリック IP アドレスを特定します。AWS コンソールで NAT ゲートウェイを検索する、または CloudFormation スタックの出力を確認することで、これを見つけることができます。

    NAT ゲートウェイは、データプレーンエージェント(DPA)および EKS 両方のOpenflowエグレスを担います。DPA および EKS の両方が、インストールのプライベートサブネット1で を実行します。

  3. Openflowのネットワークルールを作成し、既存のネットワークポリシーに追加します。次のコードスニペットの {$NAT_GATEWAY_PUBLIC_IP} を CloudFormation スタックの一部として作成された NAT ゲートウェイパブリック IP アドレスに置き換えます。

    USE ROLE ACCOUNTADMIN;
    USE DATABASE {REPLACE_WITH_YOUR_DB_NAME};
    
    CREATE NETWORK RULE allow_openflow_deployment
    MODE = INGRESS
    TYPE = IPV4
    VALUE_LIST = ('{$NAT_GATEWAY_PUBLIC_IP}/32');
    
    Copy
  4. 現在アクティブなネットワークポリシーを検索します。

    SHOW PARAMETERS LIKE 'NETWORK_POLICY' IN ACCOUNT;
    
    Copy
  5. 出力から値列をコピーし、それを使用してネットワークルールを作成します。

    ALTER NETWORK POLICY {ENTER_YOUR_ACTIVE_NETWORK_POLICY_NAME} ADD ALLOWED_NETWORK_RULE_LIST = (allow_openflow_deployment);
    
    Copy

Openflowイベントを記録するようにイベントテーブルを設定する(必須)

次のオプションのいずれかを使用して、イベントテーブルを設定します。

  • 新しいOpenflow固有のイベントテーブルを作成します(推奨)。

    USE ROLE ACCOUNTADMIN;
    
    CREATE DATABASE IF NOT EXISTS openflow;
    USE openflow;
    CREATE SCHEMA IF NOT EXISTS openflow;
    USE SCHEMA openflow;
    
    GRANT CREATE EVENT TABLE
      ON SCHEMA openflow.openflow
      TO ROLE $role_of_deployment_owner;
    USE ROLE $role_of_deployment_owner;
    CREATE EVENT TABLE IF NOT EXISTS openflow.openflow.openflow_events;
    -- Find the Data Plane Integrations
    SHOW OPENFLOW DATA PLANE INTEGRATIONS;
    ALTER OPENFLOW DATA PLANE INTEGRATION
      $openflow_dataplane_name
      SET EVENT_TABLE = 'openflow.openflow.openflow_events';
    
    Copy
  • アカウント固有のイベントテーブルを作成します。

    USE DATABASE openflow;
    CREATE SCHEMA IF NOT EXISTS openflow.telemetry;
    CREATE EVENT TABLE IF NOT EXISTS openflow.telemetry.events;
    ALTER ACCOUNT SET EVENT_TABLE = openflow.telemetry.events;
    
    Copy
  • 既存のアカウント固有のイベントテーブルを使用します。

    USE ROLE ACCOUNTADMIN;
    ALTER ACCOUNT SET EVENT_TABLE = 'existing_database.existing_schema.existing_event_table';
    
    Copy

デプロイメントを確認する

  1. Openflow UI に移動します。デプロイメントの作成には AWS で約 45 分かかります。デプロイメントが作成されると、Openflow UI のデプロイメント タブで、デプロイメントの状態が Active と表示されます。

クラウドにランタイム環境を構築

  1. Openflow Control Plane で、 Create a runtime を選択します。Create Runtime ダイアログボックスが表示されます。

  2. Deployment ドロップダウンリストから、ランタイムを作成するデプロイメントを選択します。

  3. ランタイムの名前を入力します。

  4. Node type ドロップダウンリストからノードタイプを選択します。ノードのサイズを指定します。

  5. Min/Max node 範囲セレクターで範囲を選択します。最小値は、アイドル状態時にランタイムが開始するノード数を指定し、最大値は、データ量が多い場合や CPU ロードの場合に、ランタイムがスケールアップできるノード数を指定します。

  6. Create を選択します。ランタイムの作成には数分かかります。

作成したランタイムは、Openflow のコントロール・プレーンの Runtimes タブを開いて表示することができます。ランタイムをクリックして、Openflow キャンバスを開きます。

次のステップ

ランタイムにコネクタをデプロイします。Openflow で利用可能なコネクタのリストについては、 Openflowコネクタ をご参照ください。

ネットワークの考察:ソースシステムへのOpenflow EKS

BYOC をデプロイする場合は、次の考慮事項に注意してください。

  • オープンフロー CloudFormationスタックが1つを作成 VPC 2つのパブリックサブネットと2つのプライベートサブネットを使用します。

  • パブリックサブネットは、後で作成される AWS ネットワークロードバランサーをホストします。プライベートサブネットは EKS クラスターとすべてのノードグループをバックアップする EC2 インスタンスをホストします。Openflowランタイムはプライベートサブネット1内で実行されます。

  • NAT ゲートウェイは現在、 DPA と EKS の両方に対応しています。DPA と EKS の両方が、インストールのプライベートサブネット 1 で実行されます。

BYO-VPC をデプロイする場合は、次の考慮事項に注意してください。

  • Openflowでは、Openflowを実行する2つのプライベートサブネットと、 AWS ロードバランサーの2つのパブリックサブネットを入力する必要があります。

  • これらのプライベートサブネットからインターネットへの独自のエグレスルーティングを提供する必要があります。そのために、中央の NATGatewayを利用できます。

  • Openflowによってインターネットゲートウェイは作成されません。適切なパブリックインターネットエグレスルーティングを提供する必要があります。

The network connectivity generally is as follows: An Openflow EC2 Instance (Agent or EKS) runs in a private subnet that requires Route Table entries to send egress traffic to a Transit Gateway, a PrivateLink VPC Endpoint, or a NAT Gateway connected to an Internet Gateway.

例: 同じアカウントの別の VPC の RDS と通信するための新しい VPC の BYOC デプロイメント。

Openflow EKS クラスタと RDS インスタンス間の通信を有効にするには、 EKS クラスタのセキュリティグループを RDS 接続のインバウンドルールのソースとして新しいセキュリティグループを作成し、 RDS にグループをアタッチする必要があります。

  1. EKS クラスタリングセキュリティグループを見つけ、 EKS に移動し、デプロイメントキーを見つけます。また、Openflow UI では、次のようなパフォーマンスで見つけることができます。

    1. Openflow にサインインします。

    2. Deployments タブを開きます。

    3. デプロイメントの横にある[その他のオプション]アイコンを選択します。

    4. View details を選択します。フィールド Key の値がデプロイメントキーです。

  2. デプロイメント キーを見つけたら、そのキーを使用して、 AWS リソースをキー値でフィルターできます。

  3. Openflow EKS クラスタへの関連データベースポート(デフォルトでは PostgreSQL の場合は 5432)でのアクセスを許可する新しいセキュリティグループを作成します。

  4. RDS で、新しいセキュリティグループとしてアタッチします。

トラブルシューティングが必要な場合は、 Reachability Analyzer が便利です。AWS プラットフォーム内のトレース機能を使用することで、接続をブロックしている可能性のある詳細情報を提供します。

VPC ピアリングを使用した DB インスタンスへのアクセスおよび関連するセキュリティグループの構成については、以下の AWS のドキュメントを参照してください。

プライベートデプロイメントの構成

プライベートデプロイは、パブリックのインターネットのイングレスまたはエグレスなしでOpenflowを VPC にデプロイできる機能です。

プライベートデプロイメントを構成するには、新しいデプロイメントを作成するときに以下のオプションを選択する必要があります。

  1. Deployment location のステップで、デプロイメントの場所として:ui:Amazon Web Services を選択します。

  2. VPC Configuration ステップで、 既存の VPC を使用するには :ui:`Bring your own VPC`を選択します。

  3. PrivateLink のステップで、PrivateLink 機能を有効にします。このオプションを有効にするには、AWS アカウントで追加設定する必要があります。詳細については、AWS の ` PrivateLink 構成`_ をご参照ください。その End user authentication over PrivateLink オプションは有効または無効にすることができます。

  4. In the Custom ingress step, enable the custom ingress feature. Enabling this option requires additional setup in your AWS account. For more information, see オープンフロー BYOC - カスタムイングレスの設定.

プライベート展開では、既存の VPC は以下のドメインにアクセスできます。

  • :code:`*.amazonaws.com`には、アクセスされているサービスの詳細なリストが含まれます。

    • com.amazonaws.iam

    • com.amazonaws.<your-region>.s3

    • com.amazonaws.<your-region>.ac2

    • com.amazonaws.<your-region>.ecr.api

    • com.amazonaws.<your-region>.ecr.dkr

    • com.amazonaws.<your-region>.secretsmanager

    • com.amazonaws.<your-region>.sts

    • com.amazonaws.<your-region>.eks

    • com.amazonaws.<your-region>.autoscaling

  • *.privatelink.snowflakecomputing.com

  • oidc-eks.<your-region>.api.aws

  • shield.us-east-1.amazonaws.com

設置プロセス

CloudFormation スタックと Openflow Agent の間には、 BYOC のデプロイメント インストール プロセスが管理するいくつかの調整ステップがあります。目標は、 BYOC のデプロイメントに入力を提供する簡単な方法を提供するコールドスタート(CloudFormation を介して解決)と、デプロイメントの構成と、時間の経過とともに変更する必要があるコアソフトウェアコンポーネント(Openflow Agentによって解決)の間の責任を分離することです。

デプロイメント エージェントは、Openflow デプロイメント インフラストラクチャの作成と、デプロイメント サービスを含むデプロイメント ソフトウェア コンポーネントのインストールを容易にします。デプロイメントエージェントは、Snowflake システムイメージレジストリで認証を使用して Openflow コンテナーイメージを取得します。

手順は以下の通り。

注釈

BYO-VPC を使用する場合、 VPC ID と2つのプライベートサブネット IDs を Template から選択します。CloudFormation スタックでは、ステップ 1a, 1b, 1c で述べたリソースを作成するのではなく、選択したものを使用します。

  1. CloudFormation テンプレートは以下を作成し、 AWS パーミッションの構成 で述べた AWS パーミッションで構成します。

    1. 2つのパブリックサブネットと2つのプライベートサブネットがある1つの VPCパブリックサブネットは AWS ネットワークロードバランサー(後で作成)をホストします。プライベート サブネットは EKS クラスタと、 NodeGroups をバックする EC2 インスタンスをすべてホストします。Openflow ランタイムはプライベートサブネット内で実行されます。

    2. VPC からのイグレスのためのインターネットゲートウェイ。

    3. NAT プライベートサブネットからのイグレスのためのゲートウェイ

    4. ユーザーが入力した OIDC 構成の AWS Secrets Managerエントリ

    5. IAM ロールおよびインスタンスプロファイルは、Openflow Agent が EC2 インスタンスから使用します。

    6. An EC2 instance for Openflow deployment agent, complete with a UserData script to automatically run the initialization process. This script sets environment variables for the Openflow deployment agent to use, derived from the input CloudFormation parameters.

    7. EC2 Instance Connect endpoint for the Openflow deployment agent to upgrade the deployment when needed.

      • When using BYO-VPC, by default the CloudFormation stack will create an EC2 Instance Connect endpoint. However, this default behavior can be modified. When using the managed VPC option, the CloudFormation stack will always create an EC2 Instance Connect endpoint.

      • Instance Connect エンドポイントは、多数の VPCs で共有できます。

      • 配置が削除されると、 CloudFormation スタックが削除される と共に、エンドポイントも削除されます。エンドポイントが共有されている場合、他の BYO-VPC エージェントへのアクセスをブロックします。

      • EC2 Instance Connect エンドポイントを追加するには、 AWS アカウントで以下の手順を実行します。

        1. 左側のナビゲーションで、VPC » Endpoints に移動します。

        2. Create Endpoint を選択します。

        3. Choose the endpoint type as EC2 Instance Connect Endpoint.

        4. VPC を選択します。デフォルトのセキュリティグループ(VPC)を使用するには、すべてのセキュリティグループをクリア(選択しない)のままにします。

        5. サブネットを選択する場合は、 CloudFormation パラメーターでプライベートサブネット1と同じ値を使用します。

        6. Select Create. It takes approximately 5 minutes for the endpoint to be created.

    8. Openflow AgentのTerraformの状態、ログ、出力を保存するS3バケット

  2. Openflow デプロイメント エージェントは以下を作成します。

    1. EKS クラスタリング灰かを含みます。

    • ノードグループ

    • オートスケーリンググループ

    • AWS VPC コンテナネットワークインターフェース(CNI)アドオン

    • Amazon Elastic Block Store(EBS)CSI アドオン

    1. PostgreSQL、 OAuth 認証などのシークレットマネージャの記録。

    2. IAM 様々なK8sサービスアカウントのポリシーとロールを AWS Secrets Managerからシークレットを取得します。

    3. K8sコンポーネント

    • 名前空間

    • クラスタオートスケーラー

    • EBS CSI 拡張可能ストレージ

    • AWS ロードバランサーコントローラーは、一般にアクセス可能なネットワークロードバランサーを作成します。

    • Let's Encrypt認証発行者

    • Let's Encrypt用に構成されたNginx Ingress

    • メトリクスサーバー

    • Jetstack からの認証管理

    • 外部シークレット演算子

    • Temporal、deployment service、および OIDC

    • Temporal、デプロイメント・サービス、および OIDC

    • Temporalとdeploymentサービスの外部シークレット。OIDC の外部シークレットはランタイム・オペレーターによって作成・管理されます。

    • PostgreSQL

    • ランタイムノード間の通信のための自己署名証明書発行者とイングレスの構成

    • Openflow ランタイム演算子

    • Openflowデプロイメントサービス

デフォルトでは、すべての AWS アカウントには、リージョンごとに 5 つの Elastic IP アドレスの割り当てがあります。これは、パブリック (IPv4) インターネットアドレスが希少なパブリックリソースであるためです。Snowflakeでは、主にインスタンス障害時にアドレスを別のインスタンスにリマップできるElastic IP アドレスを使用し、その他のノード間通信には DNS ホスト名を使用することを強く推奨しています。

インストールの進捗を追跡

CloudFormation スタックが CREATE_COMPLETE の状態に移行すると、Openflow Agent が残りのインフラを自動的に作成します。

次のような、1つにつき10~15分かかるステップがいくつかあります。

  1. EKS クラスタの作成

  2. EKS クラスタリングへの EBS CSI アドオンのインストール

  3. RDS PostgreSQL データベースの作成

Openflow エージェントのステータスレポートはまだ可用性はありません。その間、Openflow エージェントのログを表示し、 BYOC のデプロイがランタイムの準備ができているかどうかを確認できます。そのためには、以下のステップを実行してください。

  1. EC2 インスタンスリストで、以下の2つのインスタンスを探します。

    • openflow-agent-{data-plane-key}:ランタイムの管理に使用する Openflow Agent です。

    • {data-plane-key}-mgmt-group:これは、 BYOC 配置の EKS クラスタ内のノードで、演算子およびその他のコア ソフトウェアを実行します。

  2. openflow-agent-{data-plane-key} インスタンスを右クリックし、 Connect を選択します。

  3. EC2 Instance Connect から Connect using EC2 Instance Connect Endpoint に切り替えます。デフォルトの EC2 インスタンス接続エンドポイントはそのままにしておきます。

  4. Click Connect. A new browser tab or window will appear with a command-line interface.

  5. 以下のコマンドを実行して、デプロイを構成しているdockerイメージのインストールログを尾行します。

    journalctl -xe -f -n 100 -u docker
    
    Copy
  6. インストールが完了すると、次のような出力が表示されます。

    {timestamp} - app stack applied successfully
    {timestamp} - All resources applied successfully
    

AWS パーミッションの構成

このセクションでは、ロールに基づいて Openflow BYOC スタックで構成される AWS 権限のリストを示します。

注釈

{key} は、特定のデプロイメントに対して Openflow が作成および管理するクラウド リソースを一意に識別するデプロイメント キーを表します。

管理者ユーザー

cloudformation および以下のすべての権限。

IAM ロール: openflow-agent-role-{key}

{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "autoscaling:DescribeTags",
               "ec2:DescribeImages",
               "ec2:DescribeInstances",
               "ec2:DescribeLaunchTemplates",
               "ec2:DescribeLaunchTemplateVersions",
               "ec2:DescribeNetworkInterfaces",
               "ec2:DescribeSecurityGroups",
               "ec2:DescribeSubnets",
               "ec2:DescribeTags",
               "ec2:DescribeVolumes",
               "ec2:DescribeVpcs",
               "ec2:DescribeVpcAttribute",
               "iam:GetRole",
               "iam:GetOpenIDConnectProvider",
               "ecr:GetAuthorizationToken",
               "ec2:RunInstances",
               "ec2:CreateLaunchTemplate",
               "ec2:CreateSecurityGroup",
               "ec2:CreateTags",
               "ec2:DeleteTags"
            ],
            "Resource": "*",
            "Effect": "Allow"
      },
      {
            "Condition": {
               "StringLike": {
                  "aws:ResourceTag/Name": [
                        "{key}-oidc-provider"
                  ]
               }
            },
            "Action": [
               "iam:CreateOpenIDConnectProvider",
               "iam:DeleteOpenIDConnectProvider",
               "iam:TagOpenIDConnectProvider"
            ],
            "Resource": "arn:aws:iam::{Account_ID}:oidc-provider/oidc.eks.{Region}.amazonaws.com/id/*",
            "Effect": "Allow"
      },
      {
            "Action": [
               "iam:DeletePolicy",
               "iam:CreatePolicy",
               "iam:GetPolicy",
               "iam:GetPolicyVersion",
               "iam:ListPolicyVersions"
            ],
            "Resource": [
               "arn:aws:iam::{Account_ID}:policy/dp-service-role-policy-{key}",
               "arn:aws:iam::{Account_ID}:policy/oauth2-role-policy-{key}",
               "arn:aws:iam::{Account_ID}:policy/temporal-service-role-policy-{key}",
               "arn:aws:iam::{Account_ID}:policy/oidc-service-role-policy-{key}",
               "arn:aws:iam::{Account_ID}:policy/dps-temporal-role-policy-{key}"
               "arn:aws:iam::{Account_ID}:policy/dps-postgres-role-policy-{key}"
            ],
            "Effect": "Allow"
      },
      {
            "Action": [
               "iam:UpdateAssumeRolePolicy",
               "iam:PutRolePolicy",
               "iam:ListInstanceProfilesForRole",
               "iam:ListAttachedRolePolicies",
               "iam:ListRolePolicies",
               "iam:GetRolePolicy",
               "iam:CreateRole",
               "iam:AttachRolePolicy",
               "iam:DeleteRole",
               "iam:DeleteRolePolicy",
               "iam:DetachRolePolicy",
               "iam:TagRole"
            ],
            "Resource": [
               "arn:aws:iam::{Account_ID}:role/openflow-agent-role-{key}",
               "arn:aws:iam::{Account_ID}:role/{key}-*",
               "arn:aws:iam::{Account_ID}:role/dps-temporal-role-{key}",
               "arn:aws:iam::{Account_ID}:role/dps-postgres-role-{key}",
               "arn:aws:iam::{Account_ID}:role/dp-service-role-{key}",
               "arn:aws:iam::{Account_ID}:role/oauth2-role-{key}",
               "arn:aws:iam::{Account_ID}:role/oidc-service-role-{key}"
            ],
            "Effect": "Allow"
      },
      {
            "Action": [
               "autoscaling:CreateOrUpdateTags",
               "autoscaling:DeleteTags"
            ],
            "Resource": "arn:aws:autoscaling:{Region}:{Account_ID}:autoScalingGroup:*:autoScalingGroupName/eks-{key}-*",
            "Effect": "Allow"
      },
      {
            "Condition": {
               "StringLike": {
                  "aws:ResourceTag/Name": [
                        "{key}-EC2SecurityGroup-*",
                        "k8s-traffic-{key}-*",
                        "eks-cluster-sg-{key}-*",
                        "{key}-cluster-sg",
                        "postgres-{key}-sg"
                  ]
               }
            },
            "Action": [
               "ec2:AuthorizeSecurityGroupEgress",
               "ec2:AuthorizeSecurityGroupIngress",
               "ec2:RevokeSecurityGroupEgress",
               "ec2:DeleteSecurityGroup",
               "ec2:CreateTags",
               "ec2:DeleteTags",
               "ec2:CreateNetworkInterface",
               "ec2:DeleteNetworkInterface"
            ],
            "Resource": "arn:aws:ec2:{Region}:{Account_ID}:security-group/*",
            "Effect": "Allow"
      },
      {
            "Condition": {
               "StringLike": {
                  "aws:ResourceTag/elbv2.k8s.aws/cluster": "{key}"
               }
            },
            "Action": [
               "ec2:AuthorizeSecurityGroupEgress",
               "ec2:AuthorizeSecurityGroupIngress",
               "ec2:RevokeSecurityGroupEgress",
               "ec2:DeleteSecurityGroup",
               "ec2:CreateTags",
               "ec2:DeleteTags",
               "ec2:CreateNetworkInterface",
               "ec2:DeleteNetworkInterface"
            ],
            "Resource": "arn:aws:ec2:{Region}:{Account_ID}:security-group/*",
            "Effect": "Allow"
      },
      {
            "Action": [
               "ec2:CreateSecurityGroup"
            ],
            "Resource": "arn:aws:ec2:{Region}:{Account_ID}:vpc/vpc-018d2da0fde903de4",
            "Effect": "Allow"
      },
      {
            "Condition": {
               "StringLike": {
                  "ec2:ResourceTag/Name": "openflow-agent-{key}"
               }
            },
            "Action": [
               "ec2:AttachNetworkInterface"
            ],
            "Resource": "arn:aws:ec2:{Region}:{Account_ID}:instance/*",
            "Effect": "Allow"
      },
      {
            "Condition": {
               "StringLike": {
                  "aws:ResourceTag/Name": "{key}-*-group"
               }
            },
            "Action": [
               "ec2:DeleteLaunchTemplate"
            ],
            "Resource": "arn:aws:ec2:{Region}:{Account_ID}:launch-template/*",
            "Effect": "Allow"
      },
      {
            "Action": [
               "eks:CreateCluster",
               "eks:CreateAccessEntry",
               "eks:CreateAddon",
               "eks:CreateNodegroup",
               "eks:DeleteCluster",
               "eks:DescribeCluster",
               "eks:ListClusters",
               "eks:ListNodeGroups",
               "eks:DescribeUpdate",
               "eks:UpdateClusterConfig",
               "eks:TagResource"
            ],
            "Resource": "arn:aws:eks:{Region}:{Account_ID}:cluster/{key}",
            "Effect": "Allow"
      },
      {
            "Action": [
               "eks:DescribeAddon",
               "eks:DescribeAddonVersions",
               "eks:UpdateAddon",
               "eks:DeleteAddon",
               "eks:DescribeUpdate"
            ],
            "Resource": "arn:aws:eks:{Region}:{Account_ID}:addon/{key}/*",
            "Effect": "Allow"
      },
      {
            "Action": [
               "eks:DeleteNodegroup",
               "eks:DescribeNodegroup",
               "eks:ListNodegroups",
               "eks:UpdateNodegroupConfig",
               "eks:TagResource",
               "eks:DescribeUpdate"
            ],
            "Resource": "arn:aws:eks:{Region}:{Account_ID}:nodegroup/{key}/*",
            "Effect": "Allow"
      },
      {
            "Action": [
               "s3:CreateBucket",
               "s3:ListBucket"
            ],
            "Resource": "arn:aws:s3:::byoc-tf-state-{key}",
            "Effect": "Allow"
      },
      {
            "Action": [
               "s3:DeleteObject",
               "s3:GetObject",
               "s3:PutObject"
            ],
            "Resource": "arn:aws:s3:::byoc-tf-state-{key}/*",
            "Effect": "Allow"
      },
      {
            "Action": [
               "secretsmanager:CreateSecret",
               "secretsmanager:DeleteSecret",
               "secretsmanager:DescribeSecret",
               "secretsmanager:GetResourcePolicy",
               "secretsmanager:GetSecretValue",
               "secretsmanager:PutSecretValue",
               "secretsmanager:UpdateSecretVersionStage"
            ],
            "Resource": "arn:aws:secretsmanager:{Region}:{Account_ID}:secret:*-{key}*",
            "Effect": "Allow"
      },
      {
            "Action": [
               "ecr:BatchCheckLayerAvailability",
               "ecr:BatchGetImage",
               "ecr:DescribeImages",
               "ecr:DescribeRepositories",
               "ecr:GetDownloadUrlForLayer",
               "ecr:ListImages"
            ],
            "Resource": "arn:aws:ecr:{Region}:{Account_ID}:*",
            "Effect": "Allow"
      },
      {
            "Action": [
               "ecr:CreateRepository",
               "ecr:CompleteLayerUpload",
               "ecr:InitiateLayerUpload",
               "ecr:PutImage",
               "ecr:UploadLayerPart"
            ],
            "Resource": "arn:aws:ecr:{Region}:{Account_ID}:repository/snowflake-openflow/*",
            "Effect": "Allow"
      },
      {
            "Condition": {
               "StringLike": {
                  "iam:AWSServiceName": "eks.amazonaws.com"
               }
            },
            "Action": [
               "iam:CreateServiceLinkedRole"
            ],
            "Resource": "arn:aws:iam::*:role/aws-service-role/eks.amazonaws.com/AWSServiceRoleForAmazonEKS",
            "Effect": "Allow"
      },
      {
            "Condition": {
               "StringLike": {
                  "iam:AWSServiceName": "eks-nodegroup.amazonaws.com"
               }
            },
            "Action": [
               "iam:CreateServiceLinkedRole"
            ],
            "Resource": "arn:aws:iam::*:role/aws-service-role/eks-nodegroup.amazonaws.com/AWSServiceRoleForAmazonEKSNodegroup",
            "Effect": "Allow"
      },
      {
            "Action": [
               "eks:AssociateAccessPolicy",
               "eks:ListAssociatedAccessPolicies",
               "eks:DisassociateAccessPolicy"
            ],
            "Resource": "arn:aws:eks:{Region}:{Account_ID}:access-entry/{key}/*",
            "Effect": "Allow"
      },
      {
            "Action": "iam:PassRole",
            "Resource": "*",
            "Effect": "Allow"
      }
   ]
}
Copy

IAM ロール: {key}-cluster-ServiceRole

AWS 管理ポリシー。

  • AmazonEKSClusterPolicy

  • AmazonEKSVPCResourceController

{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "cloudwatch:PutMetricData"
            ],
            "Effect": "Allow",
            "Resource": "*"
      }
   ]
}
{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "ec2:DescribeAccountAttributes",
               "ec2:DescribeAddresses",
               "ec2:DescribeInternetGateways"
            ],
            "Effect": "Allow",
            "Resource": "*"
      }
   ]
}
Copy

IAM ロール: {key}-addon-vpc-cni-Role

AWS 管理ポリシー。

  • Amazon EKS_CNI_P ポリシー

IAM ロール: {key}-eks-role

AWS 管理ポリシー。

  • AmazonEBSCSIDriverPolicy

  • AmazonEC2ContainerRegistryReadOnly

  • Amazon EKS_CNI_P ポリシー

  • AmazonEKSWorkerNodePolicy

  • AmazonSSMManagedInstanceCore

  • AutoScalingFullAccess

  • ElasticLoadBalancingFullAccess

{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "ec2:CreateSecurityGroup",
               "ec2:CreateTags"
            ],
            "Effect": "Allow",
            "Resource": [
               "arn:aws:ec2:{Region}:{Account_ID}:security-group/*",
               "arn:aws:ec2:{Region}:{Account_ID}:vpc/{VPC_ID}"
            ],
            "Sid": "CreateOpenflowEKSSecurityGroupAndTags"
      },
      {
            "Action": [
               "ec2:AuthorizeSecurityGroupIngress",
               "ec2:DeleteSecurityGroup"
            ],
            "Condition": {
               "StringLike": {
                  "aws:ResourceTag/Name": "eks-cluster-sg-{key}-*"
               }
            },
            "Effect": "Allow",
            "Resource": [
               "arn:aws:ec2:{Region}:{Account_ID}:security-group/*"
            ],
            "Sid": "OpenflowManageEKSSecurityGroup"
      }
   ]
}
Copy

注釈

{VPC_ID} は、 BYOC によって作成されたか、 BYO-VPC によって使用された VPC の識別子を表します。

IAM ロール: oidc-service-role-{key}

{
   "Statement": [
      {
            "Action": [
               "secretsmanager:GetSecretValue",
               "secretsmanager:DescribeSecret",
               "secretsmanager:GetResourcePolicy",
               "secretsmanager:ListSecretVersionIds"
            ],
            "Effect": "Allow",
            "Resource": [
               "arn:aws:secretsmanager:{Region}:{Account_ID}:secret:oidc-{key}*"
            ]
      }
   ],
   "Version": "2012-10-17"
}
Copy

IAM ロール: dps-postgres-role-{key}

{
   "Statement": [
      {
            "Action": [
               "secretsmanager:GetSecretValue",
               "secretsmanager:DescribeSecret",
               "secretsmanager:GetResourcePolicy",
               "secretsmanager:ListSecretVersionIds"
            ],
            "Effect": "Allow",
            "Resource": [
               "arn:aws:secretsmanager:{Region}:{Account_ID}:secret:postgres_creds-{key}*"
            ]
      }
   ],
   "Version": "2012-10-17"
}
Copy

IAM ロール: dps-temporal-role-{key}

{
   "Statement": [
      {
            "Action": [
               "secretsmanager:GetSecretValue",
               "secretsmanager:DescribeSecret",
               "secretsmanager:GetResourcePolicy",
               "secretsmanager:ListSecretVersionIds"
            ],
            "Effect": "Allow",
            "Resource": [
               "arn:aws:secretsmanager:{Region}:{Account_ID}:secret:temporal_creds-{key}*"
            ]
      }
   ],
   "Version": "2012-10-17"
}
Copy

IAM ロール: dp-service-role-{key}

{
   "Statement": [
      {
            "Action": [
               "secretsmanager:GetSecretValue",
               "secretsmanager:DescribeSecret",
               "secretsmanager:GetResourcePolicy",
               "secretsmanager:ListSecretVersionIds"
            ],
            "Effect": "Allow",
            "Resource": [
               "arn:aws:secretsmanager:{Region}:{Account_ID}:secret:dps_creds-{key}*",
               "arn:aws:secretsmanager:{Region}:{Account_ID}:secret:snowflake-oauth2-{key}*"
            ]
      }
   ],
   "Version": "2012-10-17"
}
Copy

IAM ロール: oauth2-role-{key}

{
   "Statement": [
      {
            "Action": [
               "secretsmanager:GetSecretValue",
               "secretsmanager:DescribeSecret",
               "secretsmanager:GetResourcePolicy",
               "secretsmanager:ListSecretVersionIds"
            ],
            "Effect": "Allow",
            "Resource": [
               "arn:aws:secretsmanager:{Region}:{Account_ID}:secret:snowflake-oauth2-{key}*"
            ]
      }
   ],
   "Version": "2012-10-17"
}
Copy

IAM ロール: {key}-nodegroup-NodeInstanceRole

AWS 管理ポリシー。

  • AmazonEBSCSIDriverPolicy

  • AmazonEC2ContainerRegistryReadOnly

  • Amazon EKS_CNI_P ポリシー

  • AmazonEKSWorkerNodePolicy

  • AmazonSSMManagedInstanceCore

  • AutoScalingFullAccess

  • ElasticLoadBalancingFullAccess

{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "servicediscovery:CreateService",
               "servicediscovery:DeleteService",
               "servicediscovery:GetService",
               "servicediscovery:GetInstance",
               "servicediscovery:RegisterInstance",
               "servicediscovery:DeregisterInstance",
               "servicediscovery:ListInstances",
               "servicediscovery:ListNamespaces",
               "servicediscovery:ListServices",
               "servicediscovery:GetInstancesHealthStatus",
               "servicediscovery:UpdateInstanceCustomHealthStatus",
               "servicediscovery:GetOperation",
               "route53:GetHealthCheck",
               "route53:CreateHealthCheck",
               "route53:UpdateHealthCheck",
               "route53:ChangeResourceRecordSets",
               "route53:DeleteHealthCheck",
               "appmesh:*"
            ],
            "Effect": "Allow",
            "Resource": "*"
      }
   ]
}
{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "autoscaling:DescribeAutoScalingGroups",
               "autoscaling:DescribeAutoScalingInstances",
               "autoscaling:DescribeLaunchConfigurations",
               "autoscaling:DescribeScalingActivities",
               "autoscaling:DescribeTags",
               "ec2:DescribeInstanceTypes",
               "ec2:DescribeLaunchTemplateVersions"
            ],
            "Effect": "Allow",
            "Resource": "*"
      },
      {
            "Action": [
               "autoscaling:SetDesiredCapacity",
               "autoscaling:TerminateInstanceInAutoScalingGroup",
               "ec2:DescribeImages",
               "ec2:GetInstanceTypesFromInstanceRequirements",
               "eks:DescribeNodegroup"
            ],
            "Effect": "Allow",
            "Resource": "*"
      }
   ]
}
{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "iam:CreateServiceLinkedRole"
            ],
            "Condition": {
               "StringEquals": {
                  "iam:AWSServiceName": "elasticloadbalancing.amazonaws.com"
               }
            },
            "Effect": "Allow",
            "Resource": "*"
      },
      {
            "Action": [
               "ec2:DescribeAccountAttributes",
               "ec2:DescribeAddresses",
               "ec2:DescribeAvailabilityZones",
               "ec2:DescribeInternetGateways",
               "ec2:DescribeVpcs",
               "ec2:DescribeVpcPeeringConnections",
               "ec2:DescribeSubnets",
               "ec2:DescribeSecurityGroups",
               "ec2:DescribeInstances",
               "ec2:DescribeNetworkInterfaces",
               "ec2:DescribeTags",
               "ec2:GetCoipPoolUsage",
               "ec2:DescribeCoipPools",
               "elasticloadbalancing:DescribeLoadBalancers",
               "elasticloadbalancing:DescribeLoadBalancerAttributes",
               "elasticloadbalancing:DescribeListeners",
               "elasticloadbalancing:DescribeListenerCertificates",
               "elasticloadbalancing:DescribeSSLPolicies",
               "elasticloadbalancing:DescribeRules",
               "elasticloadbalancing:DescribeTargetGroups",
               "elasticloadbalancing:DescribeTargetGroupAttributes",
               "elasticloadbalancing:DescribeTargetHealth",
               "elasticloadbalancing:DescribeTags"
            ],
            "Effect": "Allow",
            "Resource": "*"
      },
      {
            "Action": [
               "cognito-idp:DescribeUserPoolClient",
               "acm:ListCertificates",
               "acm:DescribeCertificate",
               "iam:ListServerCertificates",
               "iam:GetServerCertificate",
               "waf-regional:GetWebACL",
               "waf-regional:GetWebACLForResource",
               "waf-regional:AssociateWebACL",
               "waf-regional:DisassociateWebACL",
               "wafv2:GetWebACL",
               "wafv2:GetWebACLForResource",
               "wafv2:AssociateWebACL",
               "wafv2:DisassociateWebACL",
               "shield:GetSubscriptionState",
               "shield:DescribeProtection",
               "shield:CreateProtection",
               "shield:DeleteProtection"
            ],
            "Effect": "Allow",
            "Resource": "*"
      },
      {
            "Action": [
               "ec2:AuthorizeSecurityGroupIngress",
               "ec2:RevokeSecurityGroupIngress"
            ],
            "Effect": "Allow",
            "Resource": "*"
      },
      {
            "Action": [
               "ec2:CreateSecurityGroup"
            ],
            "Effect": "Allow",
            "Resource": "*"
      },
      {
            "Action": [
               "ec2:CreateTags"
            ],
            "Condition": {
               "Null": {
                  "aws:RequestTag/elbv2.k8s.aws/cluster": "false"
               },
               "StringEquals": {
                  "ec2:CreateAction": "CreateSecurityGroup"
               }
            },
            "Effect": "Allow",
            "Resource": "arn:aws:ec2:*:*:security-group/*"
      },
      {
            "Action": [
               "ec2:CreateTags",
               "ec2:DeleteTags"
            ],
            "Condition": {
               "Null": {
                  "aws:RequestTag/elbv2.k8s.aws/cluster": "true",
                  "aws:ResourceTag/elbv2.k8s.aws/cluster": "false"
               }
            },
            "Effect": "Allow",
            "Resource": "arn:aws:ec2:*:*:security-group/*"
      },
      {
            "Action": [
               "ec2:AuthorizeSecurityGroupIngress",
               "ec2:RevokeSecurityGroupIngress",
               "ec2:DeleteSecurityGroup"
            ],
            "Condition": {
               "Null": {
                  "aws:ResourceTag/elbv2.k8s.aws/cluster": "false"
               }
            },
            "Effect": "Allow",
            "Resource": "*"
      },
      {
            "Action": [
               "elasticloadbalancing:CreateLoadBalancer",
               "elasticloadbalancing:CreateTargetGroup"
            ],
            "Condition": {
               "Null": {
                  "aws:RequestTag/elbv2.k8s.aws/cluster": "false"
               }
            },
            "Effect": "Allow",
            "Resource": "*"
      },
      {
            "Action": [
               "elasticloadbalancing:CreateListener",
               "elasticloadbalancing:DeleteListener",
               "elasticloadbalancing:CreateRule",
               "elasticloadbalancing:DeleteRule"
            ],
            "Effect": "Allow",
            "Resource": "*"
      },
      {
            "Action": [
               "elasticloadbalancing:AddTags",
               "elasticloadbalancing:RemoveTags"
            ],
            "Condition": {
               "Null": {
                  "aws:RequestTag/elbv2.k8s.aws/cluster": "true",
                  "aws:ResourceTag/elbv2.k8s.aws/cluster": "false"
               }
            },
            "Effect": "Allow",
            "Resource": [
               "arn:aws:elasticloadbalancing:*:*:targetgroup/*/*",
               "arn:aws:elasticloadbalancing:*:*:loadbalancer/net/*/*",
               "arn:aws:elasticloadbalancing:*:*:loadbalancer/app/*/*"
            ]
      },
      {
            "Action": [
               "elasticloadbalancing:AddTags",
               "elasticloadbalancing:RemoveTags"
            ],
            "Effect": "Allow",
            "Resource": [
               "arn:aws:elasticloadbalancing:*:*:listener/net/*/*/*",
               "arn:aws:elasticloadbalancing:*:*:listener/app/*/*/*",
               "arn:aws:elasticloadbalancing:*:*:listener-rule/net/*/*/*",
               "arn:aws:elasticloadbalancing:*:*:listener-rule/app/*/*/*"
            ]
      },
      {
            "Action": [
               "elasticloadbalancing:ModifyLoadBalancerAttributes",
               "elasticloadbalancing:SetIpAddressType",
               "elasticloadbalancing:SetSecurityGroups",
               "elasticloadbalancing:SetSubnets",
               "elasticloadbalancing:DeleteLoadBalancer",
               "elasticloadbalancing:ModifyTargetGroup",
               "elasticloadbalancing:ModifyTargetGroupAttributes",
               "elasticloadbalancing:DeleteTargetGroup"
            ],
            "Condition": {
               "Null": {
                  "aws:ResourceTag/elbv2.k8s.aws/cluster": "false"
               }
            },
            "Effect": "Allow",
            "Resource": "*"
      },
      {
            "Action": [
               "elasticloadbalancing:AddTags"
            ],
            "Condition": {
               "Null": {
                  "aws:RequestTag/elbv2.k8s.aws/cluster": "false"
               },
               "StringEquals": {
                  "elasticloadbalancing:CreateAction": [
                        "CreateTargetGroup",
                        "CreateLoadBalancer"
                  ]
               }
            },
            "Effect": "Allow",
            "Resource": [
               "arn:aws:elasticloadbalancing:*:*:targetgroup/*/*",
               "arn:aws:elasticloadbalancing:*:*:loadbalancer/net/*/*",
               "arn:aws:elasticloadbalancing:*:*:loadbalancer/app/*/*"
            ]
      },
      {
            "Action": [
               "elasticloadbalancing:RegisterTargets",
               "elasticloadbalancing:DeregisterTargets"
            ],
            "Effect": "Allow",
            "Resource": "arn:aws:elasticloadbalancing:*:*:targetgroup/*/*"
      },
      {
            "Action": [
               "elasticloadbalancing:SetWebAcl",
               "elasticloadbalancing:ModifyListener",
               "elasticloadbalancing:AddListenerCertificates",
               "elasticloadbalancing:RemoveListenerCertificates",
               "elasticloadbalancing:ModifyRule"
            ],
            "Effect": "Allow",
            "Resource": "*"
      }
   ]
}
{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "route53:ChangeResourceRecordSets"
            ],
            "Effect": "Allow",
            "Resource": "arn:aws:route53:::hostedzone/*"
      }
   ]
}
{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "route53:GetChange"
            ],
            "Effect": "Allow",
            "Resource": "arn:aws:route53:::change/*"
      }
   ]
}
{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "route53:ListResourceRecordSets",
               "route53:ListHostedZonesByName"
            ],
            "Effect": "Allow",
            "Resource": "*"
      }
   ]
}
{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "ec2:CreateSnapshot",
               "ec2:AttachVolume",
               "ec2:DetachVolume",
               "ec2:ModifyVolume",
               "ec2:DescribeAvailabilityZones",
               "ec2:DescribeInstances",
               "ec2:DescribeSnapshots",
               "ec2:DescribeTags",
               "ec2:DescribeVolumes",
               "ec2:DescribeVolumesModifications"
            ],
            "Effect": "Allow",
            "Resource": "*"
      },
      {
            "Action": [
               "ec2:CreateTags"
            ],
            "Condition": {
               "StringEquals": {
                  "ec2:CreateAction": [
                        "CreateVolume",
                        "CreateSnapshot"
                  ]
               }
            },
            "Effect": "Allow",
            "Resource": [
               "arn:aws:ec2:*:*:volume/*",
               "arn:aws:ec2:*:*:snapshot/*"
            ]
      },
      {
            "Action": [
               "ec2:DeleteTags"
            ],
            "Effect": "Allow",
            "Resource": [
               "arn:aws:ec2:*:*:volume/*",
               "arn:aws:ec2:*:*:snapshot/*"
            ]
      },
      {
            "Action": [
               "ec2:CreateVolume"
            ],
            "Condition": {
               "StringLike": {
                  "aws:RequestTag/ebs.csi.aws.com/cluster": "true"
               }
            },
            "Effect": "Allow",
            "Resource": "*"
      },
      {
            "Action": [
               "ec2:CreateVolume"
            ],
            "Condition": {
               "StringLike": {
                  "aws:RequestTag/CSIVolumeName": "*"
               }
            },
            "Effect": "Allow",
            "Resource": "*"
      },
      {
            "Action": [
               "ec2:DeleteVolume"
            ],
            "Condition": {
               "StringLike": {
                  "ec2:ResourceTag/ebs.csi.aws.com/cluster": "true"
               }
            },
            "Effect": "Allow",
            "Resource": "*"
      },
      {
            "Action": [
               "ec2:DeleteVolume"
            ],
            "Condition": {
               "StringLike": {
                  "ec2:ResourceTag/CSIVolumeName": "*"
               }
            },
            "Effect": "Allow",
            "Resource": "*"
      },
      {
            "Action": [
               "ec2:DeleteVolume"
            ],
            "Condition": {
               "StringLike": {
                  "ec2:ResourceTag/kubernetes.io/created-for/pvc/name": "*"
               }
            },
            "Effect": "Allow",
            "Resource": "*"
      },
      {
            "Action": [
               "ec2:DeleteSnapshot"
            ],
            "Condition": {
               "StringLike": {
                  "ec2:ResourceTag/CSIVolumeSnapshotName": "*"
               }
            },
            "Effect": "Allow",
            "Resource": "*"
      },
      {
            "Action": [
               "ec2:DeleteSnapshot"
            ],
            "Condition": {
               "StringLike": {
                  "ec2:ResourceTag/ebs.csi.aws.com/cluster": "true"
               }
            },
            "Effect": "Allow",
            "Resource": "*"
      }
   ]
}
{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "route53:ChangeResourceRecordSets"
            ],
            "Effect": "Allow",
            "Resource": "arn:aws:route53:::hostedzone/*"
      }
   ]
}
{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "route53:ListHostedZones",
               "route53:ListResourceRecordSets",
               "route53:ListTagsForResource"
            ],
            "Effect": "Allow",
            "Resource": "*"
      }
   ]
}
Copy