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

CEL RelatedResourceFilter implementations #16

Open
wants to merge 121 commits into
base: cel-filter
Choose a base branch
from

Conversation

kylejohnson514
Copy link
Owner

@kylejohnson514 kylejohnson514 commented Mar 10, 2021

This PR contains CEL support to the child classes that extend the core RelatedResourceFilter.

The following child classes of RelatedResourceFilter are supported in this PR:

  • RelatedResourceFilter
    • VpcSecurityGroupFilter
    • VpcSubnetFilter
    • VpcNatGatewayFilter
    • VpcInternetGatewayFilter
    • SecurityConfigFilter
      • DevEndpointSecurityConfigFilter
      • GlueJobSecurityConfigFilter
      • GlueCrawlerSecurityConfigFilter
      • GlueWorkflowSecurityConfigFilter
    • KmsRelatedFilter
      • KmsFilter (Lambda)
      • KmsFilter (SQS)
      • KmsFilter (FSx)
      • KmsFilterFsxBackup (FSx Backup)
      • KmsFilter (SNS)
      • KmsFilter (DynamoDB Table)
      • KmsFilter (Redshift)
      • KmsFilter (Glue Security Configuration) [NOT INCLUDED - edge case, need to resolve. Will come back to address this]
      • KmsFilter (ElasticSearch Domain)
      • KmsFilter (Sagemaker Notebook Instance)
      • KmsFilter (Sagemaker Endpoint Configuration)
      • KmsFilter (DMS Replication Instance)
      • KmsFilter (Kinesis Stream)
      • KmsFilter (Kinesis Delivery Stream)
      • KmsFilter (ElastiCache Replication Group)
      • KmsFilter (EFS)
      • KmsFilter (Backup Vault)

I plan to open another PR for the remaining to fully support RelatedResourceFilter. The remaining classes include:

  • RelatedResourceFilter
    • SubnetFilter
      • 28 child classes
    • VpcFilter
      • 14 child classes
    • RelatedResourceByIdFilter
      • 2 child classes

Some of these resource-specific implementations for related resources are dependent on changes in c7nlib via cloud-custodian/cel-python#18 to pull related resources.

Also waiting on cloud-custodian/cel-python#19 to updated CEL's activation fields to be more Pythonic. Once that's merged in, this PR will need updated to reflect those new expectations, but that's a super easy fix.

… unit test to access related resource values besides tags
…low to use CEL & RelatedResource access for Security Configurations
kylejohnson514 and others added 30 commits June 2, 2021 12:06
…get_related_subnets() for HSM Cluster resources
…nused}_iam_profiles() for IAM Instance Profile resources
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.

2 participants