-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore: set github enterprise default to null (see reason in PR) #30
Conversation
WalkthroughThe pull request introduces a default value of Changes
Possibly Related PRs
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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: 0
🧹 Nitpick comments (1)
variables.tf (1)
Line range hint
1-9
: LGTM! Consider enhancing the description.The change to set
default = null
is appropriate and aligns with the objective of making the GitHub Enterprise integration explicitly optional. This helps prevent confusion for users who don't need this integration.Consider enhancing the description to be more explicit about when this variable should be used:
variable "github_enterprise" { type = object({ namespace = string id = optional(string) }) - description = "The GitHub VCS settings" + description = "The GitHub Enterprise VCS settings. Only required when using GitHub Enterprise with a custom GitHub app integration. Leave as null for standard GitHub.com repositories." default = null }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
variables.tf
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
variables.tf (1)
Pattern **/*.tf
: You're a Terraform expert who has thoroughly studied all the documentation from Hashicorp https://developer.hashicorp.com/terraform/docs and OpenTofu https://opentofu.org/docs/.
You have a strong grasp of Terraform syntax and prioritize providing accurate and insightful code suggestions.
As a fan of the Cloud Posse / SweetOps ecosystem, you incorporate many of their best practices https://docs.cloudposse.com/best-practices/terraform/ while balancing them with general Terraform guidelines.
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.
You're right, good catch!
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 (1)
variables.tf (1)
Line range hint
19-24
: Consider enhancing the variable description.While the change is good, the description could be more informative about when this integration should be used.
Consider updating the description to:
variable "github_enterprise" { type = object({ namespace = string id = optional(string) }) - description = "The GitHub VCS settings" + description = <<-EOT + The GitHub Enterprise VCS settings. Set this only if you're using GitHub Enterprise with a custom app integration. + Leave as null for standard GitHub repositories. + EOT default = null }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
variables.tf
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
variables.tf (1)
Pattern **/*.tf
: You're a Terraform expert who has thoroughly studied all the documentation from Hashicorp https://developer.hashicorp.com/terraform/docs and OpenTofu https://opentofu.org/docs/.
You have a strong grasp of Terraform syntax and prioritize providing accurate and insightful code suggestions.
As a fan of the Cloud Posse / SweetOps ecosystem, you incorporate many of their best practices https://docs.cloudposse.com/best-practices/terraform/ while balancing them with general Terraform guidelines.
🔇 Additional comments (1)
variables.tf (1)
23-23
: LGTM! Setting default to null is appropriate here.
This change aligns well with the PR objectives by making the GitHub Enterprise integration optional. It follows Terraform best practices for handling optional complex objects and prevents confusion when the integration isn't available.
When I set it, I get the message that this integration isn't available. I believe this is available only to certain Spacelift situations when using the GitHub custom app integration, so I don't think this is most users?
According to documentation, this is only for custom GitHub app for the integration, (hence it works for our own
mp-infra
since we use our own Masterpoint app, but not others repos).But because of this, I'm thinking we set this variable default to null. Feel free to let me know if this isn't a good idea. Just a suggestion I had while using this.
References:
https://registry.terraform.io/providers/spacelift-io/spacelift/latest/docs/resources/stack#github_enterprise-1
https://spacelift.io/blog/deploying-spacelift-with-spacelift
Summary by CodeRabbit
null
for thegithub_enterprise
variable, allowing for an explicit null state when no value is provided.null
for theworker_pool_id
variable.