Skip to content

IPv4/v6 whitelisting#372

Open
PierreBeucher wants to merge 7 commits into
masterfrom
ip-restriction
Open

IPv4/v6 whitelisting#372
PierreBeucher wants to merge 7 commits into
masterfrom
ip-restriction

Conversation

@PierreBeucher
Copy link
Copy Markdown
Owner

No description provided.

alexjurkiewicz and others added 7 commits April 19, 2026 15:27
Previously all inbound ports were open to 0.0.0.0/0 and ::/0. This adds
a --no-restrict-to-my-ip flag (and matching interactive prompt) to
control a new restrictToMyIp option, which is enabled by default.

When enabled, the provisioner detects the user's current IPv4 and IPv6
addresses before each Pulumi run by making a request to
checkip.global.api.aws with a 5-second timeout per address family. The
resulting /32 and /128 CIDRs are passed to the Pulumi stack and used as
the security group ingress CIDR instead of the open defaults.

IPv6 is optional: if the user has no external IPv6 address the timeout
fires and IPv6 ingress rules are skipped. IPv4 is required: failure to
detect it raises an error with a hint to use --no-restrict-to-my-ip.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add description field to SimplePortDefinition interface and populate
descriptions for all Sunshine and Wolf ports. Wire description into
AWS security group ingress rule mapping.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ve IPs in CLI layer

- Replace restrictToMyIp boolean flag with allowedCidrs in state schema.
  Defaults to open access (0.0.0.0/0); stores restricted /32+/128 when
  IP restriction is enabled. Refreshed on every provision by the provisioner.
- Move IP detection to CLI layer (resolveAllowedCidrs): fetches current IP
  at create time based on --no-restrict-to-my-ip flag (default: restrict).
- Provisioner re-fetches IPs on each provision so the security group stays
  current across create and start flows. Open CIDRs are passed through as-is.
small mistake in how Scaleway was merging data in promptSpecificInput: instead of merging given common inputs, only SSH was specifically passed into final result.

Didn't cause much issue since most config appart SSH are not exposed via CLI, but did cause issue when adding IP CIDR whitelist since it was ignored.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants