File tree Expand file tree Collapse file tree
account-wide-infrastructure
modules/aws-backup-destination Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ]
Original file line number Diff line number Diff 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+ }
Original file line number Diff line number Diff 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" )
Original file line number Diff line number Diff line change @@ -7,3 +7,13 @@ variable "athena_kms_key_arn" {}
77variable "target_bucket_arn" {}
88variable "athena_bucket_arn" {}
99variable "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+ }
Original file line number Diff line number Diff 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 ]
Original file line number Diff line number Diff 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+ }
Original file line number Diff line number Diff 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 ]
Original file line number Diff line number Diff 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+ }
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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# ##
You can’t perform that action at this time.
0 commit comments