Skip to content

Commit

Permalink
fix: add help details for new flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Manan-Bhatia-0 committed Jul 31, 2023
1 parent f9b627d commit f3e9df6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cli/docs/lacework_generate_cloud-account_gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ lacework generate cloud-account gcp [flags]
--custom_filter string Audit Log filter which supersedes all other filter options when defined
--enable_ubla enable universal bucket level access(ubla) (default true)
--existing_bucket_name string specify existing bucket name
--existing_pub_sub_subscription_name string specify existing pub/sub subscription name
--existing_pub_sub_topic_id string specify existing pub/sub topic id
--existing_service_account_name string specify existing service account name
--existing_service_account_private_key string specify existing service account private key (base64 encoded)
--existing_sink_name string specify existing sink name
--existing_pub_sub_topic_id string specify existing pub/sub topic id
--existing_pub_sub_subscription_name string specify existing pub/sub subscription name
-e, --folders_to_exclude stringArray List of root folders to exclude for an organization-level integration
-i, --folders_to_include stringArray list of root folders to include for an organization-level integration
--google_workspace_filter filter out Google Workspace login logs from GCP Audit Log sinks (default true)
Expand Down
10 changes: 5 additions & 5 deletions integration/gcp_generation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func TestGenerationPubSubAuditlogOnlyGcp(t *testing.T) {
}

// Test pub-sub audit log with existing topic and subscription
func TestGenerationPubSubAuditlogExistingTopicAndSubscriptionGcp(t *testing.T) {
func TestGenerationPubSubAuditLogExistingTopicAndSubscriptionGcp(t *testing.T) {
os.Setenv("LW_NOCACHE", "true")
defer os.Setenv("LW_NOCACHE", "")
var final string
Expand All @@ -203,9 +203,9 @@ func TestGenerationPubSubAuditlogExistingTopicAndSubscriptionGcp(t *testing.T) {
MsgRsp{cmd.QuestionGcpUseExistingSink, "y"},
MsgRsp{cmd.QuestionGcpExistingSinkName, "sink"},
MsgRsp{cmd.QuestionGcpUseExistingPubSubTopic, "y"},
MsgRsp{cmd.QuestionGcpExistingPubSubTopicId, "topicMcTopicFace"},
MsgRsp{cmd.QuestionGcpExistingPubSubTopicId, "topic"},
MsgRsp{cmd.QuestionGcpUseExistingPubSubSubscription, "y"},
MsgRsp{cmd.QuestionGcpExistingPubSubSubscriptionName, "subscriptionMcSubscriptionFace"},
MsgRsp{cmd.QuestionGcpExistingPubSubSubscriptionName, "subscription"},
MsgRsp{cmd.QuestionGcpCustomFilter, ""},
MsgRsp{cmd.QuestionGcpAnotherAdvancedOpt, "n"},
MsgRsp{cmd.QuestionRunTfPlan, "n"},
Expand All @@ -223,8 +223,8 @@ func TestGenerationPubSubAuditlogExistingTopicAndSubscriptionGcp(t *testing.T) {
buildTf, _ := gcp.NewTerraform(false, true, true,
gcp.WithProjectId(projectId),
gcp.WithExistingLogSinkName("sink"),
gcp.WithExistingPubSubTopicId("topicMcTopicFace"),
gcp.WithExistingPubSubSubscriptionName("subscriptionMcSubscriptionFace"),
gcp.WithExistingPubSubTopicId("topic"),
gcp.WithExistingPubSubSubscriptionName("subscription"),
).Generate()
assert.Equal(t, buildTf, tfResult)
}
Expand Down
2 changes: 2 additions & 0 deletions integration/test_resources/help/generate_cloud-account_gcp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Flags:
--custom_filter string Audit Log filter which supersedes all other filter options when defined
--enable_ubla enable universal bucket level access(ubla) (default true)
--existing_bucket_name string specify existing bucket name
--existing_pub_sub_subscription_name string specify existing pub/sub subscription name
--existing_pub_sub_topic_id string specify existing pub/sub topic id
--existing_service_account_name string specify existing service account name
--existing_service_account_private_key string specify existing service account private key (base64 encoded)
--existing_sink_name string specify existing sink name
Expand Down

0 comments on commit f3e9df6

Please sign in to comment.