Terraform Resource "Panos_security_policy" and the Warning listed for it.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Terraform Resource "Panos_security_policy" and the Warning listed for it.

L0 Member

Hello All, I'm trying to use the above Terraform resource for testing and was confused by the warning that is listed on the Registry (Hashicorp) page associated with this resource. It says, that ": This resource will remove any security rule not defined in this resource."   

what the * ?  Will it remove all the existing rules that are on the firewall ?  i hope not. But it is not clear to me.

What i understand from this warning is that all rules will be removed from firewall, except the one that i create using this terraform resource. Is that correct ?

To see the warning, you can use this link below.

https://registry.terraform.io/providers/PaloAltoNetworks/panos/latest/docs/resources/security_policy

My main concern is that i want to use this resource to create new rules and still have my existing rules in place with no affect to them. Thanks.

1 accepted solution

Accepted Solutions

L5 Sessionator

panos_security_rule_group is right over there for this use case.

 

panos_security_policy is if your use case is "these rules and ONLY these rules."

View solution in original post

2 REPLIES 2

L5 Sessionator

panos_security_rule_group is right over there for this use case.

 

panos_security_policy is if your use case is "these rules and ONLY these rules."

Thanks for pointing that out. I was not sure since it says "group" and i only wanted to test a single firewall rule (not a group of rules).  Earlier I used the Ansible task "panos_security_rule" so i was thinking may be the Terraform resource would be named similarly. But i guess naming convention is not same for Terraform and Ansible modules. 

  • 1 accepted solution
  • 2271 Views
  • 2 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!