Should be able to let kops create the network resources
Closed this issue · 2 comments
There is a comment in the README that the network must be created before the kops_cluster can be created, and so the spec.networking.network_id
field is required, but kops is capable of creating network resources.
Maybe this was a limitation of kops in the past, but I think we can remove this prerequisite and let kops manage the networking resources if the network_id
is not set.
Seems reasonable, although I'm perfectly content creating the VPC outside of kops, and probably won't let kops manage my networking anyways (although others might).
In the meantime, here is how I setup my networking for kops.
https://gitlab.com/bitspur/rock8s/rock8s-cluster/-/blob/main/main/vpc.tf?ref_type=heads
https://gitlab.com/bitspur/rock8s/rock8s-cluster/-/blob/main/main/cluster.tf?ref_type=heads#L134-161
Thanks for the links. I used parts of your TF config for the aws-existing-vpc
example I added in the PR: #18
I agree, plenty of folks will want to manage the VPC outside of kOps. My motivation for adding this is to help us migrate some existing kOps clusters that were created with the kops CLI to using the Terraform provider. kOps managed the VPC for those clusters.