terraform-google-k8s-gce
terraform-google-k8s-gce copied to clipboard
Subnetwork Not Found
On a new gcp project, when I run the command terraform plan, I get the below error about subnet not found.
ubuntu@bastion:/tmp/terraform-google-k8s-gce/examples/k8s-gce-nat-calico$ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
data.template_file.iptables: Refreshing state...
data.template_file.shutdown-script: Refreshing state...
data.template_file.nat-startup-script: Refreshing state...
data.google_compute_network.network: Refreshing state...
data.google_compute_subnetwork.subnet: Refreshing state...
Error: Error refreshing state: 1 error(s) occurred:
* module.k8s.data.google_compute_subnetwork.subnet: 1 error(s) occurred:
* module.k8s.data.google_compute_subnetwork.subnet: data.google_compute_subnetwork.subnet: Subnetwork Not Found
Below is the available subnets
ubuntu@bastion:/tmp/terraform-google-k8s-gce/examples/k8s-gce-nat-calico$ gcloud compute networks subnets list
NAME REGION NETWORK RANGE
default asia-northeast1 default 10.146.0.0/20
default us-west1 default 10.138.0.0/20
default southamerica-east1 default 10.158.0.0/20
default asia-east1 default 10.140.0.0/20
default asia-southeast1 default 10.148.0.0/20
default us-east4 default 10.150.0.0/20
default europe-west1 default 10.132.0.0/20
default europe-west2 default 10.154.0.0/20
default europe-west3 default 10.156.0.0/20
default australia-southeast1 default 10.152.0.0/20
default asia-south1 default 10.160.0.0/20
default us-east1 default 10.142.0.0/20
default us-central1 default 10.128.0.0/20
I haven't changed any of the files and still have the default networks.