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

[Feature]: Allow hcloud_firewall.source_ips without suffix #625

Open
Niecke opened this issue Feb 20, 2023 · 2 comments
Open

[Feature]: Allow hcloud_firewall.source_ips without suffix #625

Niecke opened this issue Feb 20, 2023 · 2 comments

Comments

@Niecke
Copy link

Niecke commented Feb 20, 2023

What whould you like to see?

Right now, it is only possible to provide source_ips for the hcloud_firewall object in the form of 1.1.1.1/32. It would be helpful to be able to provide only the ip and skip the suffix.

I tried to give ssh access from one single server that was also created with terraform and the best solution I came up with was the following:

resource "hcloud_firewall" "master_firewall" {
  name = "master-firewall"

  rule {
    direction = "in"
    protocol  = "tcp"
    port      = "22"
    source_ips = [
      format("%s/%s",hcloud_server.management.ipv4_address,"32")
    ]
  }
}
@github-actions
Copy link

This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.

@apricote
Copy link
Member

This is a useful addition and we are open to accepting PRs for this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants