-
-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor provider and encryption settings into dedicated files for improved organization and clarity #300
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
…proved organization and clarity.
WalkthroughSplits provider and Terraform configuration out of main.tofu into providers.tofu. Removes top-level terraform, provider (datadog/google), and null_resource force_apply from main.tofu while keeping module usages intact. Adds encryption (GCP KMS, AES-GCM) and required_providers plus datadog provider configuration in providers.tofu; google provider remains commented. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 0
🧹 Nitpick comments (5)
providers.tofu (5)
20-37
: Pin minimum OpenTofu version to guard feature availability.Add required_version so CI fails fast if an older CLI without encryption support runs.
terraform { + required_version = ">= 1.8.0"
44-49
: Cosmetic: fix Datadog docs link casing.Use lowercase org in the comment URL to match the source string and avoid redirects.
- # https://search.opentofu.org/provider/DataDog/datadog/latest/docs + # https://search.opentofu.org/provider/datadog/datadog/latest/docs
64-67
: Harden Datadog secrets handling.Ensure variables are marked sensitive and not defaulted in repo; env vars also work as a fallback (DATADOG_API_KEY/APP_KEY).
Outside this file:
variable "datadog_api_key" { type = string, sensitive = true } variable "datadog_app_key" { type = string, sensitive = true }
69-77
: Commented google provider stub: consider moving to docs or .tfdisabled.Keeps providers.tofu lean while retaining bootstrap guidance. Optional.
39-61
: Drop the unusednull
provider
Nonull_resource
orprovider "null"
references found in the codebase, so you can safely remove thenull
block fromrequired_providers
.
📜 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.
📒 Files selected for processing (2)
main.tofu
(0 hunks)providers.tofu
(1 hunks)
💤 Files with no reviewable changes (1)
- main.tofu
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: brettcurtis
PR: osinfra-io/google-cloud-kubernetes#55
File: regional/main.tf:0-0
Timestamp: 2024-10-08T15:39:14.063Z
Learning: When suggesting changes to Terraform module references, ensure to use specific version tags for stability and reproducibility. The user, brettcurtis, prefers using specific version tags for Terraform module references.
Learnt from: brettcurtis
PR: osinfra-io/google-cloud-kubernetes#55
File: regional/main.tf:0-0
Timestamp: 2024-07-14T11:40:35.132Z
Learning: When suggesting changes to Terraform module references, ensure to use specific version tags for stability and reproducibility. The user, brettcurtis, prefers using specific version tags for Terraform module references.
📚 Learning: 2024-10-12T15:53:20.695Z
Learnt from: brettcurtis
PR: osinfra-io/google-cloud-kubernetes#150
File: regional/cert-manager/main.tf:5-22
Timestamp: 2024-10-12T15:53:20.695Z
Learning: In this project, `.terraform.lock.hcl` and Dependabot are used to manage the provider versions, so specifying version constraints in the `required_providers` block isn't necessary.
Applied to files:
providers.tofu
🔇 Additional comments (2)
providers.tofu (2)
1-7
: Nice separation and clarity.Moving encryption/provider setup out of main and adding bootstrap notes improves organization.
11-18
: Remove list wrapping foraes_gcm
keys — OpenTofu’smethod "aes_gcm"
accepts a single key-provider reference (keys = key_provider.gcp_kms.default
), andkms_encryption_key
is the correct attribute name.Likely an incorrect or invalid review comment.
Summary by CodeRabbit
New Features
Refactor
Chores