Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the Create CloudTrail Trail by making the parameter optional #77

Open
wants to merge 1 commit into
base: compliance-pipelines
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions pipelines/cloudtrail/create_cloudtrail_trail.fp
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,22 @@ pipeline "create_cloudtrail_trail" {
param "is_multi_region_trail" {
type = bool
description = "Indicate whether a multi region trail."
optional = true
default = false
}

param "include_global_service_events" {
type = bool
description = "Indicate whether to include the global service events."
optional = true
default = false
}

param "enable_log_file_validation" {
type = bool
description = "Indicate whether to enable log file validation."
optional = true
default = false
}

step "container" "create_cloudtrail_trail" {
Expand All @@ -44,9 +50,9 @@ pipeline "create_cloudtrail_trail" {
cmd = concat(
["cloudtrail", "create-trail", "--name", param.name],
param.bucket_name != null ? ["--s3-bucket-name", param.bucket_name] : [],
param.is_multi_region_trail != null ? ["--is-multi-region-trail"] : [],
param.include_global_service_events != null ? ["--include-global-service-events"] : [],
param.enable_log_file_validation != null ? ["--enable-log-file-validation"] : [],
param.is_multi_region_trail ? ["--is-multi-region-trail"] : [],
param.include_global_service_events ? ["--include-global-service-events"] : [],
param.enable_log_file_validation ? ["--enable-log-file-validation"] : [],

)

Expand Down