You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there are two ways to attach an IAM policy to the default IAM role that is created with the codebuild project.
addToRolePolicy - Adds the provided policy statement to the default inline policy created with the role.
addToRoleInlinePolicy - Creates a new inline policy with the hardcoded name CodeBuildEC2Policy and adds the provided policy statement.
It would be great if the addToRoleInlinePolicy method allowed you to specify the policyName so that we could create as many inline policies as we want.
The text was updated successfully, but these errors were encountered:
I was going to create a pull request to add this functionality, but I noticed there is already a pull request that is updating that method #2662. Can this be addressed in that pull request, or should I wait until that is implemented and create a separate PR?
thanks for opening the issue. The method addToRoleInlinePolicy was exposed accidentally on Project. The intention of it was to keep it private, and that's what the PR #2662 will do. If you need that functionality, you should call it directly on the IRoleProject exposes: project.role.attachInlinePolicy(new iam.Policy(...)).
Currently there are two ways to attach an IAM policy to the default IAM role that is created with the codebuild project.
addToRolePolicy
- Adds the provided policy statement to the default inline policy created with the role.addToRoleInlinePolicy
- Creates a new inline policy with the hardcoded nameCodeBuildEC2Policy
and adds the provided policy statement.It would be great if the
addToRoleInlinePolicy
method allowed you to specify thepolicyName
so that we could create as many inline policies as we want.The text was updated successfully, but these errors were encountered: