I have the same issue. I tried to add a new model, then add the default VPC space I own in AWS, and it refuses. I do not see a way to verify in which aws region this VPC is from, I assume it should work with my aws credentials?
crodriguez@camille-hp:$ juju add-model spaces-test
Added 'spaces-test' model on aws/us-east-1 with credential 'camille-aws' for user 'admin'
crodriguez@camille-hp:$ juju add-space aws-vpc 172.31.0.0/16
ERROR cannot add space "aws-vpc": adding space "aws-vpc": subnet "172.31.0.0/16" not found
@camille.rodriguez I think you create a subnet in the default VPC and use that subnet.
Juju allows you to create arbitrary number of subnets inside your vpc with different access requirements and use them as needed inside your Juju models.
For a simple IGW/NAT example:
Create an IGW and a NATGW in your VPC.
Create a routing table for nat-rtg, and one for igw-rtg and add the rule for 0.0.0.0 -> igw to the igw-rtg and 0.0.0.0 -> natgw to the nat-rtg.
Create a subnet for each nat and igw in your vpc, assign each subnet the respective routing table.
Use juju to add each subnet to your model juju add-space nat <your nat cidr>, juju add-space igw <your igw cidr>
Deploy infrastructure/application to each subnet depending on what type of access you want. juju deploy ubuntu ubuntu-igw --constraints "spaces=igw", juju deploy ubuntu ubuntu-nat --constraints "spaces=nat"