-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to create a private connection #821
Comments
👍 |
Does this fail even if you try running the above again (after the initial failure)? I suspect some sort of an eventual consistency issue. The same seems to be alluded to here on the terraform provider: hashicorp/terraform-provider-google#11100 (comment) |
@brunoripa have you found a solution to this? |
Hi there, I'm currently facing the same isssue. I have setup a vpc network, a GlobalAddress and it can't be found in the network when trying to create the Private Connection. |
This should work: gcp_config = pulumi.Config("gcp")
project = gcp_config.require("project")
vpc = gcp.compute.Network(
"default-812",
name="default-812",
project=project,
auto_create_subnetworks=False,
# to allow vpn broadcasting routes
routing_mode="GLOBAL",
)
us_west1_subnetwork = gcp.compute.Subnetwork(
"us-west1-subnetwork",
name="default-812-us-west1",
project=project,
region="us-west1",
ip_cidr_range="10.1.0.0/16", # Example CIDR range for the subnetwork
network=vpc.id,
private_ip_google_access=True, # Allow Google API access
)
ipv4_address = gcp.compute.GlobalAddress(
"ipv4-address",
description="IP address range to be used for private connection",
network=vpc.id,
project=project,
address_type="INTERNAL",
prefix_length=16,
purpose="VPC_PEERING", # Correct ?
)
private_vpc_peering = gcp.servicenetworking.Connection(
"private-vpc-peering",
network=vpc.id,
service="servicenetworking.googleapis.com",
reserved_peering_ranges=[ipv4_address.name],
)``` |
What happened?
In GCP, I am trying to create a private connection to a vpc I have to then deploy a CloudSQL instance (which requires a network with private access enabled).
I have the
Network
, aGlobalAddress
, and try to create theConnection
, but the script fails reporting that the address cannot be found. If I make a query usinggcloud
, the address is present.Steps to reproduce
This is part of the script I am running.
Expected Behavior
A Connection object should be created.
Actual Behavior
The script fails with the following error:
But if I execute:
Versions used
CLI
Version 3.31.0
Go Version go1.17.9
Go Compiler gc
Plugins
NAME VERSION
gcp 6.25.0
google-native 0.19.1
kubernetes 3.19.2
python unknown
Host
OS ubuntu
Version 20.04
Arch x86_64
This project is written in python (/nix/store/5dpzdxcq5vc4dh1kyg9igcailvi1qmlk-python3-3.9.12-env/bin/python3 v3.9.12)
Current Stack: loadtest
TYPE URN
pulumi:pulumi:Stack urn:pulumi:loadtest::::pulumi:pulumi:Stack::-loadtest
pulumi:providers:gcp urn:pulumi:loadtest::::pulumi:providers:gcp::default
pulumi:providers:gcp urn:pulumi:loadtest::::pulumi:providers:gcp::default_6_25_0
gcp:compute/network:Network urn:pulumi:loadtest::::gcp:compute/network:Network::default
gcp:compute/subnetwork:Subnetwork urn:pulumi:loadtest::::gcp:compute/subnetwork:Subnetwork::default
gcp:compute/router:Router urn:pulumi:loadtest::::gcp:compute/router:Router::router
gcp:container/cluster:Cluster urn:pulumi:loadtest::::gcp:container/cluster:Cluster::-cluster-loadtest
gcp:compute/routerNat:RouterNat urn:pulumi:loadtest::::gcp:compute/routerNat:RouterNat::nat
gcp:compute/instance:Instance urn:pulumi:loadtest::::gcp:compute/instance:Instance::bastion
gcp:compute/firewall:Firewall urn:pulumi:loadtest::::gcp:compute/firewall:Firewall::allowiap
gcp:compute/globalAddress:GlobalAddress urn:pulumi:loadtest::***::gcp:compute/globalAddress:GlobalAddress::ipv4-address
Found no pending operations associated with loadtest
Backend
Name DESKTOP-UOHVP03
URL gs://xxxx
User bruno
Organizations
NAME VERSION
pip 22.1.1
pulumi-gcp 6.25.0
pulumi-google-native 0.19.1
pulumi-kubernetes 3.19.2
setuptools 62.3.2
wheel 0.37.1
Pulumi locates its logs in /tmp by default
warning: A new version of Pulumi is available. To upgrade from version '3.31.0' to '3.33.1', visit https://pulumi.com/docs/reference/install/ for manual instructions and release notes.
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: