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

未关闭
#734 1 条评论 8 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
aws, typescript

调研方向

首先,使用 cdk drift 命令针对部署在多个 AWS 账户中的堆栈重现该问题,然后将其凭证处理方式与 cdk deploy 和 cdk diff 进行比较。当 cdk 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 小时
30 天内合并 PR
55

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

aws/aws-cdk-cli 的其他 Issue

查看 aws/aws-cdk-cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。