Merged
Conversation
Comment on lines
+217
to
+219
| if new_rules != nil { | ||
| *rules = append(*rules, *new_rules.Items...) | ||
| } |
Contributor
There was a problem hiding this comment.
I think, if the user specifies some custom nat rules, then it should override the default ones, instead of adding to them?
For example, currently, I think there is no way of closing, for example, the default port 10250 TCP
docs/usage/options.md
Outdated
| | `--ionoscloud-nat-public-ips` | If --ionoscloud-create-nat is set, change the NAT's public IPs to these values | | ||
| | `--ionoscloud-nat-lans-to-gateways` | If --ionoscloud-create-nat is set, change the NAT's mappings of LANs to Gateway IPs to these values. Must respect format `1=10.0.0.1,10.0.0.2:2=10.0.0.10` | | ||
| | `--ionoscloud-nat-flowlogs` | If --ionoscloud-create-nat is set, add flowlogs to the nat. Must respect format `name:action:direction:bucket`, | | ||
| | `--ionoscloud-nat-rules` | If --ionoscloud-create-nat is set, add rules to the NAT. Must respect format `name:type:protocol:public_ip:source_subnet:target_subnet:target_port_range_start:target_port_range_end`, to skip providing an optional value just omit it (`name:type:protocol::source_subnet:::`), not setting public IP will use the public IP of the NAT for the rule | |
Contributor
There was a problem hiding this comment.
it would be nice to add that the user can add multiple rules by separating these string models via ,
Contributor
Author
There was a problem hiding this comment.
you should add another --ionoscloud-nat-rules with a second rule and an array will be formed
using "," would result in an error if i remember correctly as the whole array is passed as a string
avirtopeanu-ionos
previously approved these changes
Sep 15, 2023
#97) * feat: added option to skip adding default nat rules, changed default target subnet * test: remove sleep, fix tests * fix: check error first * doc: updated docs with new ionoscloud-skip-default-nat-rules flag
|
Kudos, SonarCloud Quality Gate passed! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








What does this fix or implement?
fixes #93 and #46
Checklist
feat:/fix:/doc:/test:/refactor:)