Skip to content

Commit

Permalink
fix local validation & add prefix in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjumulmi committed Aug 8, 2023
1 parent 03fc78a commit 52ba180
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/existing-cloudtrail/cross-account/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ module "expel_aws_cloudtrail_integration_x_account" {
existing_cloudtrail_kms_key_arn = var.existing_cloudtrail_kms_key_arn
existing_sns_topic_arn = var.existing_sns_topic_arn

prefix = "expel-aws-cloudtrail-x-account"
prefix = "expel-aws-cloudtrail"

tags = {
"is_external" = "true",
"x-account" = "true"
Expand Down
2 changes: 2 additions & 0 deletions examples/existing-cloudtrail/single-account/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ module "expel_aws_cloudtrail_integration" {
existing_cloudtrail_kms_key_arn = var.existing_cloudtrail_kms_key_arn
existing_sns_topic_arn = var.existing_sns_topic_arn

prefix = "expel-aws-cloudtrail"

tags = {
"is_external" = "true"
}
Expand Down
2 changes: 1 addition & 1 deletion locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ locals {
create_stackset = (var.is_existing_cloudtrail_cross_account == true || var.enable_organization_trail == true) ? true : false
# throw a runtime error if `is_existing_cloudtrail_cross_account` is set to `true` but other required variables are missing
# tflint-ignore: terraform_unused_declarations
validate_is_existing_cloudtrail_cross_account = (var.is_existing_cloudtrail_cross_account == true && (var.existing_cloudtrail_bucket_name == null || var.aws_mgmt_account_id == null || var.existing_cloudtrail_log_bucket_account_id)) ? tobool("For existing cloudtrail with cross account resources, please pass in the log bucket name, log bucket account id & management account id") : true
validate_is_existing_cloudtrail_cross_account = (var.is_existing_cloudtrail_cross_account == true && (var.existing_cloudtrail_bucket_name == null || var.aws_mgmt_account_id == null || var.existing_cloudtrail_log_bucket_account_id == null)) ? tobool("For existing cloudtrail with cross account resources, please pass in the log bucket name, log bucket account id & management account id") : true
}

0 comments on commit 52ba180

Please sign in to comment.