Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion assets/pango/errors/panos.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ func Parse(body []byte) error {

_ = xml.Unmarshal(body, &e)
if e.Failed() {
msg := e.Message()
if msg == "" {
msg = fmt.Sprintf("(raw response: %s)", strings.TrimSpace(string(body)))
}
return Panos{
Msg: e.Message(),
Msg: msg,
Code: e.Code,
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
resource "panos_administrator" "example" {
location = {
panorama = {}
}
name = "admin-user"
authentication_profile = "my-auth-profile"

permissions = {
role_based = {
superuser = true
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
resource "panos_decryption_profile" "example" {
location = {
shared = {}
}
name = "my-decryption-profile"

ssl_forward_proxy = {
block_expired_certificate = true
block_untrusted_issuer = true
block_unknown_cert = true
block_unsupported_version = true
block_unsupported_cipher = true
restrict_cert_exts = true
}

ssl_protocol_settings = {
min_version = "tls1-2"
max_version = "max"
keyxchg_algo_rsa = true
keyxchg_algo_ecdhe = true
enc_algo_aes_128_gcm = true
enc_algo_aes_256_gcm = true
auth_algo_sha256 = true
auth_algo_sha384 = true
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# An email server profile can be imported by providing the following base64 encoded object as the ID
# {
# location = {
# template = {
# name = "example-template"
# panorama_device = "localhost.localdomain"
# }
# }
#
# name = "security-alerts-email"
# }
terraform import panos_email_server_profile.example $(echo '{"location":{"template":{"name":"example-template","panorama_device":"localhost.localdomain"}},"name":"security-alerts-email"}' | base64)
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
resource "panos_email_server_profile" "example" {
location = {
vsys = {
name = "vsys1"
}
}
name = "my-email-server-profile"

servers = [
{
name = "email-server-1"
from = "panos@example.com"
to = "alerts@example.com"
gateway = "smtp.example.com"
port = 25
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
resource "panos_snmptrap_profile" "example" {
location = {
vsys = {
name = "vsys1"
}
}
name = "my-snmp-trap-profile"

version = {
v2c = {
servers = [
{
name = "snmp-server-1"
manager = "192.0.2.1"
community = "public"
}
]
}
}
}
11 changes: 11 additions & 0 deletions assets/terraform/internal/provider/administrator_custom.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package provider

import (
"context"

"github.com/PaloAltoNetworks/pango/util"
)

func administratorCreatePasswordHash(ctx context.Context, client util.PangoClient, password string) (string, error) {
return client.RequestPasswordHash(ctx, password)
}
Loading
Loading