Skip to content

microvm: add --egress-allow and --egress-default-action to create (MDROP-608) - #2078

Merged
SSharma-10 merged 2 commits into
digitalocean:mainfrom
sgupta832:MDROP-608/doctl-egress-policy
Oct 27, 2026
Merged

SSharma-10 merged 2 commits into
digitalocean:mainfrom
sgupta832:MDROP-608/doctl-egress-policy

Conversation

@sgupta832

Copy link
Copy Markdown
Contributor

Lets doctl compute microvm create set a per-MicroVM egress policy, using the API field added in godo v1.233.0.

Changes

  • --egress-allow (repeatable): an exact domain, a *.example.com wildcard, or an exact IP. An IP literal becomes an ip rule; anything else becomes a domain rule. CIDR ranges, paths, ports and empty values are rejected before the request is sent.
  • --egress-default-action: deny or allow. The API defaults to deny when a policy is set.
  • Neither flag set: no policy is sent, so egress stays unrestricted (or a checkpoint restore keeps its origin's policy).
  • The policy is returned in --output json, and is available as an Egress column via --format Egress. It is not in the default table so existing table output is unchanged.
  • Bumps godo to v1.233.0.

The policy applies to public networking only and is fixed at create; the API enforces both. The microvm command group is still hidden, so there are no public docs to update.

Testing

  • Unit tests: create request carries the policy; table test for the rule parsing.
  • Integration test: compute microvm create with egress flags sends the expected egress_policy body.

Made with Cursor

@sgupta832
sgupta832 force-pushed the MDROP-608/doctl-egress-policy branch from 05ffdde to 655707f Compare October 26, 2026 13:25
…ROP-608)

Co-authored-by: Cursor <cursoragent@cursor.com>
@sgupta832
sgupta832 force-pushed the MDROP-608/doctl-egress-policy branch from 655707f to fb1e8b2 Compare October 27, 2026 08:37
@SSharma-10
SSharma-10 merged commit 92ad7fe into digitalocean:main Oct 27, 2026
6 checks passed
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

⌂ 换网址