Skip to content

Conversation

@Dutta78
Copy link
Contributor

@Dutta78 Dutta78 commented Aug 10, 2025

fix: use static block for secret_manager_config to prevent removal errors

Fixes: #2402

@Dutta78 Dutta78 requested review from a team, apeabody and ericyz as code owners August 10, 2025 18:30
@google-cla
Copy link

google-cla bot commented Aug 10, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@Dutta78 Dutta78 changed the title fix: replace dynamic secret_manager_config block with static block fix: [In Progress] replace dynamic secret_manager_config block with static block Aug 10, 2025
@Dutta78 Dutta78 changed the title fix: [In Progress] replace dynamic secret_manager_config block with static block fix: replace dynamic secret_manager_config block with static block Aug 10, 2025
@Dutta78 Dutta78 force-pushed the fix/secret-manager-config-dynamic-block branch 2 times, most recently from bd3a4e6 to bf82078 Compare August 10, 2025 18:56
@apeabody
Copy link
Collaborator

/gcbrun

@Dutta78
Copy link
Contributor Author

Dutta78 commented Aug 14, 2025

Hey @apeabody , let me know if this can be merged

@Dutta78 Dutta78 force-pushed the fix/secret-manager-config-dynamic-block branch 2 times, most recently from fef6ae9 to c9b8f6b Compare November 14, 2025 07:13
@Dutta78 Dutta78 force-pushed the fix/secret-manager-config-dynamic-block branch from c9b8f6b to ffd9803 Compare November 14, 2025 07:15
@Dutta78
Copy link
Contributor Author

Dutta78 commented Nov 14, 2025

Fixed the Merge Conflict. @apeabody please review. thanks.

@apeabody
Copy link
Collaborator

/gcbrun

@apeabody
Copy link
Collaborator

/gemini review

@apeabody
Copy link
Collaborator

apeabody commented Nov 14, 2025

  • lint / lint (pull_request)

Thanks @Dutta78, from the lint test:

Checking submodule's files generation
diff -r '--exclude=.terraform' '--exclude=.kitchen' '--exclude=.git' /workspace/cluster.tf /tmp/tmp.QdnjomRPbA/workspace/cluster.tf
229a230
> 
237d237
< 
diff -r '--exclude=.terraform' '--exclude=.kitchen' '--exclude=.git' /workspace/modules/beta-autopilot-private-cluster/cluster.tf /tmp/tmp.QdnjomRPbA/workspace/modules/beta-autopilot-private-cluster/cluster.tf
159d158
< 
diff -r '--exclude=.terraform' '--exclude=.kitchen' '--exclude=.git' /workspace/modules/beta-autopilot-public-cluster/cluster.tf /tmp/tmp.QdnjomRPbA/workspace/modules/beta-autopilot-public-cluster/cluster.tf
159d158
< 
diff -r '--exclude=.terraform' '--exclude=.kitchen' '--exclude=.git' /workspace/modules/beta-private-cluster-update-variant/cluster.tf /tmp/tmp.QdnjomRPbA/workspace/modules/beta-private-cluster-update-variant/cluster.tf
252d251
< 
diff -r '--exclude=.terraform' '--exclude=.kitchen' '--exclude=.git' /workspace/modules/private-cluster/cluster.tf /tmp/tmp.QdnjomRPbA/workspace/modules/private-cluster/cluster.tf
239d238
< 
Error: submodule's files generation has not been run, please run the
'make build' command and commit changes

Probably some stray whitespace, 'make build' should fix.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request consistently replaces dynamic secret_manager_config blocks with static ones across various Terraform files and templates. This change simplifies the configuration logic, making it more straightforward to enable or disable the Secret Manager addon. The corresponding output expressions have also been updated to reflect this simplification, removing unnecessary null and length checks. This is a positive change that improves code clarity and maintainability, and addresses potential issues with dynamic block removal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error when removing enable_secret_manager_addon: "Must specify a field to update" due to dynamic block removal

2 participants