Leveraging PAN-defined objects within Terrafom

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

Leveraging PAN-defined objects within Terrafom

L0 Member

A brand new PAN device has pre-defined objects. What is the best method to consume these existing objects? Should I be dumping the PAN objects from the API, and creating Terraform data objects to statically consume? Should I import them into panorama_address/service_objects to manage them within my TF state file?

 

Is Palo Alto planning on scripting this for our consumption. Then when an object gets updated or added, we could consume the new list. It could be kept here: https://github.com/terraform-providers/terraform-provider-panos.

1 REPLY 1

L5 Sessionator

Hi, yeah, that github repo has code that is maintained by Palo Alto Networks employees.

 

 

Providing access to the predefined address objects / service objects as a data source seems to be the most appropriate thing to do, as predefined objects are read only.  Can you open up an issue against the provider so we can track this feature request?

 

In the mean time, you may not be able to refer to the predefined objects using Terraform resource (or data source) attribute variables, but you can still use the absolute names of these things in your Terraform plan files, and PAN-OS will know if it's supposed to be a predefined object or a user defined object.

  • 2203 Views
  • 1 replies
  • 2 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!