Skip to content

This is the underlying SDK library for a Terraform provider

License

Notifications You must be signed in to change notification settings

ghas-results/cloud-ngfw-aws-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
}

About

This is the underlying SDK library for a Terraform provider

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 99.9%
  • Makefile 0.1%