Skip to content

Commit 7c26996

Browse files
committed
waf_addtnl_tags
1 parent 0cf5545 commit 7c26996

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

action.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,10 @@ inputs:
299299
aws_waf_log_retention_days:
300300
description: 'CloudWatch log retention period for WAF logs'
301301
required: false
302-
302+
aws_waf_additional_tags:
303+
description: 'A JSON object of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}`'
304+
required: false
305+
303306
# AWS EFS
304307
aws_efs_create:
305308
description: 'Toggle to indicate whether to create and EFS and mount it to the ec2 as a part of the provisioning. Note: The EFS will be managed by the stack and will be destroyed along with the stack.'
@@ -1227,7 +1230,8 @@ runs:
12271230
AWS_WAF_IP_REPUTATION: ${{ inputs.aws_waf_ip_reputation }}
12281231
AWS_WAF_LOGGING_ENABLE: ${{ inputs.aws_waf_logging_enable }}
12291232
AWS_WAF_LOG_RETENTION_DAYS: ${{ inputs.aws_waf_log_retention_days }}
1230-
1233+
AWS_WAF_ADDITIONAL_TAGS: ${{ inputs.aws_waf_additional_tags }}
1234+
12311235
# AWS EFS
12321236
AWS_EFS_CREATE: ${{ inputs.aws_efs_create }}
12331237
AWS_EFS_FS_ID: ${{ inputs.aws_efs_fs_id }}

operations/_scripts/generate/generate_vars_terraform.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ if [[ $(alpha_only "$AWS_WAF_ENABLE") == true ]]; then
140140
aws_waf_ip_reputation=$(generate_var aws_waf_ip_reputation $AWS_WAF_IP_REPUTATION)
141141
aws_waf_logging_enable=$(generate_var aws_waf_logging_enable $AWS_WAF_LOGGING_ENABLE)
142142
aws_waf_log_retention_days=$(generate_var aws_waf_log_retention_days $AWS_WAF_LOG_RETENTION_DAYS)
143+
aws_waf_additional_tags=$(generate_var aws_waf_additional_tags $AWS_WAF_ADDITIONAL_TAGS)
143144
fi
144145

145146
#-- AWS EFS --#
@@ -487,6 +488,7 @@ $aws_waf_managed_rules
487488
$aws_waf_ip_reputation
488489
$aws_waf_logging_enable
489490
$aws_waf_log_retention_days
491+
$aws_waf_additional_tags
490492
491493
#-- EFS --#
492494
$aws_efs_enable

operations/deployment/terraform/aws/aws_variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,12 @@ variable "aws_waf_log_retention_days" {
366366
default = 30
367367
}
368368

369+
variable "aws_waf_additional_tags" {
370+
type = string
371+
description = "A list of strings that will be added to created resources"
372+
default = "{}"
373+
}
374+
369375
# AWS EFS
370376

371377
### This variable is hidden for the end user. Is built in deploy.sh based on the next 3 variables.

operations/deployment/terraform/aws/bitovi_main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ module "aws_waf_ecs" {
575575
aws_waf_rate_limit = var.aws_waf_rate_limit
576576
aws_waf_managed_rules = var.aws_waf_managed_rules
577577
aws_waf_ip_reputation = var.aws_waf_ip_reputation
578-
aws_lb_resource_arn = module.ecs[0].aws_lb_resource_arn
578+
aws_lb_resource_arn = module.aws_ecs[0].aws_lb_resource_arn
579579
aws_waf_logging_enable = var.aws_waf_logging_enable
580580
aws_waf_log_retention_days = var.aws_waf_log_retention_days
581581
aws_resource_identifier = var.aws_resource_identifier
@@ -707,6 +707,7 @@ locals {
707707
ecr_tags = merge(local.default_tags,jsondecode(var.aws_ecr_additional_tags))
708708
db_proxy_tags = merge(local.default_tags,jsondecode(var.aws_db_proxy_additional_tags))
709709
redis_tags = merge(local.default_tags,jsondecode(var.aws_redis_additional_tags))
710+
waf_tags = merge(local.default_tags,jsondecode(var.aws_waf_additional_tags))
710711

711712
eks_vpc_tags = {
712713
// This is needed for k8s to use VPC resources

0 commit comments

Comments
 (0)