Enhanced Security Measures in Place:   To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.

Problem with initial Terraform Panos configuration panos_panorama_template

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

Problem with initial Terraform Panos configuration panos_panorama_template

L0 Member

I am trying to configure a VM100 running version 8.3.1 with terraform. (I also tried the same on VM with version 9.0.1)

I run the following version of Terraform:

> terraform -v
Terraform v0.11.13
+ provider.panos v1.5.1

 

I have configured panos_panorama_template, panos_panorama_template_entry, panos_panorama_template_variable, panos_panorama_ethernet_interface and panos_panorama_zone.

 

The terraform plan doesn't report any problems but when I do the terraform apply I get the following error and terraform crashes.

panos_panorama_template.example_templ: Creating...
default_vsys: "" => "<computed>"
devices.#: "" => "<computed>"
name: "" => "example_templ"

Error: Error applying plan:

1 error(s) occurred:

* panos_panorama_template.example_templ: 1 error(s) occurred:

* panos_panorama_template.example_templ: unexpected EOF

 

panic: interface conversion: interface {} is *pango.Firewall, not *pango.Panorama
2019-05-13T17:58:44.410+0200 [DEBUG] plugin.terraform-provider-panos_v1.5.1_x4:
2019-05-13T17:58:44.410+0200 [DEBUG] plugin.terraform-provider-panos_v1.5.1_x4: goroutine 72 [running]:
2019/05/13 17:58:44 [ERROR] root: eval: *terraform.EvalApplyPost, err: 1 error(s) occurred:

* panos_panorama_template.example_templ: unexpected EOF
2019/05/13 17:58:44 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error(s) occurred:

* panos_panorama_template.example_templ: unexpected EOF
2019/05/13 17:58:44 [TRACE] [walkApply] Exiting eval tree: panos_panorama_template.example_templ
2019-05-13T17:58:44.410+0200 [DEBUG] plugin: plugin process exited: path=/home/rhuyerman/cookbook/terraform/busa/firewall/pa-config/.terraform/plugins/linux_amd64/terraform-provider-panos_v1.5.1_x4
2019/05/13 17:58:44 [TRACE] dag/walk: upstream errored, not walking "panos_panorama_template_entry.example_tmplentry"
2019-05-13T17:58:44.410+0200 [DEBUG] plugin.terraform-provider-panos_v1.5.1_x4: github.com/terraform-providers/terraform-provider-panos/panos.createPanoramaTemplate(0xc0001b0d20, 0x10c6060, 0xc0002e8640, 0xc0001b0d20, 0x0)

 

What am I doing wrong in my configuration.

 

This is the config:

provider "panos" {
#hostname = "172.16.0.75"
hostname = "172.16.0.249"
api_key = "${var.panos_api_key}"
}

resource "panos_panorama_template" "example_templ" {
name = "example_templ"
# device {
# serial = "007254000068426"
# }
}

resource "panos_panorama_template_entry" "example_tmplentry" {
template = "${panos_panorama_template.example_templ.name}"
#serial = "007254000068426"
serial = "007054000062810"
}

resource "panos_panorama_template_variable" "example_templvar" {
template = "${panos_panorama_template.example_templ.name}"
name = "$example_templvar"
type = "fqdn"
value = "example.busm.local"
}


resource "panos_panorama_ethernet_interface" "eth1-3" {
name = "ethernet1/3"
# vsys = "vsys1"
mode = "layer3"
template = "${panos_panorama_template.example_templ.name}"
static_ips = ["172.16.16.2/24"]
comment = "EXP_a_DMZ"
}


resource "panos_panorama_zone" "EXP_a_DMZ" {
name = "EXP_a_DMZ"
mode = "layer3"
interfaces = ["${panos_panorama_ethernet_interface.eth1-3.name}"]
}

1 accepted solution

Accepted Solutions

L3 Networker

Hi rhuyerman,

it seems you're using panorama resources while talking to a firewall. If you're directly configuring a firewall (and you don't have a panorama) you should be fine with using: panos_ethernet_interface and panos_zone

 

regards

Rafal

View solution in original post

3 REPLIES 3

L3 Networker

Hi rhuyerman,

it seems you're using panorama resources while talking to a firewall. If you're directly configuring a firewall (and you don't have a panorama) you should be fine with using: panos_ethernet_interface and panos_zone

 

regards

Rafal

Rafal,

 

That sound logical, I will use that one and let you know of I still have problems.

 

Regards,

 

Richard

Rafal,

 

That works 🙂

 

I have create the interface, Zone and Virtual router.

This is the first time I use the Palo Alto Firewalls and I never used Panorama.

 

Thanks again for the quick help.

 

Regards,

 

Richard

  • 1 accepted solution
  • 5149 Views
  • 3 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!