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

fix(iam): immutable role cannot be used as a construct #6920

Merged
merged 3 commits into from Mar 23, 2020

Conversation

eladb
Copy link
Contributor

@eladb eladb commented Mar 21, 2020

Due to a change in how ConstructNodes are associated with Constructs in 1.29.0, ImmutableRole's "impersonation to a construct" -- by reflecting the construct's node property -- no longer works.

This change simply turns ImmutableRole into a real construct by extending the Construct base class.

This fixes the use case in #6885


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Due to a change in how `ConstructNode`s are associated with `Construct`s in 1.29.0, `ImmutableRole`'s "impersonation to a construct" -- by reflecting the construct's `node` property -- no longer works.

This change simply turns `ImmutableRole` into a real construct by extending the `Construct` base class.

This fixes the use case in #6885
@eladb eladb requested review from skinny85 and rix0rrr March 21, 2020 15:22
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Mar 21, 2020
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 7c9cb6d
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@eladb eladb changed the title fix(dam): immutable role cannot be used as a construct fix(iam): immutable role cannot be used as a construct Mar 21, 2020
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: b8e3da4
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

packages/@aws-cdk/aws-iam/lib/role.ts Outdated Show resolved Hide resolved
@eladb eladb requested a review from rix0rrr March 23, 2020 14:20
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 9e08de8
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Mar 23, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 56be032 into master Mar 23, 2020
@mergify mergify bot deleted the benisrae/fix/immutable-role-construct branch March 23, 2020 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants