cloud-ngfw-aws-go

This is the underlying SDK library for a Terraform provider

Palo Alto Networks cloudngfw

GoDoc

Package cloudngfw is a golang SDK for interacting with the Cloud NGFW AWS API.

Setup

This uses the AWS golang SDK under the hood, so it assumes you have credentials stored in the standard spots.

Example Script

package main

import (
    "context"
    "log"

    "github.com/paloaltonetworks/cloud-ngfw-aws-go"
)

func main() {
    var err error

    c := &awsngfw.Client{
        Host: "api.endpoint.com",
        Region: "us-east-1",
        LfaArn: "arn:aws:iam::123456789:role/CloudNgfwFirewallAdmin",
        LraArn: "arn:aws:iam::123456789:role/CloudNgfwRulestackAdmin",
    }
    if err = c.Setup(); err != nil {
        log.Fatal(err)
    }

    if err = c.RefreshJwts(context.TODO()); err != nil {
        log.Fatal(err)
    }

    log.Printf("Firewall JWT: %s", c.FirewallJwt)
    log.Printf("Rulestack JWT: %s", c.RulestackJwt)
}

Developer Sites

Social


Copyright © 2022 Palo Alto Networks, Inc. All rights reserved.