Documentation ¶
Overview ¶
A package that generates Lacework deployment code for multiple cloud providers.
Index ¶
- Constants
- func CombineHclBlocks(results ...interface{}) []*hclwrite.Block
- func CreateHclStringOutput(blocks []*hclwrite.Block) string
- func CreateMapTraversalTokens(input map[string]string) hclwrite.Tokens
- func CreateRequiredProviders(providers ...*HclRequiredProvider) (*hclwrite.Block, error)
- func CreateRequiredProvidersWithCustomBlocks(blocks []*hclwrite.Block, 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 ForEach
- type HclModule
- type HclModuleModifier
- func HclModuleWithAttributes(attrs map[string]interface{}) HclModuleModifier
- func HclModuleWithForEach(key string, value map[string]string) HclModuleModifier
- func HclModuleWithProviderDetails(providerDetails map[string]string) HclModuleModifier
- func HclModuleWithVersion(version string) HclModuleModifier
- type HclOutput
- type HclProvider
- type HclProviderModifier
- type HclRequiredProvider
- type HclRequiredProviderModifier
- type HclResource
- type HclResourceModifier
Constants ¶
const ( LaceworkProviderSource = "lacework/lacework" LaceworkProviderVersion = "~> 2.0" AwsAgentlessSource = "lacework/agentless-scanning/aws" AwsAgentlessVersion = "~> 0.6" AwsConfigSource = "lacework/config/aws" AwsConfigVersion = "~> 0.5" AwsConfigOrgSource = "lacework/org-configuration/aws" AwsConfigOrgVersion = "~> 1.0" AwsCloudTrailSource = "lacework/cloudtrail/aws" AwsCloudTrailVersion = "~> 2.7" AwsCloudTrailControlTowerSource = "lacework/cloudtrail-controltower/aws" AwsCloudTrailControlTowerVersion = "~> 0.3" AwsEksAuditSource = "lacework/eks-audit-log/aws" AwsEksAuditVersion = "~> 1.0" LWAzureConfigSource = "lacework/config/azure" LWAzureConfigVersion = "~> 3.0" LWAzureActivityLogSource = "lacework/activity-log/azure" LWAzureActivityLogVersion = "~> 3.0" LWAzureEntraIdActivityLogSource = "lacework/microsoft-entra-id-activity-log/azure" LWAzureEntraIdActivityLogVersion = "~> 0.3" LWAzureADSource = "lacework/ad-application/azure" LWAzureADVersion = "~> 2.0" GcpAgentlessSource = "lacework/agentless-scanning/gcp" GcpAgentlessVersion = "~> 2.0" GcpConfigSource = "lacework/config/gcp" GcpConfigVersion = "~> 3.0" GcpAuditLogSource = "lacework/audit-log/gcp" GcpAuditLogVersion = "~> 3.4" GcpGKEAuditLogSource = "lacework/gke-audit-log/gcp" GcpGKEAuditLogVersion = "~> 0.3" GcpPubSubAuditLog = "lacework/pub-sub-audit-log/gcp" GcpPubSubAuditLogVersion = "~> 0.2" OciConfigSource = "lacework/config/oci" OciConfigVersion = "~> 0.2" )
TODO update
Variables ¶
This section is empty.
Functions ¶
func CombineHclBlocks ¶
CombineHclBlocks Simple helper to combine multiple blocks (or slices of blocks) into a single slice to be rendered to string
func CreateHclStringOutput ¶
CreateHclStringOutput Convert blocks to a string
func CreateMapTraversalTokens ¶
Create tokens for map of traversals. Used as a workaround for writing complex types where the built-in SetAttributeValue won't work
func CreateRequiredProviders ¶
func CreateRequiredProviders(providers ...*HclRequiredProvider) (*hclwrite.Block, error)
CreateRequiredProviders Create required providers block
func CreateRequiredProvidersWithCustomBlocks ¶
func CreateRequiredProvidersWithCustomBlocks( blocks []*hclwrite.Block, providers ...*HclRequiredProvider, ) (*hclwrite.Block, error)
CreateRequiredProviders Create required providers block
func CreateSimpleTraversal ¶
func CreateSimpleTraversal(input []string) hcl.Traversal
CreateSimpleTraversal 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
HclModuleWithAttributes Used to set parameters within the module usage
func HclModuleWithForEach ¶
func HclModuleWithForEach(key string, value map[string]string) HclModuleModifier
func HclModuleWithProviderDetails ¶
func HclModuleWithProviderDetails(providerDetails map[string]string) HclModuleModifier
HclModuleWithProviderDetails 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
HclModuleWithVersion Used to set the version of a module source to use
type HclOutput ¶
type HclOutput struct {
// contains filtered or unexported fields
}
type HclProvider ¶
type HclProvider struct {
// contains filtered or unexported fields
}
func NewProvider ¶
func NewProvider(name string, mods ...HclProviderModifier) *HclProvider
NewProvider Create a new HCL Provider
type HclProviderModifier ¶
type HclProviderModifier func(p *HclProvider)
func HclProviderWithAttributes ¶
func HclProviderWithAttributes(attrs map[string]interface{}) HclProviderModifier
func HclProviderWithGenericBlocks ¶
func HclProviderWithGenericBlocks(blocks ...*hclwrite.Block) HclProviderModifier
HclProviderWithGenericBlocks sets the generic blocks within the provider
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
type HclResource ¶
type HclResource struct {
// contains filtered or unexported fields
}
func NewResource ¶
func NewResource(rType string, name string, mods ...HclResourceModifier) *HclResource
NewResource Create a provider statement in the HCL output
func (*HclResource) ToResourceBlock ¶
func (m *HclResource) ToResourceBlock() (*hclwrite.Block, error)
ToResourceBlock Create hclwrite.Block for resource
type HclResourceModifier ¶
type HclResourceModifier func(p *HclResource)
func HclResourceWithAttributesAndProviderDetails ¶
func HclResourceWithAttributesAndProviderDetails(attrs map[string]interface{}, providerDetails []string) HclResourceModifier
HclResourceWithAttributesAndProviderDetails Used to set parameters within the resource usage
func HclResourceWithGenericBlocks ¶
func HclResourceWithGenericBlocks(blocks ...*hclwrite.Block) HclResourceModifier
HclResourceWithGenericBlocks sets the generic blocks within the resource
Directories ¶
Path | Synopsis |
---|---|
_examples
|
|
A package that generates Lacework deployment code for Amazon Web Services.
|
A package that generates Lacework deployment code for Amazon Web Services. |
A package that generates Lacework deployment code for Azure cloud.
|
A package that generates Lacework deployment code for Azure cloud. |
A package that generates Lacework deployment code for Google cloud.
|
A package that generates Lacework deployment code for Google cloud. |