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

Example firewall rules json doesn't work #750

Closed
SvenBunge opened this issue May 6, 2024 · 1 comment · Fixed by #752 or #753
Closed

Example firewall rules json doesn't work #750

SvenBunge opened this issue May 6, 2024 · 1 comment · Fixed by #752 or #753
Assignees
Labels

Comments

@SvenBunge
Copy link

TL;DR

wget https://raw.githubusercontent.com/hetznercloud/cli/main/examples/firewall_rules.json
hcloud firewall create --name fw1 --rules-file firewall_rules.json

Results into: hcloud: invalid input in field 'rules' (invalid_input)

Expected behavior

Firewall with the name and the given rules from the json file applied is created

Observed behavior

command failed with hcloud: invalid input in field 'rules' (invalid_input)

Minimal working example

install hcloud 1.43.1 via homebrew on macOS 14.4.1
See TL;DR

Log output

See TL;DR

Additional information

No response

@phm07
Copy link
Contributor

phm07 commented May 8, 2024

Thanks for pointing this out! There was a bug in the code where destination IPs were not properly read from the input file, so the request would fail when there were outbound firewall rules. This is fixed once #752 is merged.
Until then, you can first create the firewall without the rules and then use hcloud firewall replace-rules --rules-file <...> to set them. replace-rules does not have this bug.

@phm07 phm07 self-assigned this May 8, 2024
phm07 added a commit that referenced this issue May 10, 2024
…752)

This PR fixes the behavior of the `--rules-file` flag when creating
firewalls. Destination IPs were not parsed correctly which lead to the
request failing when an outbound rule was specified. This was fixed and
tests for outbound rules were added.

Closes #750
phm07 pushed a commit that referenced this issue Jun 20, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.44.0](v1.43.1...v1.44.0)
(2024-06-20)


### Features

* delete multiple resources in parallel
([#761](#761))
([f2fb321](f2fb321))
* improve toml formatting
([#758](#758))
([eacb7dd](eacb7dd))
* **load-balancer:** allow specifying health check options in
add-service ([#743](#743))
([2cd08b2](2cd08b2)),
closes [#742](#742)
* new action waiting progress
([#749](#749))
([9e30f3f](9e30f3f))
* new configuration system, config subcommand
([#736](#736))
([d1c6678](d1c6678))
* **server-type:** add deprecated column to list command
([#780](#780))
([906f864](906f864))
* **server:** add default-ssh-keys option
([#759](#759))
([9b34d26](9b34d26))


### Bug Fixes

* **firewall:** 'create --rules-file' not working with outbound rules
([#752](#752))
([2f2be32](2f2be32)),
closes [#750](#750)
* network list server count format
([#783](#783))
([f69d261](f69d261))
* track progress if the terminal width allows it
([#768](#768))
([069fffe](069fffe)),
closes [#767](#767)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants