Managing your networks and subnets
Crusoe Cloud is currently in private beta. If you do not currently have access, please request access to continue.
Creating a new VPC network
- CLI
- UI
- Terraform
Use the networking vpc-networks create
command to create a new VPC network.
crusoe networking vpc-networks create \
--name my-new-vpc-network \
--cidr 10.0.0.0/8
In order to create a VPC network via the Crusoe Cloud console:
- Visit the Crusoe Cloud console
- Click the "Network" tab in the left nav
- Click the "VPC Networks" tab underneath the "Network" title
- Click the "Create VPC Network" button
- Input a name and CIDR range for the VPC Network
- Click "Create"
To create a VPC network using the Crusoe Terraform provider, you can use the following code snippet:
terraform {
required_providers {
crusoe = {
source = "registry.terraform.io/crusoecloud/crusoe"
}
}
}
resource "crusoe_vpc_network" "my_vpc_network" {
name = "my-new-network"
cidr = "10.0.0.0/8"
}
"name" and "cidr" required arguments for the VPC network resource in the Crusoe Terraform provider.
Viewing all VPC networks
- CLI
- UI
- Terraform
Use the networking vpc-networks list
command to list existing networks.
crusoe networking vpc-networks list
In order to view networks and subnets via the Crusoe Cloud console:
- Visit the Crusoe Cloud console
- Click the "Network" tab in the left nav
To list existing VPC networks using Terraform, the following code snippet can be used to populate a Terraform data source using the Crusoe Terraform provider.
# list vpc networks
data "crusoe_vpc_networks" "networks" {}
output "crusoe_vpc_networks" {
value = data.crusoe_vpc_networks.networks
}
Update an existing VPC network
- CLI
- UI
- Terraform
Non-default VPC networks can be updated in the CLI using the networking vpc-networks update <id>
command. Currently, only the name of the non-default VPC network can be updated (using the --name
flag).
To update an existing non-default VPC network via the console:
- Visit the Crusoe Cloud console
- Click the "Network" tab in the left nav
- Click the "VPC Networks" tab underneath the "Network" title
- Navigate to the row of the VPC network you wish to update
- Click the pencil icon on the far right side of the row
- Edit the fields you wish to modify
- Click on the "Update" button to save your changes
To update a VPC network using the Crusoe Terraform provider, you can change the fields of an existing VPC network resource and run terraform apply
. The Crusoe Terraform provider will apply the changes to the VPC network.
terraform {
required_providers {
crusoe = {
source = "registry.terraform.io/crusoecloud/crusoe"
}
}
}
resource "crusoe_vpc_network" "my_vpc_network" {
name = "my-new-network" -> "new-network-name"
cidr = "10.0.0.0/8"
}
Currently, only the "name" of the VPC network can be updated. Changes to the "cidr" of the VPC network will force a re-creation of the VPC network (deletion and then creation of a new network)
Deleting a VPC network
Warning: deleting a VPC network is a permanant action that will require re-creation of the network to recover.
- CLI
- UI
- Terraform
Non-default VPC Networks can be deleted in the CLI using the networking vpc-networks delete <id>
command.
In order to delete a VPC network via the Crusoe Cloud console:
- Visit the Crusoe Cloud console
- Click the "Network" tab in the left nav
- Click the "VPC Networks" tab underneath the "Network" title
- Navigate to the row of the VPC Network you wish to delete
- Click the trash can icon on the far right side of the row
- Click the "Confirm" button
A VPC network can be deleted by using the terraform destroy
command provided by the Terraform CLI tool.
If you are having issues working with your VPC networks, please contact support.