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 support for disable default snat #2508

Merged
merged 13 commits into from
Aug 21, 2024

Conversation

okguru1
Copy link
Contributor

@okguru1 okguru1 commented Aug 20, 2024

Adding support for disable_default_snat, which (as the name suggests) disables the default snat. This option is available on the root resource, so all this PR does is expose this option.


Checklist

I applicable, I acknowledge that I have:

  • Read the contributing guide
  • Ran terraform fmt on all modified files
  • Regenerated the relevant README.md files using tools/tfdoc.py
  • Made sure all relevant tests pass

Copy link

google-cla bot commented Aug 20, 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
Collaborator

@ludoo ludoo left a comment

Choose a reason for hiding this comment

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

Thanks for this. A couple comments below.

Main one is we work very hard to minimize the variable surface, and I would prefer not adding one variable for a tiny feature. This should be an additional optional attribute in one of the existing _config variables, possibly vpc_config as it's the one most closely related to this.

The second comment is I would prefer using a dynamic block and a null default, so that the block is transparently skipped when the attribute is not explicitly set. This prevented issues with recreation of existing clusters for other attributes, and we might want to adopt the same approache here, even just for consistency's sake.

And last, do you know if this is also supported for autopilot? If it is, we should update both cluster modules together.

@okguru1
Copy link
Contributor Author

okguru1 commented Aug 21, 2024

@ludoo thanks for the prompt feedback. adjusted the PR to utilize a dynamic block (with conditional on null), had the variable moved inside vpc_config (with default null), and aligned the autopilot module the same way.

@ludoo
Copy link
Collaborator

ludoo commented Aug 21, 2024

@ludoo thanks for the prompt feedback. adjusted the PR to utilize a dynamic block (with conditional on null), had the variable moved inside vpc_config (with default null), and aligned the autopilot module the same way.

super quick :)

@ludoo
Copy link
Collaborator

ludoo commented Aug 21, 2024

Can you pull and merge master? I cannot use your fork...

@okguru1
Copy link
Contributor Author

okguru1 commented Aug 21, 2024

Can you pull and merge master? I cannot use your fork...

yes, updated my master branch, or did you mean something else?

Copy link
Collaborator

@ludoo ludoo left a comment

Choose a reason for hiding this comment

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

last fix on redundant default optional value then this is good to go, many thanks :)

@ludoo ludoo enabled auto-merge (squash) August 21, 2024 09:22
@ludoo
Copy link
Collaborator

ludoo commented Aug 21, 2024

Thanks a lot for your patience :)

@ludoo
Copy link
Collaborator

ludoo commented Aug 21, 2024

ach, tfdoc strikes again :)

auto-merge was automatically disabled August 21, 2024 09:24

Head branch was pushed to by a user without write access

@okguru1
Copy link
Contributor Author

okguru1 commented Aug 21, 2024

ach, tfdoc strikes again :)

hahaha yea missed this, if I continue contributing I should probably make a precommit with all of these :)

@ludoo
Copy link
Collaborator

ludoo commented Aug 21, 2024

ach, tfdoc strikes again :)

hahaha yea missed this, if I continue contributing I should probably make a precommit with all of these :)

hope you do :)

@ludoo ludoo enabled auto-merge (squash) August 21, 2024 09:26
@ludoo
Copy link
Collaborator

ludoo commented Aug 21, 2024

Oh God, one more merge :) if you set your fork to allow changes from this repo I could push the button for you

@okguru1
Copy link
Contributor Author

okguru1 commented Aug 21, 2024

Oh God, one more merge :) if you set your fork to allow changes from this repo I could push the button for you

done, I have to learn how to clickops those fork permissions, will do for next times

@ludoo ludoo merged commit fe55217 into GoogleCloudPlatform:master Aug 21, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants