Open JPFrancoia opened 4 months ago
This looks like a new feature that isn't published yet on terraform registry
or Google Cloud documentation
and it isn't possible to reproduce.
I'm forwarding this for its validation
Yeah I think there is a bug in the Alloy DB API on Google's side, I don't think it's a terraform issue. If they fix the API this bug should be fixed too. This issue could still be useful though, if a release is made from the main branch now, anyone trying to deploy a cluster with PSC enabled will encounter this issue (until Google fixes the API).
This is an issue with the VPC-SC perimeter of this project due to their organization level VPC-SC setting. We are following up with the VPC-SC team to understand how this project can be unblocked from creating PSC-enabled AlloyDB clusters.
We have verified that AlloyDB cluster creation works correctly for projects that don't have VPC-SC restrictions. AlloyDB will be adding support for VPC-SC compliance in the near future.
Community Note
Terraform Version & Provider Version(s)
Terraform v1.5.7 on darwin_arm64 (Mac OS, M1 machine)
Affected Resource(s)
AlloyDB instance, possibly AlloyDB cluster
Terraform Configuration
Debug Output
https://gist.github.com/JPFrancoia/6ab6ee3890e62eb6a3d1b816ece714b0
Expected Behavior
I expected an AlloyDB instance to be created in my AlloyDB cluster
Actual Behavior
The AlloyDB instance wasn't created, the terraform apply failed
Steps to reproduce
Build the main branch of this repo (commit 9e7dede23)
Then run
terraform apply
on the config I pasted earlier, and you should get the output pasted in the gist.Important Factoids
For reasons that are out of scope for this issue, I need to create a Private Service Connect (PSC) endpoint for my AlloyDB database. The idea is to then use this endpoint to connect from a Cloud Run service. I'm aware that there are other solutions to connect CR and Alloy, but due to the network architecture of my company, I don't really have a choice here.
PSC isn't supported for Alloy on the most recent version of the provider (5.31.1 at the time of this issue). Luckily, it landed in main just yesterday: https://github.com/hashicorp/terraform-provider-google/pull/18263/files. Thanks to @vmiglani for that.
Their PR on the magic modules repo is here: https://github.com/GoogleCloudPlatform/magic-modules/pull/10783.
Unfortunately, I'm unable to get it to work.
Does anyone have an idea to unlock me? Really keen to support testing.
EDIT: Well I'm not sure it's actually a terraform provider bug. I tried to do the same operation with the gcloud CLI tool and hit an internal error too:
References
No response
b/343741954