-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 support for cloudrun ports #3748
Conversation
Hello! I am a robot who works on Magic Modules PRs. I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review. Thanks for your contribution! A human will be with you soon. @slevenick, please review this PR or find an appropriate assignee. |
After more thinking and testing, I realized this solution may not be backwards compatible. |
Why is that? Adding a new field shouldn't be a problem |
Sorry, false alarm. All tests pass as expected now. |
1 similar comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this change is causing tests to fail because the ports
field is filled out by the API if it is not specified. Adding default_from_api: true
for this field in the products/cloudrun/terraform.yaml
will mark this field as Computed
in the terraform schema, which should allow the field to be set by the API without issue
Can i run these tests locally? I made the suggested change but am not sure if i am testing correctly. My current test method is:
I did notice some lint errors unrelated to my change. I also had to manually revert some unrelated, unexpected import changes like these. |
Yes, generally that is the way to run the generated tests. I'd suggest running a more broad suite of tests occasionally to make sure that your changes don't impact other uses of the cloud run resource.
|
Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one docs change and then we are good to go!
Co-authored-by: Sam Levenick <[email protected]>
Fixes: hashicorp/terraform-provider-google#5539
API Reference:
https://cloud.google.com/run/docs/reference/rest/v1/RevisionSpec#ContainerPort
https://cloud.google.com/run/docs/reference/rest/v1/RevisionSpec#Container
Release Note Template for Downstream PRs (will be copied)