PaloAltoNetworks / terraform-provider-prismacloud

Terraform PrismaCloud provider
https://www.terraform.io/docs/providers/prismacloud/
Mozilla Public License 2.0
54 stars 65 forks source link

prismacloud_policy redlock-auth requirement (400 err) #175

Open The0xSec opened 1 year ago

The0xSec commented 1 year ago

Describe the bug

prismacloud_policy resource requires a redlock-auth token, while other resources do not.

Expected behavior

Terraform apply should succeed successfully without needing a unique auth workflow for the policy resource or documentation for setting up with this unique resource.

Current behavior

Many/Most of the other terraform resources are applied successfully; it is only when the prismacloud_policy resource is implemented that the redlock-auth 400 error occurs.

Possible Solution

Alteration of the policy endpoint may need to be adjusted to match the other endpoints. There is a mismatch somewhere.

Steps to reproduce

  1. Write some terraform that includes prismacloud_policy resource
  2. terraform apply
  3. redlock-auth 400 error

Screenshots

Provider

Screen Shot 2023-01-11 at 11 13 17 AM

Web Token Generation

Screen Shot 2023-01-11 at 11 15 00 AM

Resource Declaration

Screen Shot 2023-01-11 at 11 14 42 AM

ERROR

Screen Shot 2023-01-11 at 11 15 33 AM

Context

This has halted my ability to create/manage custom policies via CICD+Terraform pipelines. While not a complete blocker for other objectives that do not throw the same 400 error, there needs to be consistency across all terraform resources for the CRUD of resources or a documentation method to avoidance of this error

Your Environment

welcome-to-palo-alto-networks[bot] commented 1 year ago

:tada: Thanks for opening your first issue here! Welcome to the community!