Leveraging PAN-defined objects within Terrafom

L0 Member

Leveraging PAN-defined objects within Terrafom

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.

L4 Transporter

Re: Leveraging PAN-defined objects within Terrafom

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.

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 Live Community as a whole!

The Live Community thanks you for your participation!