Skip to content
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

Add tags field to Certificate Manager Certificate for TagsR2401 #13199

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SamanthaMathews
Copy link

Add tags field to certificate resource to allow setting tags at creation time.

release-note:none

Certificate Manager: added `tags` field to `Certificate Manager Certificates` to allow setting tags for certificates at creation time
The contents of this code are entirely owned by Google LLC in accordance with the agreement between Google LLC and the third party submitting this code into Google's open source repository

Copy link

google-cla bot commented Feb 26, 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.

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.

Hello @SamanthaMathews, 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!

Summary of Changes

This pull request adds the tags field to the Certificate Manager Certificate resource, enabling users to set resource manager tags at the time of certificate creation. It includes modifications to the Certificate.yaml file to define the new tags field and adds a new test case (resource_certificate_manager_certificate_test.go) to verify the functionality of the tags field.

Highlights

  • Feature Addition: The pull request introduces the tags field to the Certificate Manager Certificate resource, allowing users to associate resource manager tags with certificates upon creation.
  • Schema Update: The Certificate.yaml file is updated to include the definition of the tags field, specifying its type as KeyValuePairs and providing a description of its usage.
  • Testing: A new test case, resource_certificate_manager_certificate_test.go, is added to validate the functionality of the tags field, ensuring that tags can be set and imported correctly.

Changelog

  • mmv1/products/certificatemanager/Certificate.yaml
    • Added the tags field to the Certificate resource definition.
    • The tags field is of type KeyValuePairs.
    • The tags field is immutable and ignored on read operations.
  • mmv1/third_party/terraform/services/certificatemanager/resource_certificate_manager_certificate_test.go
    • Created a new test case TestAccCertificateManagerCertificate_tags to verify the functionality of the tags field.
    • The test case sets tags during certificate creation and verifies that they are imported correctly.
    • The test case uses acctest helpers to bootstrap shared test tag keys and values.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 is currently in preview and 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 to provide feedback.

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.


Trivia time!

What is the maximum length of a tag key and tag value in Google Cloud Resource Manager?

Click here for the answer
Tag keys can be up to 63 characters long, and tag values can be up to 256 characters long.

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.

Copy link

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@SamanthaMathews SamanthaMathews marked this pull request as draft February 26, 2025 20:17
@github-actions github-actions bot requested a review from NickElliot February 26, 2025 20:18
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@NickElliot, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Feb 26, 2025
@SamanthaMathews SamanthaMathews changed the title Add tags field to Certificate Manager Certificate for TagsR2401tags Add tags field to Certificate Manager Certificate for TagsR2401 Feb 27, 2025
Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

let me know if you need any help with the draft -- I remember seeing you have these CLA issues previously, did you reach out to the internal tool to see what the problem was?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-approval Pull requests that need reviewer's approval to run presubmit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants