Terraform 405 not allowed

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

Terraform 405 not allowed

L0 Member

not sure im doing wrong here but trying to connect using terraform results in a 405 not allowed. 
Here is my TF code 

```
terraform {
required_providers {
prismacloud = {
source = "PaloAltoNetworks/prismacloud"
version = "1.2.11"
}
}
}

provider "prismacloud" {

json_config_file = ".prismacloud_auth.json"
}

resource "prismacloud_account_group" "ba" {
name = "ba-account-group"
description = "created by Terraform"
account_ids = []
}

 

here is my .prismacloud_auth.json

{
    "url": "app2.eu.prismacloud.io",
    "username": "KEY",
    "password": "SECRET_KEY",
    "protocol": "https"
}



and here is the error

2023-03-09T20:42:47.904Z [TRACE] vertex "provider[\"registry.terraform.io/paloaltonetworks/prismacloud\"]": visit complete, with errors
2023-03-09T20:42:47.904Z [TRACE] dag/walk: upstream of "prismacloud_account_group.ba (expand)" errored, so skipping
2023-03-09T20:42:47.904Z [TRACE] dag/walk: upstream of "prismacloud_account_group.gdp (expand)" errored, so skipping
2023-03-09T20:42:47.904Z [TRACE] dag/walk: upstream of "prismacloud_account_group.iagl (expand)" errored, so skipping
2023-03-09T20:42:47.904Z [TRACE] dag/walk: upstream of "provider[\"registry.terraform.io/paloaltonetworks/prismacloud\"] (close)" errored, so skipping
2023-03-09T20:42:47.905Z [TRACE] dag/walk: upstream of "root" errored, so skipping
2023-03-09T20:42:47.905Z [TRACE] LoadSchemas: retrieving schema for provider type "registry.terraform.io/paloaltonetworks/prismacloud"

│ Error: 405 error without the "X-Redlock-Status" header - returned HTML:
│ <html>
│ <head><title>405 Not Allowed</title></head>
│ <body>
│ <center><h1>405 Not Allowed</h1></center>
│ <hr><center>openresty</center>
│ </body>
│ </html>


│ with provider["registry.terraform.io/paloaltonetworks/prismacloud"],
│ on provider.tf line 1, in provider "prismacloud":
│ 1: provider "prismacloud" {


2023-03-09T20:42:47.905Z [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info
2023-03-09T20:42:47.906Z [TRACE] statemgr.Filesystem: unlocked by closing terraform.tfstate
2023-03-09T20:42:47.907Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-03-09T20:42:47.919Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/paloaltonetworks/prismacloud/1.2.11/windows_amd64/terraform-provider-prismacloud_v1.2.11.exe pid=5116
2023-03-09T20:42:47.919Z [DEBUG] provider: plugin exited

4 REPLIES 4

L2 Linker

Hello, Can you please modify the code as following and try applying the template again
version = 1.3.1

Delete these 4 lines 
resource "prismacloud_account_group" "ba" {
name = "ba-account-group"
description = "created by Terraform"
account_ids = []
}

https://registry.terraform.io/providers/PaloAltoNetworks/prismacloud/latest/docs

Cloud Security Architect @Prisma Cloud Customer Success

L0 Member

Changing it to the way you told me doesn't work

 

How did you solve this problem?
I am struggling with the same problem 😞

L1 Bithead

Hello,

 

Instead of app2 you should be using api2

 

https://docs.paloaltonetworks.com/prisma/prisma-cloud/prisma-cloud-admin/get-started-with-prisma-clo... 

 

 "url""api2.eu.prismacloud.io",

thank you

 

I succeeded with your advice

 

 "url""api.sg.prismacloud.io",

 

  • 2643 Views
  • 4 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!