Documentation ¶
Index ¶
- Constants
- func CombineHclBlocks(results ...interface{}) []*hclwrite.Block
- func CreateHclStringOutput(blocks []*hclwrite.Block) string
- func CreateRequiredProviders(providers ...*HclRequiredProvider) (*hclwrite.Block, error)
- func CreateSimpleTraversal(input []string) hcl.Traversal
- func HclCreateGenericBlock(hcltype string, labels []string, attr map[string]interface{}) (*hclwrite.Block, error)
- type HclModule
- type HclModuleModifier
- type HclProvider
- type HclProviderModifier
- type HclRequiredProvider
- type HclRequiredProviderModifier
Constants ¶
View Source
const ( LaceworkProviderSource = "lacework/lacework" LaceworkProviderVersion = "~> 0.12.2" AwsConfigSource = "lacework/config/aws" AwsConfigVersion = "~> 0.1" AwsCloudTrailSource = "lacework/cloudtrail/aws" AwsCloudTrailVersion = "~> 0.1" GcpConfigSource = "lacework/config/gcp" GcpConfigVersion = "~> 1.0" GcpAuditLogSource = "lacework/audit-log/gcp" GcpAuditLogVersion = "~> 2.0" )
Variables ¶
This section is empty.
Functions ¶
func CombineHclBlocks ¶
Simple helper to combine multiple blocks (or slices of blocks) into a single slice to be rendered to string
func CreateHclStringOutput ¶
Convert blocks to a string
func CreateRequiredProviders ¶
func CreateRequiredProviders(providers ...*HclRequiredProvider) (*hclwrite.Block, error)
Create required providers block
func CreateSimpleTraversal ¶
func CreateSimpleTraversal(input []string) hcl.Traversal
helper to create a hcl.Traversal in the order of supplied []string
e.g. []string{"a", "b", "c"} as input results in traversal having value a.b.c
Types ¶
type HclModule ¶
type HclModule struct {
// contains filtered or unexported fields
}
type HclModuleModifier ¶
type HclModuleModifier func(p *HclModule)
func HclModuleWithAttributes ¶
func HclModuleWithAttributes(attrs map[string]interface{}) HclModuleModifier
Used to set parameters within the module usage
func HclModuleWithProviderDetails ¶
func HclModuleWithProviderDetails(providerDetails map[string]string) HclModuleModifier
Used to provide additional provider details to a given module.
Note: The values supplied become traversals
e.g. https://www.terraform.io/docs/language/modules/develop/providers.html#passing-providers-explicitly
func HclModuleWithVersion ¶
func HclModuleWithVersion(version string) HclModuleModifier
Used to set the version of a module source to use
type HclProvider ¶
type HclProvider struct {
// contains filtered or unexported fields
}
func NewProvider ¶
func NewProvider(name string, mods ...HclProviderModifier) *HclProvider
Create a new HCL Provider
type HclProviderModifier ¶
type HclProviderModifier func(p *HclProvider)
func HclProviderWithAttributes ¶
func HclProviderWithAttributes(attrs map[string]interface{}) HclProviderModifier
type HclRequiredProvider ¶
type HclRequiredProvider struct {
// contains filtered or unexported fields
}
func NewRequiredProvider ¶
func NewRequiredProvider(name string, mods ...HclRequiredProviderModifier) *HclRequiredProvider
func (*HclRequiredProvider) Name ¶
func (p *HclRequiredProvider) Name() string
func (*HclRequiredProvider) Source ¶
func (p *HclRequiredProvider) Source() string
func (*HclRequiredProvider) Version ¶
func (p *HclRequiredProvider) Version() string
type HclRequiredProviderModifier ¶
type HclRequiredProviderModifier func(p *HclRequiredProvider)
func HclRequiredProviderWithSource ¶
func HclRequiredProviderWithSource(source string) HclRequiredProviderModifier
func HclRequiredProviderWithVersion ¶
func HclRequiredProviderWithVersion(version string) HclRequiredProviderModifier
Click to show internal directories.
Click to hide internal directories.