Hello, I’m having troubles creating datastream_private_connection that connects into our VPC using PSC. Once its created, its stuck in “creating” state for around an hour (as observed in cloud console), then disappears. Any idea what could
be the issue here or how to get some logs on this? Tried creating “datastream_private_connection” both via terraform and manually via cloud console (Datastream > Private connectivity configurations), same result.
# we used non-terraform approach to create network and subnetwork,
# so describing those resources freeform.
main-vpc:
* withRoutingMode('REGIONAL')
* withAutoCreateSubnetworks(false)
europe-west4-subnet:
* main-vpc
* withIpCidrRange('10.2.0.0/16') +
* withRegion('europe-west4') +
* withPrivateIpGoogleAccess(true)
# attachment and datastream_private_connection terraform configs:
resource "google_compute_network_attachment" "datastream_attachment" {
for_each = toset(var.datastream_connections)
name = "datastream-attachment"
region = "europe-west4"
connection_preference = "ACCEPT_AUTOMATIC"
subnetworks = [
"projects/${var.project}/regions/europe-west4/subnetworks/europe-west4-subnet"
]
}
resource "google_datastream_private_connection" "datastream_private_connection" {
for_each = toset(var.datastream_connections)
display_name = each.value
private_connection_id = each.value
location = "europe-west4"
psc_interface_config {
network_attachment = google_compute_network_attachment.datastream_attachment[each.key].id
}
}
