Skip to content

Conversation

@sudomateo
Copy link
Contributor

Added the ability to skip creating the default VPC when calling project_create. This allows users to control every aspect of their project using automation, rather than needing to delete default VPC first.

Closes https://github.com/oxidecomputer/customer-support/issues/567.

Copy link
Contributor Author

@sudomateo sudomateo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gave things a one pass after getting the API versioning stuff to work locally.

method = POST,
path = "/v1/projects",
tags = ["projects"],
versions = VERSION_SKIP_DEFAULT_VPC..,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure if the operation_id is needed here.

method = POST,
path = "/v1/projects",
tags = ["projects"],
operation_id = "project_create",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure if the operation_id is needed here in the versioned function.

"vpc_create_params",
));

if !params.project_create.skip_default_vpc {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure if skipping parts of sagas like this is the preferred way to handle such conditional logic but it seemed to be the cleanest method here.

.await;
}

#[nexus_test(server = crate::Server)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still figuring out tests for this. It's not pretty currently.


/// Whether to skip creating the "default" VPC when the project is created.
#[serde(default)]
pub skip_default_vpc: bool,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opted to use a field that defaults to false to represent the current behavior since serialization (e.g., Go) often treats omitted booleans as false. I know this has the consequence of reading like a double negative so I'm open to suggestions here. I really want the user to understand the act of skipping the creation of the default VPC must be intentional.

@karencfv
Copy link
Contributor

karencfv commented Feb 1, 2026

This is great to see! It goes in line with an initiative from a while ago https://rfd.shared.oxide.computer/rfd/0390 . I have to wonder though, how many users want/use the default VPC? If the majority don't use it (e.g. they manage their resources via terraform or similar), would it make more sense to have an optional field that triggers the creation of a default VPC instead of a field that skips the creation of said VPC?

Added the ability to skip creating the `default` VPC when calling
`project_create`. This allows users to control every aspect of their
project using automation, rather than needing to delete `default` VPC
first.

Closes oxidecomputer/customer-support#567.
@sudomateo sudomateo force-pushed the sudomateo/lsswxqnvlnty branch from fd22224 to 299174d Compare February 1, 2026 21:53
@sudomateo
Copy link
Contributor Author

This is great to see! It goes in line with an initiative from a while ago https://rfd.shared.oxide.computer/rfd/0390.

Heck yeah! I haven't seen this previously but I have chatted with enough customers that want this feature and I feel their pain trying to use automation to manage Oxide completely without needing to add some out of band API call to delete the default VPC.

I have to wonder though, how many users want/use the default VPC? If the majority don't use it (e.g. they manage their resources via terraform or similar), would it make more sense to have an optional field that triggers the creation of a default VPC instead of a field that skips the creation of said VPC?

I don't have numbers on this personally, but with the upcoming dual-stack networking changes I have to wonder how useful it is for us to create any default networking resources in a project. It's not like we'd know whether the user will want a V4, V6, or dual-stack.

I went with the approach I did, which I'm not married to, just because it was backwards compatible in the sense that creating a project after this change will still create the default VPC as it did before. I'm open to different designs though especially if we decide to step further away from any default resources.

@karencfv
Copy link
Contributor

karencfv commented Feb 2, 2026

needing to add some out of band API call to delete the default VPC.

Ugh, yeah. That's not really great at all 😖

I don't have numbers on this personally, but with the upcoming dual-stack networking changes I have to wonder how useful it is for us to create any default networking resources in a project. It's not like we'd know whether the user will want a V4, V6, or dual-stack.

It could be useful to check in with the networking team and have a discussion on whether we want to have any default resources at all. Back when https://rfd.shared.oxide.computer/rfd/0390 was written, we didn't have customer feedback, but now we do! A simpler API is always easier to use, if users don't have to decide on default resource creation, that would be really nice.

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.

3 participants