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

[#5534] add support for offhours fallback schedule when missing tag #6603

Conversation

bcsaller
Copy link
Contributor

@bcsaller bcsaller commented Apr 2, 2021

Adds support for offhours filters to have a fallback-schedule in the event a tag isn't present or available. The schedule uses the same format as the existing tag spec.

closes #5534

@bcsaller bcsaller requested a review from kapilt as a code owner April 2, 2021 19:44
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

@kapilt kapilt merged commit 7ec3efa into cloud-custodian:master Apr 3, 2021
@alekhya114
Copy link

Hi,
I am using the above fallback_schedule filter as follows for no prod RDS instances with tag rds_offhours:on at instance level with below policy definition

- name: Non-Prod-Off-Hours-RDS
    resource: aws.rds
    filters:
      - tag:rds_offhours: present
      - DBInstanceStatus: available
      - type: offhour
        opt-out: True
        fallback_schedule: off=(M-F,22)
    action:
      - stop

but when I run custidian run in dry-run mode It's asking for the required property offhour. If I provide it's considering only the value present at offhour key but not the fallback_schedule

Can anyone give an example of how I can achieve this with fallback_schedule

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.

AWS resources with tag restrictions can't fully use OffHours
3 participants