Most firewalls declared on Terraform .hcl file does not get created when using tarraform as in this docs https://www.terraform.io/docs/providers/do/r/firewall.html
Shows error like this,
Error: Error applying plan:
5 error(s) occurred:
* module.default-firewall.digitalocean_firewall.outbound-ntp: 1 error(s) occurred:
* digitalocean_firewall.outbound-ntp: Error creating firewall: POST https://api.digitalocean.com/v2/firewalls: 500 Server was unable to give you a response.
* digitalocean_firewall.gluster_client: 1 error(s) occurred:
* digitalocean_firewall.gluster_client: Error creating firewall: POST https://api.digitalocean.com/v2/firewalls: 500 Server was unable to give you a response.
* module.default-firewall.digitalocean_firewall.outbound-dns: 1 error(s) occurred:
* digitalocean_firewall.outbound-dns: Error creating firewall: POST https://api.digitalocean.com/v2/firewalls: 500 Server was unable to give you a response.
* module.docker-swarm-firewall.digitalocean_firewall.swarm-mode-internal-fw: 1 error(s) occurred:
* digitalocean_firewall.swarm-mode-internal-fw: Error creating firewall: POST https://api.digitalocean.com/v2/firewalls: 500 Server was unable to give you a response.
* module.default-firewall.digitalocean_firewall.outbound-http: 1 error(s) occurred:
* digitalocean_firewall.outbound-http: Error creating firewall: POST https://api.digitalocean.com/v2/firewalls: 500 Server was unable to give you a response.
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!
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.
I believe terraform was trying to apply firewalls to droplet resources, and dependent resource was not available to handle it at the time. So some of the firewalls were applied randomly on each try. Related issue on github: https://github.com/thojkooi/terraform-digitalocean-docker-swarm-firewall/issues/8
Hey friend,
I believe this uses our firewall product, though it may use software firewall inside of a droplet. The first seems more likely. It may be good to cross post this to GitHub so that the maintainers can review it as well:
https://github.com/terraform-providers/terraform-provider-digitalocean/issues
If you do get an answer elsewhere, please share it here so I can know how to help others who experience the same.
Jarland