-
-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: Adding cloud-nuke cron #4306
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughA new GitHub Actions workflow has been introduced to automate the execution of the Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub Actions
participant AWS
participant cloud-nuke
GitHub Actions->>GitHub Actions: Checkout repository
GitHub Actions->>GitHub Actions: Download & install cloud-nuke binary
GitHub Actions->>AWS: Assume AWS role using secrets
GitHub Actions->>cloud-nuke: Execute cloud-nuke (dry-run, debug, S3, config file)
cloud-nuke->>AWS: Interact with AWS S3 resources (dry-run)
cloud-nuke-->>GitHub Actions: Output results
Possibly related PRs
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (2)
.github/workflows/cloud-nuke.yml (2)
19-30
: Consider caching or a dedicated download action
Currently you’re downloading the binary on each run viawget
. You could leverageactions/cache
to avoid repeated downloads, or use a community action likeactions/download-release@v1
for clearer intent and built-in version resolution.
12-14
: Prevent overlapping runs with concurrency
To avoid collisions if one run exceeds 24 hours, consider adding aconcurrency
block at the job level:jobs: run_cloud_nuke: concurrency: group: daily-cloud-nuke cancel-in-progress: false runs-on: ubuntu-latest ...
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/cloud-nuke/config.yml
(1 hunks).github/workflows/cloud-nuke.yml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (18)
- GitHub Check: Test (Parse)
- GitHub Check: Test (Deprecated)
- GitHub Check: Test (Provider Cache Terraform 1.11)
- GitHub Check: Test (Race)
- GitHub Check: Test (AWS Terraform 1.11)
- GitHub Check: Test (AWS Tofu)
- GitHub Check: Test (AWS Terraform 1.5)
- GitHub Check: Test (Fixtures Terraform 1.11)
- GitHub Check: Build (linux/amd64)
- GitHub Check: Test (Fixtures Terraform 1.5)
- GitHub Check: Build (darwin/arm64)
- GitHub Check: Build (linux/386)
- GitHub Check: Test (Fixtures OpenTofu 1.9)
- GitHub Check: Build (linux/arm64)
- GitHub Check: Build (windows/amd64)
- GitHub Check: Test (macos)
- GitHub Check: Test (ubuntu)
- GitHub Check: Pull Request has non-contributor approval
🔇 Additional comments (4)
.github/cloud-nuke/config.yml (1)
1-2
: Validates3.timeout
format and approve syntax
The YAML structure is correct and there are no syntax errors. Please confirm that the10m
duration string is supported by cloud-nuke’s config parser (some versions require Go-duration formats or explicit units)..github/workflows/cloud-nuke.yml (3)
2-5
: Confirm daily schedule timing
cron: "0 0 * * *"
triggers at midnight UTC every day. Verify that this matches your intended maintenance window.
8-11
: Permissions scope is appropriate
Usingid-token: write
for OIDC-based AWS role assumption andcontents: read
for checkout adheres to least-privilege principles.
37-45
: Verify--older-than
unit support
Some cloud-nuke versions expect durations like24h
rather than1d
. Please check that1d
is accepted in your target version (0.40.0).
Description
Adds daily cloud-nuke cron.
Can't really test this yet. Gonna rely on review to help me determine if this is configured right, then merge it to test off main.
TODOs
Read the Gruntwork contribution guidelines.
Release Notes (draft)
Added
cloud-nuke
cron.Migration Guide
Summary by CodeRabbit
New Features
cloud-nuke
tool. The workflow runs nightly and can also be triggered manually.Chores