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

Đang mở
#734 1 bình luận 8 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
aws, typescript
Lĩnh vực
cli, cloud, infrastructure

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện vấn đề với lệnh cdk drift trên các stack được triển khai trong nhiều tài khoản AWS, sau đó so sánh cách xử lý thông tin xác thực của nó với cdk deploy và cdk diff. Công việc được xem là hoàn tất khi cdk drift đảm nhận role của tài khoản đích trước khi phát hiện drift, mà không yêu cầu thay đổi thông tin xác thực thủ công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
110
Fork
138
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
55

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của aws/aws-cdk-cli

Tất cả issue của aws/aws-cdk-cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.