fix : remove computed bucket name from count in gke-persistent-volume - #6261
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request simplifies the resource creation logic for GKE persistent volume service agent roles. By removing the requirement that the GCS bucket name must be provided to trigger the IAM member creation, the module becomes more flexible in scenarios where bucket information might be handled differently or is not explicitly required for the role assignment. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request simplifies the conditional logic in modules/file-system/gke-persistent-volume/main.tf by removing the var.gcs_bucket_name != null check from the count attribute of both the google_project.cluster_project data source and the google_storage_bucket_iam_member.gke_service_agent resource. There are no review comments to address, and I have no additional feedback to provide.
|
SUCCESS: FAIL: |
25421f7
into
GoogleCloudPlatform:release-candidate-v1.103.0
This pull request simplifies the conditional logic in
modules/file-system/gke-persistent-volume/main.tfby removing thevar.gcs_bucket_name != nullcheck from thecountattribute of both thegoogle_project.cluster_projectdata source and thegoogle_storage_bucket_iam_member.gke_service_agentresource.Removing
var.gcs_bucket_name != nullfrom thecountcondition resolves the plan-time failure (Error: Invalid count argument). When buckets are declared dynamically (e.g. usingrandom_suffix = true), the bucket name is an unknown value duringterraform plan, makingunknown != nullindeterminate at plan time. By scopingcountstrictly to plan-known flags (local.has_gcsfuse_storage_profileandvar.grant_gcsfuse_service_agent_role),countis deterministic, while Terraform safely defersbucket = var.gcs_bucket_nameresolution to apply time.Submission Checklist
NOTE: Community submissions can take up to 2 weeks to be reviewed.
Please take the following actions before submitting this pull request.