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

Fixing the Role name to arn for Ops tool for SAM Transformation #8448

Merged
merged 7 commits into from Apr 19, 2023

Conversation

gopinjag
Copy link
Contributor

@gopinjag gopinjag commented Mar 30, 2023

The Sam template transformation for Custodian policy uses Role property value as Rolename but Role only takes arn as the pattern for reference the AWS documentation and also the SAM AWS Cloudformation documentation. .

The PR to update the Role to Role arn .

The Following uses cases are tested

  1. User passing Role name will transform it to Fn::Sub: arn:aws:iam::${AWS::AccountId}:role/<rolename>
  2. User Passing Role arn with {account_id} will transform it to Fn::Sub: arn:aws:iam::${AWS::AccountId}:role/<rolename>
  3. User Passing IAM role arn .

@gopinjag gopinjag requested a review from kapilt as a code owner March 30, 2023 16:31
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 30, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

tools/ops/policylambda.py Outdated Show resolved Hide resolved
@kapilt
Copy link
Collaborator

kapilt commented Mar 31, 2023

It looks like you'll need to amend the author in your commit for the cla tool to be able to verify correctly, it likely needs the email address associated to your GitHub login. git commit --amend --author="name <email>" on commit 3c17a3c

@gopinjag
Copy link
Contributor Author

gopinjag commented Apr 5, 2023

Addressed the commit error

@gopinjag gopinjag requested a review from kapilt April 5, 2023 18:26
tools/ops/policylambda.py Outdated Show resolved Hide resolved
tools/ops/policylambda.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@kapilt kapilt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, lgtm

@gopinjag
Copy link
Contributor Author

Addressing the lint failure

@kapilt kapilt merged commit 2930ab6 into cloud-custodian:main Apr 19, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants