Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iam: addManagedPolicy is not implemented #29195

Closed
github-anis-snoussi opened this issue Feb 21, 2024 · 4 comments
Closed

iam: addManagedPolicy is not implemented #29195

github-anis-snoussi opened this issue Feb 21, 2024 · 4 comments
Assignees
Labels
@aws-cdk/aws-iam Related to AWS Identity and Access Management bug This issue is a bug. effort/medium Medium work item – several days of effort p1

Comments

@github-anis-snoussi
Copy link

Describe the issue

Running the current latest version on aws-cdk-lib (2.128.0), the Group construct static method addManagedPolicy is not implemented (as can be seen here).

This is not mentioned in the documentation here and it just fails silently which is unexpected behaviour.

Proposed (temporary) solution : it should be mentioned clearly in the documentation that this method isn't implemented yet, to prevent other people banging their heads on the wall like I did 😅.

Links

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Group.html#addwbrmanagedwbrpolicypolicy
https://github.com/aws/aws-cdk/blob/v2.80.0/packages/aws-cdk-lib/aws-iam/lib/group.ts#L95

@github-anis-snoussi github-anis-snoussi added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Feb 21, 2024
@github-actions github-actions bot added the @aws-cdk/aws-iam Related to AWS Identity and Access Management label Feb 21, 2024
@pahud
Copy link
Contributor

pahud commented Feb 21, 2024

Yes, thank you for the callout. We should get it fixed.

@pahud pahud added p1 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Feb 21, 2024
@pahud pahud changed the title Group: addManagedPolicy is not implemented iam: addManagedPolicy is not implemented Mar 14, 2024
@pahud pahud added bug This issue is a bug. and removed documentation This is a problem with documentation. labels Mar 14, 2024
@GavinZZ GavinZZ self-assigned this Mar 14, 2024
@GavinZZ
Copy link
Contributor

GavinZZ commented Mar 14, 2024

@ansnoussi Can you provide a stack example that I can reproduce the failure? After a bit investigation, addManagedPolicy is unimplemented for the abstract class GroupBase which is only extended by the Group class. In the Group class, addManagedPolicy is implemented and shouldn't cause any issue.

@xazhao
Copy link
Contributor

xazhao commented Jul 22, 2024

As @GavinZZ mentioned, addManagedPolicy is not implemented because it's in the abstract class. In the extended Group class, the function is implemented.
https://github.com/aws/aws-cdk/blob/v2.80.0/packages/aws-cdk-lib/aws-iam/lib/group.ts#L213

Close the issue for now. Feel free to re-open if you have any other questions.

@xazhao xazhao closed this as completed Jul 22, 2024
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-iam Related to AWS Identity and Access Management bug This issue is a bug. effort/medium Medium work item – several days of effort p1
Projects
None yet
Development

No branches or pull requests

4 participants