Skip to content

Name truncation causes name collisions in GCP (bosh-lite patches) #681

Description

@aramprice

Creating an issue instead of a PR since I'm not sure whether this issue is limited to plan-patches/bosh-lite-gcp/terraform/bosh-lite.tf or should be addressed more broadly.

https://github.com/cloudfoundry/bosh-bootloader/blob/main/plan-patches/bosh-lite-gcp/terraform/bosh-lite.tf#L1-L3

With two concurrent bbl up runs that happened to draw the same lake name (qinghai) in the same year (2026), two distinct bbl envs can produce the identical 20-char prefix bbl-env-qinghai-2026

Increasing the prefix to 32 characters includes the full date+hour (bbl-env-qinghai-2026-06-02t01-27z) making every concurrent run's firewall names globally unique, while staying within GCP's 63-character resource name limit (32 + the longest suffix -bosh-director-lite-tcp-routing = 63 chars exactly).

Ex: https://bosh.ci.cloudfoundry.org/teams/main/pipelines/bbr-cli/jobs/system-test-director/builds/8#L6a049fc1:577

│ Error: Error creating Firewall: googleapi: Error 409: The resource 'projects/cloud-foundry-310819/global/firewalls/bbl-env-qinghai-2026-bosh-director-lite' already exists, alreadyExists
│ 
│   with google_compute_firewall.bosh-director-lite,
│   on bosh-lite.tf line 5, in resource "google_compute_firewall" "bosh-director-lite":
│    5: resource "google_compute_firewall" "bosh-director-lite" {
│ 
╵
╷
│ Error: Error creating Firewall: googleapi: Error 409: The resource 'projects/cloud-foundry-310819/global/firewalls/bbl-env-qinghai-2026-bosh-director-lite-tcp-routing' already exists, alreadyExists
│ 
│   with google_compute_firewall.bosh-director-lite-tcp-routing,
│   on bosh-lite.tf line 33, in resource "google_compute_firewall" "bosh-director-lite-tcp-routing":
│   33: resource "google_compute_firewall" "bosh-director-lite-tcp-routing" {

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions