Skip to content

Conversation

brettcurtis
Copy link
Member

@brettcurtis brettcurtis commented Aug 31, 2025

  • Updated workflow references to use OpenTofu v0.2.9 in non-production, production, and sandbox YAML files.
  • Added KMS encryption key parameter to workflows.
  • Enhanced backend configuration in backend.tofu for GCS with KMS encryption.
  • Introduced state management variables in variables.tofu for better configuration handling.

Summary by CodeRabbit

  • New Features

    • Enables encryption for Terraform/OpenTofu state and plans using a KMS key, with safe migration from unencrypted state.
    • Introduces configurable state storage (bucket, key, and prefix) via variables for flexible environment setup.
    • Adds a mechanism to force re-apply when needed.
  • Chores

    • Updates CI workflows to a newer reusable workflow version.
    • Replaces legacy passphrase usage with KMS-based configuration in CI.
    • Adds provider lock for the null provider to ensure consistent builds.

- Updated workflow references to use OpenTofu v0.2.9 in non-production, production, and sandbox YAML files.
- Added KMS encryption key parameter to workflows.
- Enhanced backend configuration in backend.tofu for GCS with KMS encryption.
- Introduced state management variables in variables.tofu for better configuration handling.
@brettcurtis brettcurtis self-assigned this Aug 31, 2025
Copy link

coderabbitai bot commented Aug 31, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Updates GitHub Actions workflows to a newer reusable workflow version with new KMS input and removed GPG secret. Introduces OpenTofu state/plan encryption via GCP KMS, switches backend settings to variables, and adds a null_resource for forced applies. Adds new state-related variables. Updates lockfile with hashicorp/null provider.

Changes

Cohort / File(s) Summary of changes
GitHub Actions workflows
.github/workflows/non-production.yml, .github/workflows/production.yml, .github/workflows/sandbox.yml
Bumps reusable workflow ref to e3c59e4 (# v0.2.9); adds input opentofu_kms_encryption_key with environment-specific KMS paths; removes gpg_passphrase secret input.
OpenTofu backend and encryption config
backend.tofu, main.tofu, variables.tofu
Backend: replaces hard-coded GCS prefix with var.state_bucket, var.state_prefix, and var.state_kms_encryption_key. Main: adds encryption config (GCP KMS key provider, AES-GCM with unencrypted migration fallback) and null_resource "force_apply" using timestamp() trigger. Variables: adds state_bucket, state_kms_encryption_key, state_prefix.
Provider lockfile
.terraform.lock.hcl
Adds provider lock for registry.opentofu.org/hashicorp/null v3.2.4 with checksums; no other entries changed.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Migrate to OpenTofu #297 — Also updates the same reusable workflow invocation and inputs, indicating a coordinated workflow version/input change.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 9f9cff3 and 64a6736.

📒 Files selected for processing (7)
  • .github/workflows/non-production.yml (1 hunks)
  • .github/workflows/production.yml (1 hunks)
  • .github/workflows/sandbox.yml (1 hunks)
  • .terraform.lock.hcl (1 hunks)
  • backend.tofu (1 hunks)
  • main.tofu (2 hunks)
  • variables.tofu (1 hunks)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch encryption

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@brettcurtis brettcurtis marked this pull request as ready for review August 31, 2025 13:28
@brettcurtis brettcurtis requested a review from a team as a code owner August 31, 2025 13:28
@brettcurtis brettcurtis merged commit d389106 into main Aug 31, 2025
5 of 6 checks passed
@brettcurtis brettcurtis deleted the encryption branch August 31, 2025 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant