[BUG] Terraform state manipulation with terraform state rm
and then terraform import
causes firewall error
#328
Labels
bug
Something isn't working
Description
When a firewall is created using
create_default_rules = true
flag, the firewall can be created usingterraform apply
, and any subsequentterraform plan
will take that flag into account.However, once the Terraform state is manually adjusted, such as using
terraform state rm
and thenterraform import
, this flag will not be imported (I'm assuming there is no inferring happen, though it is probably technically possible), causing the firewall adjustment will throw an error unless you specifically setcreate_default_rules = false
.Steps to reproduce:
Check
terraform plan
works without any error, and no change neededCheck the ID for the created network
terraform import civo_firewall.firewall $__firewall_id
terraform plan
, and get error related tocreate_default_rules
and Egress errorI think there is a way to set the
create_default_rules
to true when we can see the default rule sets.Acceptance Criteria
create_default_rules
by looking at the ingress / egress rulescreate_default_rules
flag, and provide example instead to clarify what the default isThe text was updated successfully, but these errors were encountered: