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]: Ability to create a new server attached to a private subnet without having to manually manage the IP #714

Closed
mzhaase opened this issue Jul 10, 2023 · 2 comments

Comments

@mzhaase
Copy link

mzhaase commented Jul 10, 2023

What whould you like to see?

Creating a server that is reachable only via a private subnet is an extremely common use case - maybe the most common use case.

Currently, this is not possible by only using terraform at scale. One has to implement their own IPAM solution to assign IP addresses at creation time. This is not really sensible, when talking about hundreds of servers, managed by multiple independent teams.

Ideally, something similar to this would be implemented.

resource "hcloud_server" "this" {
    [...]
    public_net {
        ipv4_enabled = "false"
        ipv6_enabled = "false"
    }
    subnet_id = hcloud_subnet.this.subnet_id
}

The server would then be created, with its primary IP chosen randomly from one of the available IPs in hcloud_subnet.this.

As part of this it would also be great for subnets to have labels so we could use a data source to get the subnet_id.

@mzhaase mzhaase changed the title [Feature]: Ability to assign a new server to a private subnet without having to manually manage the IP [Feature]: Ability to create a new server attached to a private subnet without having to manually manage the IP Jul 10, 2023
@github-actions
Copy link

github-actions bot commented Oct 9, 2023

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.

@github-actions github-actions bot added the stale label Oct 9, 2023
@apricote apricote added pinned and removed stale labels Oct 9, 2023
@apricote
Copy link
Member

Hey @mzhaase,

you said:

The server would then be created, with its primary IP chosen randomly from one of the available IPs in hcloud_subnet.this.

This does not work, subnets belong to a (private) Network, and they do not contain publicly routable Primary IPs.

If you meant to assign private IP from the subnet, please see #672 for an explanation of the issue. Closing this as duplicate.

@apricote apricote closed this as not planned Won't fix, can't repro, duplicate, stale Jan 25, 2024
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