Skip to content

Conversation

@dhavalbhensdadiya-crest

As part of this feature, we have added global and regional samples for below features:

  1. Create Secret With Rotation
  2. Update Secret With Rotation
  3. Remove Rotation from Secret

Please merge this PR once approved

@product-auto-label product-auto-label bot added api: secretmanager Issues related to the Secret Manager API. samples Issues that are directly related to samples. labels Jan 29, 2026
@snippet-bot
Copy link

snippet-bot bot commented Jan 29, 2026

Here is the summary of changes.

You are about to add 30 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@gemini-code-assist
Copy link

Summary of Changes

Hello @dhavalbhensdadiya-crest, 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 significantly enhances the Google Cloud Secret Manager PHP samples by introducing a wide array of new functionalities. It provides developers with practical examples for creating, updating, and managing secrets with advanced features such as time-to-live (TTL) expiration, customer-managed encryption keys (CMEK), and automated rotation policies. Furthermore, it includes samples demonstrating optimistic concurrency control using ETags for secret and secret version operations, and improved filtering capabilities for listing resources. These additions aim to streamline the development process for applications utilizing Secret Manager.

Highlights

  • Expanded Secret Management Samples: Introduced new PHP samples for Google Cloud Secret Manager, demonstrating advanced features like secret expiration (TTL), customer-managed encryption keys (CMEK), and rotation policies.
  • Comprehensive CRUD Operations: Provided samples for creating, updating, and deleting secrets with these new features, covering both global and regional configurations.
  • Optimistic Concurrency with ETags: Added samples for managing secrets and secret versions using ETags to ensure optimistic concurrency during updates and deletions.
  • Enhanced Filtering Capabilities: Included new samples for listing secrets and secret versions with filtering options.
  • Updated Documentation and Tests: The README.md was updated with necessary environment variable configurations, and extensive unit tests were added to validate all new functionalities.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize 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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. 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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@dhavalbhensdadiya-crest dhavalbhensdadiya-crest changed the title feat(secretmanager): Added samples related to Secret Expiration feat(secretmanager): Added samples related to Secret Rotation Jan 29, 2026
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 introduces a comprehensive set of samples for Secret Manager's secret expiration and rotation features, covering both global and regional secrets. The additions include creating, updating, and removing these configurations, complete with corresponding tests. The code is well-organized and the changes are a valuable addition. I have identified a few minor areas for improvement concerning coding standards and a small error in the test files, which are detailed in the specific comments.

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

Labels

api: secretmanager Issues related to the Secret Manager API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant