File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
terraform/modules/qlik-sense-server Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 11locals {
22 backup_ami_id_prod = " ami-0a9bac68a32217ec9"
33 ec2_tags_prod = {
4- Application = " Qlik"
4+ Application = " Qlik"
55 BackupPolicy = title (var. environment )
66 Name = " ${ var . identifier_prefix } -qlik-sense-restore"
77 }
88 ec2_tags_prod_restore = {
9- Application = " Qlik"
9+ Application = " Qlik"
1010 BackupPolicy = title (var. environment )
1111 Name = " ${ var . identifier_prefix } -qlik-sense-restore-2"
1212 }
@@ -44,9 +44,14 @@ resource "aws_instance" "qlik_sense_prod_instance" {
4444 encrypted = true
4545 delete_on_termination = false
4646 kms_key_id = aws_kms_key. key . arn
47- tags = merge (var. tags , local. ec2_tags_prod )
48- volume_size = 1000
49- volume_type = " gp3"
47+ # BackupPolicy tags will be automatically removed from volumes by cloud custodian
48+ # https://github.com/LBHackney-IT/ce-cloud-custodian/blob/be250a45b282b9bd3771cc0990a8a8e00c669888/custodian/policies/prod-ou/remove-tag-from-ebs-volumes.yaml
49+ tags = {
50+ for key , value in merge (var. tags , local. ec2_tags_prod ) :
51+ key = > value if key != " BackupPolicy"
52+ }
53+ volume_size = 1000
54+ volume_type = " gp3"
5055 }
5156
5257 lifecycle {
You can’t perform that action at this time.
0 commit comments