PaloAltoNetworks / terraform-provider-panos

Terraform Panos provider
https://www.terraform.io/docs/providers/panos/
Mozilla Public License 2.0
87 stars 71 forks source link

Bug: panos_management_profile : permitted_ips not working #237

Closed matthewhembree closed 3 years ago

matthewhembree commented 4 years ago

Describe the bug

When configuring panos_management_profile:permitted_ips, they do not make it into the panos device configuration.

Expected behavior

Permitted IPs appear in the configuration, allowing restriction of management interface.

Current behavior

No changes to the permitted IPs in the on-device management profile.

Possible solution

Steps to reproduce

1.

resource "panos_management_profile" "profile" {
  name  = "default management profile"
  ping  = false
  ssh   = true
  https = true
  permitted_ips = ["1.1.1.1/32"] # NOT WORKING!!
}
  1. terraform apply
  2. 
    An execution plan has been generated and is shown below.
    Resource actions are indicated with the following symbols:
    + create

Terraform will perform the following actions:

panos_management_profile.profile will be created

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions? Terraform will perform the actions described above. Only 'yes' will be accepted to approve.

Enter a value: yes

panos_management_profile.profile: Creating... panos_management_profile.profile: Creation complete after 0s [id=default management profile]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed. Releasing state lock. This may take a few moments...

4. `<commit>`

## Screenshots

<!--- Drag any screenshots of the issue here or delete this section -->

![image](https://user-images.githubusercontent.com/47449406/92048326-0cb9f680-ed4d-11ea-93db-32c926a4964e.png)

## Context

<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is useful in the real world -->

I would like to restrict access to the management interface.

## Your Environment

<!--- Include as many relevant details about the environment you experienced the bug in -->

terraform -v Terraform v0.12.29

Thank you!

shinmog commented 4 years ago

What version of PAN-OS are you running..? Thinking the schema must have changed...

matthewhembree commented 4 years ago

What version of PAN-OS are you running..? Thinking the schema must have changed...

@shinmog PanOS 9.1.3

shinmog commented 3 years ago

@matthewhembree

Ok, sorry, I didn't fully read your bug report.

What you have a screenshot of above is Device > Setup > Interfaces > Management. What the panos_management_profile resource manages is Network > Network Profiles > Interface Mgmt. So after running the above if you look at that location in the GUI you'll see that you have a profile named "default management profile".

There isn't a resource to configure the management interface profile right now, so if you need this please either rename this issue to a feature request for that, or open a new github issue.

matthewhembree commented 3 years ago

@shinmog Thanks for the information/clarification!