Closed mmllc-jsilverman closed 1 month ago
Can you pass vpc_network
directly or some other way instead of getting it from GKE module? Following line is causing it to recreate private service access. Private service access module is working fine.
vpc_network = module.gke-private-cluster-0.network_name
Can you pass
vpc_network
directly or some other way instead of getting it from GKE module? Following line is causing it to recreate private service access. Private service access module is working fine.vpc_network = module.gke-private-cluster-0.network_name
thank you, I'll try this and report back
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
sorry for my delayed response! I have tried, as advised, to simplify the network name being provided and I still constantly have terraform want to delete and recreate private service access connections. I am unsure what I am doing wrong. I've even tried a hard-coded string for the var.vpc_network value. For example:
module "private-service-access-backend" {
depends_on = [module.services-backend]
source = "GoogleCloudPlatform/sql-db/google//modules/private_service_access"
version = "~> 20.0"
project_id = local.project
vpc_network = "my-network-name"
}
This still has terraform trying to delete and recreate this resource. This is extra bad now because I've upgraded other modules and providers and now I'm hitting this bug as well: https://github.com/hashicorp/terraform-provider-google/issues/16275 (which is supposed to be resolved but doesn't seem to be)
I'm going to see what happens when I just create the underlying resources directly and skip the use of this module.
and as a follow up to the follow up: when I implement the resources individually, terraform no longer wants to recreate them. I do not know why this module fails in my environment.
TL;DR
Every run, the
private_service_access
submodule wants to destroy and recreate the PSA. Previously this was fine (albeit annoying) but now I'm having race condition type issues where the IP address is not deleted before being recreated.Expected behavior
No changes to this module implementation means Terraform should report no changes need to be made
Observed behavior
Terraform Configuration
Terraform Version
Additional information
This is just one example of this issue; I use this submodule extensively, though, and the "forces replacement" notice happens on every run, for every implementation, for versions of this module from 0.13 thru 0.20