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

aws - transit-attachment - Support CloudTrail mode #7983

Merged
merged 6 commits into from
Nov 18, 2022

Conversation

pmuniswamy
Copy link
Contributor

To support CloudTrail mode policies for Resource: aws.transit-attachment

Error:

// % custodian run -v --cache-period=0 -d -s . -r us-west-2 -c tgw-vpc-attachment.yml
2022-11-03 09:33:33,900: custodian.cache:DEBUG Disabling cache
2022-11-03 09:33:33,900: custodian.commands:ERROR problem loading policy file (tgw-vpc-attachment.yml) 
error: resource:aws.transit-attachment does not support cloudtrail mode policies
2022-11-03 09:33:33,900: custodian.commands:ERROR Found 1 errors.  Exiting. 

Example:

policies:
  - name: transitgw-vpc-attachment-delete
    resource: aws.transit-attachment
    mode:
      type: cloudtrail
      events:
        - event: DeleteTransitGatewayVpcAttachment
           ids: responseElements.DeleteTransitGatewayVpcAttachmentResponse.transitGatewayVpcAttachment.transitGatewayAttachmentId
          source: ec2.amazonaws.com
    filters:
      - type: event
        key: detail.responseElements.DeleteTransitGatewayVpcAttachmentResponse.transitGatewayVpcAttachment.transitGatewayId
        op: in
        value: ["tgw-1234e7d47ebe21234"]

Issue: #6493

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 9, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: pmuniswamy / name: Praveen M (1726755)

@thisisshi
Copy link
Member

Hi, thanks for the contribution, looks like this is your first contribution. Could you please take a look at and sign the CLA linked above? Direct link here: https://api.easycla.lfx.linuxfoundation.org/v2/repository-provider/github/sign/14202841/52837350/7664/#/?version=2 Thank you!

Copy link
Member

@thisisshi thisisshi 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

@thisisshi thisisshi changed the title aws - Support CloudTrail mode for aws.transit-attachment aws - transit-attachment - Support CloudTrail mode Nov 17, 2022
@thisisshi thisisshi merged commit b768bae into cloud-custodian:master Nov 18, 2022
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.

3 participants