Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added fix for the issue #328 #348

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sundaram2021
Copy link

The Terraform provider needed to set the create_default_rules flag based on whether the firewall was created with default rules, especially during terraform import.

I added a function in the Civo SDK (firewall.go) that checks whether a firewall is using default rules by comparing the actual firewall rules with predefined default rules (e.g., allowing SSH, HTTP, and HTTPS traffic).

In the Terraform provider (resource_firewall.go), I modified the logic to call this function during resource creation and import. This ensures that the create_default_rules flag is accurately set in the Terraform state based on the current firewall rules.

Now, when a firewall is created or imported, the provider checks if default rules are used and sets the create_default_rules flag accordingly, preventing misconfiguration and ensuring consistency between the actual firewall state and Terraform's state.

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