scylladb / terraform-provider-scylladbcloud

Terraform provider for ScyllaDB Cloud.
https://registry.terraform.io/providers/scylladb/scylladbcloud/latest
Apache License 2.0
11 stars 10 forks source link

Drop logic for `peer_cidr_blocks` autocalculation #139

Open dkropachev opened 8 months ago

dkropachev commented 8 months ago

Currently we construct Meta.GCPBlocks from blocks.txt that we took from https://cloud.google.com/vpc/docs/subnets#ip-ranges And use this region/cidr mapping for calculating default CIDR for GCP VPC Peering.

Idea is to drop this logic entirely and force client provide CIDR.

There is one case that is going to be broken with this change, is when GCP VPC is created with auto_create_subnetworks:

resource "google_compute_network" "app" {
    name = "app"
    auto_create_subnetworks = true
}

It is broken due to absence of google_compute_subnetwork in the state and inability to import these resources automatically, which should be handled by GCP terraform provider.