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 Filestore Instances for TagsR2401 #11555

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

SamanthaMathews
Copy link

@SamanthaMathews SamanthaMathews commented Aug 27, 2024

Add tags field to instance resource to allow setting tags on instance resources at creation time.
Part of b/364841739
release-note:none

filestore: added `tags` field to `filstore_instance` to allow setting tags for instances 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 Aug 27, 2024

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

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.

@github-actions github-actions bot requested a review from NickElliot August 27, 2024 13:00
@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Aug 27, 2024
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.

Hi, looks like the CLA is having issues despite being a Googler. Could you verify you've completed all the steps at go/cla#troubleshoot? Thanks!

Copy link

github-actions bot commented Sep 4, 2024

@GoogleCloudPlatform/terraform-team @NickElliot This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.

@@ -164,7 +193,7 @@ resource "google_filestore_instance" "instance" {
networks {
network = "default"
modes = ["MODE_IPV4"]
reserved_ip_range = "172.19.31.0/29"
reserved_ip_range = "172.19.30.0/29"
Copy link
Member

Choose a reason for hiding this comment

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

any reason to change this?

Copy link
Author

Choose a reason for hiding this comment

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

This was autochanged.

mmv1/products/filestore/Instance.yaml Show resolved Hide resolved
@abd-goog
Copy link
Member

abd-goog commented Sep 4, 2024

@SamanthaMathews please update tags in docs as well and add example usage: mmv1/third_party/terraform/website/docs/d/filestore_instance.html.markdown

You can refer to https://github.com/GoogleCloudPlatform/magic-modules/pull/11440/files#diff-5199cf2c01554435c00dd630585a1315125738f420d3a1f454430ed54aa263c4

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.

still pending resolving erroneous CLA issue -- please verify if you've completed the steps I linked above

@github-actions github-actions bot requested a review from NickElliot September 5, 2024 10:44
@SamanthaMathews SamanthaMathews marked this pull request as draft September 5, 2024 11:09
@@ -185,8 +211,37 @@ resource "google_filestore_instance" "instance" {
networks {
network = "default"
modes = ["MODE_IPV4"]
reserved_ip_range = "172.19.31.8/29"
reserved_ip_range = "172.19.31.0/29"
Copy link
Member

Choose a reason for hiding this comment

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

why this change?

@SamanthaMathews SamanthaMathews changed the title commit terraform-filestore-tags Add tags field to Filestore Instances for TagsR2401 Sep 5, 2024
resource "filestore_instnace" "my_instance" {
name = "My instance"
instance_id = "your-instance-id"
org_id = "1234567"
Copy link
Member

Choose a reason for hiding this comment

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

org_id is not a supported field in filestore_instance. Please rectify.

Copy link
Author

Choose a reason for hiding this comment

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

Done

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.

Hi, looks like the CLA is having issues despite being a Googler. Could you verify you've completed all the steps at go/cla#troubleshoot? Thanks!

Please let me know if you're completed the steps, thanks!

@modular-magician modular-magician added service/filestore and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Sep 9, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 5 files changed, 104 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 5 files changed, 105 insertions(+), 3 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 17 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_filestore_instance (11 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_filestore_instance" "primary" {
  tags = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • filestore
#### Non-exercised tests

Tests were added that are skipped in VCR:

  • TestAccFilestoreInstance_tags
    $\textcolor{red}{\textsf{Errors occurred during REPLAYING mode. Please fix them to complete your PR.}}$

View the build log

@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Sep 11, 2024
To create an instance with a tag

```hcl
resource "filestore_instnace" "my_instance" {
Copy link
Member

Choose a reason for hiding this comment

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

filestore_instance

Copy link
Author

Choose a reason for hiding this comment

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

done

modes = ["MODE_IPV4"]
reserved_ip_range = "172.19.31.0/29"
}
tags = {
Copy link
Member

Choose a reason for hiding this comment

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

Do not hardcode tags here please. Use the parameter to build the tags field. Similar to here: https://github.com/GoogleCloudPlatform/magic-modules/pull/11440/files

Copy link
Author

Choose a reason for hiding this comment

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

done

@c2thorn
Copy link
Member

c2thorn commented Sep 25, 2024

Discussing with @SamanthaMathews offline about this PR and the go rewrite migration

@NickElliot NickElliot force-pushed the terraform-filestore-tags branch from b1714d0 to b7606a2 Compare September 27, 2024 21:16
@NickElliot
Copy link
Contributor

@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Sep 27, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 4 files changed, 88 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 4 files changed, 88 insertions(+), 3 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 17 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_filestore_instance (18 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_filestore_instance" "primary" {
  tags = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • filestore
#### Non-exercised tests

Tests were added that are skipped in VCR:

  • TestAccFilestoreInstance_tags
    $\textcolor{red}{\textsf{Errors occurred during REPLAYING mode. Please fix them to complete your PR.}}$

View the build log

@SamanthaMathews SamanthaMathews force-pushed the terraform-filestore-tags branch from b7606a2 to a673e6a Compare November 21, 2024 15:43
@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Nov 21, 2024
added import statement "github.com/hashicorp/terraform-provider-google/google/envvar"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests service/filestore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants