Skip to content

Commit

Permalink
fix: Disable aws_vpc_log creation in go-sdk
Browse files Browse the repository at this point in the history
Signed-off-by: Lei Jin <[email protected]>
  • Loading branch information
leijin-lw committed Dec 16, 2024
1 parent e050b05 commit 3ffbb90
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion lwgenerate/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ func createAgentless(args *GenerateAwsTfConfigurationArgs) ([]*hclwrite.Block, e
"lacework_aws_agentless_scanning_global",
lwgenerate.AwsAgentlessSource,
lwgenerate.HclModuleWithVersion(lwgenerate.AwsAgentlessVersion),
lwgenerate.HclModuleWithAttributes(map[string]interface{}{"global": true, "regional": true}),
lwgenerate.HclModuleWithAttributes(map[string]interface{}{"global": true, "regional": true, "use_aws_flow_log": false}),
lwgenerate.HclModuleWithProviderDetails(
map[string]string{"aws": "aws.main"},
),
Expand All @@ -1389,6 +1389,8 @@ func createAgentless(args *GenerateAwsTfConfigurationArgs) ([]*hclwrite.Block, e
lwgenerate.HclModuleWithAttributes(
map[string]interface{}{
"regional": true,
// Disable aws_flow_log creation due to https://lacework.atlassian.net/browse/GROW-3001
"use_aws_flow_log": false,
"global_module_reference": lwgenerate.CreateSimpleTraversal(
[]string{"module", "lacework_aws_agentless_scanning_global"},
),
Expand Down
10 changes: 6 additions & 4 deletions lwgenerate/aws/aws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -587,10 +587,11 @@ provider "aws" {
}
module "lacework_aws_agentless_scanning_global" {
source = "lacework/agentless-scanning/aws"
version = "~> 0.6"
global = true
regional = true
source = "lacework/agentless-scanning/aws"
version = "~> 0.6"
global = true
regional = true
use_aws_flow_log = false
providers = {
aws = aws.main
Expand All @@ -602,6 +603,7 @@ module "lacework_aws_agentless_scanning_region_scanning-1-us-east-1" {
version = "~> 0.6"
global_module_reference = module.lacework_aws_agentless_scanning_global
regional = true
use_aws_flow_log = false
providers = {
aws = aws.scanning-1-us-east-1
Expand Down

0 comments on commit 3ffbb90

Please sign in to comment.