Skip to content

Commit fa91622

Browse files
Merge branch 'develop' into feature/kabo5-NRL-856-SDLC1
2 parents ad46a7d + f6456b9 commit fa91622

10 files changed

Lines changed: 57 additions & 27 deletions

File tree

terraform/account-wide-infrastructure/dev/ec2.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ module "powerbi_gw_instance" {
1919
glue_kms_key_arn = module.dev-glue.aws_kms_key_arn
2020
athena_kms_key_arn = module.dev-athena[0].kms_key_arn
2121
athena_bucket_arn = module.dev-athena[0].bucket_arn
22+
root_volume_size = var.powerbi_gw_root_volume_size
23+
root_volume_iops = var.powerbi_gw_root_volume_iops
2224

2325
subnet_id = module.vpc[0].private_subnet_id
2426
security_groups = [module.vpc[0].powerbi_gw_security_group_id]

terraform/account-wide-infrastructure/dev/vars.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,15 @@ variable "use_powerbi_gw_custom_ami" {
6767
description = "Use custom image for PowerBI GW instance"
6868
default = true
6969
}
70+
71+
variable "powerbi_gw_root_volume_size" {
72+
type = number
73+
description = "Size of the root EBS volume in GB"
74+
default = 40
75+
}
76+
77+
variable "powerbi_gw_root_volume_iops" {
78+
type = number
79+
description = "IOPS for the root EBS volume"
80+
default = 3000
81+
}

terraform/account-wide-infrastructure/modules/powerbi-gw-ec2/ec2.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ resource "aws_instance" "powerbi_gw" {
88
vpc_security_group_ids = var.security_groups
99

1010
root_block_device {
11-
volume_size = 40
12-
volume_type = "gp2"
11+
volume_size = var.root_volume_size
12+
volume_type = "gp3"
13+
iops = var.root_volume_iops
1314
}
1415

1516
user_data = file("${path.module}/scripts/user_data.tpl")

terraform/account-wide-infrastructure/modules/powerbi-gw-ec2/vars.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,13 @@ variable "athena_kms_key_arn" {}
77
variable "target_bucket_arn" {}
88
variable "athena_bucket_arn" {}
99
variable "use_custom_ami" {}
10+
variable "root_volume_size" {
11+
type = number
12+
description = "Size of the root EBS volume in GB"
13+
default = 40
14+
}
15+
variable "root_volume_iops" {
16+
type = number
17+
description = "IOPS for the root EBS volume if using io1 or gp3 volume type"
18+
default = 3000
19+
}

terraform/account-wide-infrastructure/prod/ec2.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ module "powerbi_gw_instance" {
1919
glue_kms_key_arn = module.prod-glue.aws_kms_key_arn
2020
athena_kms_key_arn = module.prod-athena[0].kms_key_arn
2121
athena_bucket_arn = module.prod-athena[0].bucket_arn
22+
root_volume_size = var.powerbi_gw_root_volume_size
23+
root_volume_iops = var.powerbi_gw_root_volume_iops
2224

2325
subnet_id = module.vpc[0].private_subnet_id
2426
security_groups = [module.vpc[0].powerbi_gw_security_group_id]

terraform/account-wide-infrastructure/prod/vars.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,15 @@ variable "use_powerbi_gw_custom_ami" {
6868
description = "Use custom image for PowerBI GW instance"
6969
default = true
7070
}
71+
72+
variable "powerbi_gw_root_volume_size" {
73+
type = number
74+
description = "Size of the root EBS volume in GB"
75+
default = 256
76+
}
77+
78+
variable "powerbi_gw_root_volume_iops" {
79+
type = number
80+
description = "IOPS for the root EBS volume"
81+
default = 3000
82+
}

terraform/account-wide-infrastructure/test/ec2.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ module "powerbi_gw_instance" {
1919
glue_kms_key_arn = module.test-glue.aws_kms_key_arn
2020
athena_kms_key_arn = module.test-athena[0].kms_key_arn
2121
athena_bucket_arn = module.test-athena[0].bucket_arn
22+
root_volume_size = var.powerbi_gw_root_volume_size
23+
root_volume_iops = var.powerbi_gw_root_volume_iops
2224

2325
subnet_id = module.vpc[0].private_subnet_id
2426
security_groups = [module.vpc[0].powerbi_gw_security_group_id]

terraform/account-wide-infrastructure/test/vars.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,15 @@ variable "use_powerbi_gw_custom_ami" {
8787
description = "Use custom image for PowerBI GW instance"
8888
default = true
8989
}
90+
91+
variable "powerbi_gw_root_volume_size" {
92+
type = number
93+
description = "Size of the root EBS volume in GB"
94+
default = 40
95+
}
96+
97+
variable "powerbi_gw_root_volume_iops" {
98+
type = number
99+
description = "IOPS for the root EBS volume"
100+
default = 3000
101+
}

terraform/backup-infrastructure/modules/aws-backup-destination/backup_vault_policy.tf

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -41,28 +41,4 @@ data "aws_iam_policy_document" "vault_policy" {
4141
resources = ["*"]
4242
}
4343
}
44-
45-
dynamic "statement" {
46-
for_each = var.enable_vault_protection ? [1] : []
47-
content {
48-
sid = "DenyBackupCopyExceptToSourceAccount"
49-
effect = "Deny"
50-
51-
principals {
52-
type = "AWS"
53-
identifiers = ["arn:aws:iam::${var.account_id}:root"]
54-
}
55-
actions = [
56-
"backup:CopyFromBackupVault"
57-
]
58-
resources = ["*"]
59-
condition {
60-
test = "StringNotEquals"
61-
variable = "backup:CopyTargets"
62-
values = [
63-
"arn:aws:backup:${var.region}:${var.source_account_id}:backup-vault:${var.region}-${var.source_account_id}-backup-vault"
64-
]
65-
}
66-
}
67-
}
6844
}

terraform/backup-infrastructure/prod/aws-backup.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ module "destination" {
2828
account_id = local.destination_account_id
2929
source_account_id = local.source_account_id
3030
kms_key = aws_kms_key.destination_backup_key.arn
31-
enable_vault_protection = false
31+
enable_vault_protection = true
32+
vault_lock_type = "compliance"
3233
}
3334

3435
###

0 commit comments

Comments
 (0)