Skip to content

Allow additional trusted sources on database firewall#182

Merged
grovecj merged 1 commit intomainfrom
fix/db-firewall-trusted-sources
Feb 22, 2026
Merged

Allow additional trusted sources on database firewall#182
grovecj merged 1 commit intomainfrom
fix/db-firewall-trusted-sources

Conversation

@grovecj
Copy link
Owner

@grovecj grovecj commented Feb 21, 2026

Summary

  • The database firewall resource is declarative/exclusive — when terraform apply runs, it sets the entire firewall, removing any rules added by other projects
  • The cartergrove-me droplet (ID: 550247439) needs access to the same database, causing conflicts
  • Adds a configurable additional_trusted_sources variable that accepts any DO trusted source type (app, droplet, k8s, ip_addr, tag)

Usage

In terraform.tfvars:

additional_trusted_sources = [
  {
    type  = "droplet"
    value = "droplet_id"
  }
]

Test plan

  • Run terraform plan to verify the droplet rule is added alongside the existing app rule
  • Run terraform apply and confirm both mlb-stats app and cartergrove-me droplet appear in database trusted sources
  • Verify mlb-stats app can connect to the database
  • Verify cartergrove-me can connect to the database

🤖 Generated with Claude Code

The database firewall was exclusively managed by this project, causing
conflicts when other services (e.g. cartergrove-me droplet) also needed
access. Add a configurable additional_trusted_sources variable so
external droplets, apps, or IPs can be granted access without clobbering
existing rules.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@grovecj grovecj merged commit 6c2a851 into main Feb 22, 2026
5 checks passed
@grovecj grovecj deleted the fix/db-firewall-trusted-sources branch February 22, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant