Question

Teeraform - Update Databases Firewall

Hi, we are migrating our infrastructure to use terraform.

Currently we have a shared redis database, and some apps / droplets that connects to it.

I’m setting up a terraform script to initialize a new droplet, but I need to add this one to the redis firewall, without changing the other rules in it.

It’s possible or I should do it manually every time?

Thank you


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
March 2, 2023

Hi there,

I believe that you should be able to do a terraform import for your existing firewall and then start managing it via Terraform as normal by assigning the new Droplet tags to it as you’ve mentioned in this question here:

https://www.digitalocean.com/community/questions/terraform-add-droplet-to-firewall

Let me know how it goes!

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up