Skip to content

private_service_connect doesn't automatically ignore already created managedzones #623

@sherlynnw-ovo

Description

@sherlynnw-ovo

TL;DR

when deploying two psc's, i'll get private.googleapis.com, gcr.io, pdk.dev already exists error for the second psc deployment.

Expected behavior

second psc deployment should piggy back of already existing managedzones instead of trying to deploy it

Observed behavior

│ Error: Error creating ManagedZone: googleapi: Error 409: The resource 'entity.managedZone' named 'dz-gcr' already exists, alreadyExists
│ Error: Error creating ManagedZone: googleapi: Error 409: The resource 'entity.managedZone' named 'dz-apis' already exists, alreadyExists
│ Error: Error creating ManagedZone: googleapi: Error 409: The resource 'entity.managedZone' named 'dz-pkg-dev' already exists, alreadyExists

Terraform Configuration

module "private_service_connect" {
  for_each                     = local.psc_enabled_instances
  source                       = "git::https://github.com/terraform-google-modules/terraform-google-network.git//modules/private-service-connect?ref=563490f9f440f66a2c996daafad4ca8d83f7dfa2" # Using v11.1.1
  project_id                   = var.project_id
  private_service_connect_name = "${each.key}-psc"
  private_service_connect_ip   = lookup(each.value.psc_details, "psc_ip_address", "10.0.0.1")
  forwarding_rule_target       = ""
  forwarding_rule_name         = ""
  network_self_link            = data.google_compute_network.ava_vpc[each.key].self_link

}

Terraform Version

Terraform v1.12.1

Terraform Provider Versions

v6.20.0

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions