magic-modules icon indicating copy to clipboard operation
magic-modules copied to clipboard

Update docs and tests for google_compute_firewall resource - Remove quotes for numbers in the list

Open air3ijai opened this issue 1 year ago • 1 comments

This is a follow up of the #11548 and adds similar changes to the lists in the tests and templates, to reflect more appropriately Terraform type list for google_compute_firewall resource

+ [80, 8080, "1000-2000"]
- ["80", "8080", "1000-2000"]

Release Note Template for Downstream PRs (will be copied)


air3ijai avatar Aug 28 '24 05:08 air3ijai

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

@rileykarson, 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[bot] avatar Aug 28 '24 05:08 github-actions[bot]

@rileykarson This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

github-actions[bot] avatar Aug 30 '24 09:08 github-actions[bot]

Hmm- I'd lean towards keeping it this way as the field is a list of strings: https://github.com/hashicorp/terraform-provider-google-beta/blob/f590ae668a68f3c004f621b13cb72ca3ddc5b919/google-beta/services/compute/resource_compute_firewall.go#L398-L411

Terraform does do fairly aggressive type conversion that means that your examples work, at least in HCL, but I'd mildly prefer that the official docs follow the schema types strictly so that it's clear in cases that that may not be the case like modules/CDK (maybe?)/checks.

rileykarson avatar Aug 30 '24 17:08 rileykarson

Isn't it a number or range (string)?

That story is confusing when all your code has unquoted numbers.

Screenshot 2024-08-30 at 22 10 01

ghost avatar Aug 30 '24 19:08 ghost

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

github-actions[bot] avatar Sep 03 '24 09:09 github-actions[bot]

They're valid for the reason I linked above, but I think we should stick more to the strict string type.

rileykarson avatar Sep 03 '24 19:09 rileykarson