(drift): cdk drift doesn't work with multi-account applications

オープン
#734 コメント 1 件 リアクション 8 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
aws, typescript

調査の方向性

まず、複数の AWS アカウントにまたがってデプロイされたスタックに対して cdk drift コマンドを実行し、問題を再現します。次に、認証情報の処理を cdk deploy および cdk diff と比較します。cdk drift が drift 検出の前にターゲットアカウントのロールを引き受け、認証情報を手動で変更する必要がなければ完了です。

索引モデルが issue の本文から書いたものです。

説明

effort/medium feature-request p2
Describe the bug

Hello 👋🏼

The cdk drift command can't be run against applications that deploy stacks across multiple AWS accounts.

We have a single CDK application where we define hundreds of stacks and deploy them across different AWS accounts from a centralised place. When we run cdk deploy or cdk diff, we use a single set of credentials, and the CDK automatically assumes cdk-{qualifier}-* roles within target accounts.

We want to use cdk drift the same way, without needing to manually assume roles ourselves.

Regression Issue
  • Select this option if this issue appears to be a regression.
Last Known Working CDK Library Version

No response

Expected Behavior

cdk drift first assumes a role in the target account, and only then runs drift detection

Current Behavior

We receive the following error: Need to perform AWS calls for account 111111111111, but the current credentials are for 222222222222

Reproduction Steps
  1. Create an application that deploys stacks across multiple AWS accounts
  2. Run cdk drift
Possible Solution

No response

Additional Information/Context

No response

AWS CDK Library version (aws-cdk-lib)

2.186.0

AWS CDK CLI version

2.1020.2

Node.js Version

v22.14.0

OS

MacOS 18

Language

Python

Language Version

3.12

Other information

No response

主要言語
TypeScript
スター
110
フォーク
138
平均マージ
1日 9時間
マージ済み PR(30日)
55

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws/aws-cdk-cli のほかの issue

aws/aws-cdk-cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。