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

add everyone_only as a filter for EBS snapshots #8552

Merged

Conversation

ikraemer-dd
Copy link
Contributor

@ikraemer-dd ikraemer-dd commented May 10, 2023

This PR is meant to solve the following issue: #4072

I also tested this against an AWS account where I had created 3 snapshots in ou-test: 1 public, 1 shared with another account and 1 private. I use this policy:

policies:
    - name: aws_ebs-shared-public-snaphots
      description: Find public snapshots
      resource: aws.ebs-snapshot
      filters:
        - type: cross-account
          everyone_only: True

And I get:

(.venv) $ cat resources.json
[
  {
    "Description": "public-snapshot",
    "Encrypted": false,
    "OwnerId": "REDACTED",
    "Progress": "100%",
    "SnapshotId": "snap-REDACTED",
    "StartTime": "2023-05-04T16:38:33.861000+00:00",
    "State": "completed",
    "VolumeId": "vol-REDACTED",
    "VolumeSize": 8,
    "StorageTier": "standard",
    "c7n:CrossAccountViolations": [
      "all"
    ]
  }
]

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented May 10, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: ikraemer-dd / name: Isabelle Kraemer (3f81ebb)

@ikraemer-dd ikraemer-dd requested a review from kapilt as a code owner May 11, 2023 12:01
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 for the pr, lgtm, one minor to address.

tests/test_ebs.py Outdated Show resolved Hide resolved
@ikraemer-dd ikraemer-dd force-pushed the ikraemer/ebs-public-snapshots branch from 69d7f58 to 85a7e85 Compare May 11, 2023 13:18
@kapilt kapilt merged commit b807094 into cloud-custodian:main May 11, 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