mirror of
https://github.com/ansible-collections/hetzner.hcloud
synced 2024-12-12 13:32:31 +00:00
fix: firewall port argument is required with udp or tcp (#345)
##### SUMMARY When managing a tcp/udp firewall rule, provide a clear error message when the port is missing from the rule. Closes #344 ##### ISSUE TYPE - Bugfix Pull Request ##### COMPONENT NAME hcloud_firewall
This commit is contained in:
parent
dc6583157d
commit
76c1abf447
2 changed files with 6 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- hcloud_firewall - The port argument is required when the firewall rule protocol is `udp` or `tcp`.
|
|
@ -314,6 +314,10 @@ class AnsibleHCloudFirewall(AnsibleHCloud):
|
|||
description={"type": "str"},
|
||||
),
|
||||
required_together=[["direction", "protocol"]],
|
||||
required_if=[
|
||||
["protocol", "udp", ["port"]],
|
||||
["protocol", "tcp", ["port"]],
|
||||
],
|
||||
),
|
||||
labels={"type": "dict"},
|
||||
state={
|
||||
|
|
Loading…
Reference in a new issue