tools

package
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2023 License: Apache-2.0 Imports: 8 Imported by: 10

Documentation

Overview

Package tools contains various functions to help with processing of the templates

Index

Constants

This section is empty.

Variables

View Source
var Schema bool

Schema means that content of the policy will be generated using HCL instead of JSON file

Functions

func CheckFiles

func CheckFiles(files ...string) error

CheckFiles verifies if all given files doesn't exist in filesystem

func CreateTFFilename

func CreateTFFilename(resourceName string, tfWorkPath string) string

CreateTFFilename creates full tf file path

func Escape added in v1.5.0

func Escape(str string) string

Escape is correcting values stored in terraform fields by escaping special characters

func EscapeName added in v0.9.0

func EscapeName(s string) (string, error)

EscapeName takes a string and makes it suitable for a tf resource instance name USAGE EXAMPLE: resource "akamai_appsec_waf_mode" "{{ escapename $policyName }}" {

func Float64Ptr

func Float64Ptr(f float64) *float64

Float64Ptr returns the address of the float64

func Int64Ptr added in v0.9.0

func Int64Ptr(i int64) *int64

Int64Ptr returns the address of the int64

func IntPtr added in v0.9.0

func IntPtr(i int) *int

IntPtr returns the address of the int

func StringPtr

func StringPtr(s string) *string

StringPtr returns the address of the string

func ToJSON added in v0.9.0

func ToJSON(o interface{}) (string, error)

ToJSON returns a JSON representation of the given object USAGE EXAMPLE: "bypassNetworkLists": {{ tojson .BypassNetworkLists }},

func ToList added in v0.9.0

func ToList(l []string) string

ToList returns a list as a comma delimited string USAGE EXAMPLE: security_policy_ids = [ {{ tolist .Siem.FirewallPolicyIds }} ]

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL