cloudfoundry / cloudfoundry/bosh-bootloader

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

Open
#681 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
181
Forks
179
PR merge metrics
No merged PRs in 30d

Description

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" {

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with plan-patches/bosh-lite-gcp/terraform/bosh-lite.tf, especially the name prefix on the firewall resources at lines 1-3 and the resources at lines 5 and 33. Confirm whether the truncation is specific to this patch or broader, then ensure concurrent bbl environments produce unique names while all firewall names remain within GCP's 63-character limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
terraform
Domain
cloud
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.