Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion infrastructure/terraform/components/reporting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ No requirements.
| <a name="input_project"></a> [project](#input\_project) | The name of the Project we are bootstrapping tfscaffold for | `string` | n/a | yes |
| <a name="input_public_subnet_cidrs"></a> [public\_subnet\_cidrs](#input\_public\_subnet\_cidrs) | List of CIDR blocks for public subnets. | `list(string)` | `[]` | no |
| <a name="input_region"></a> [region](#input\_region) | The AWS Region | `string` | n/a | yes |
| <a name="input_root_volume_size"></a> [root\_volume\_size](#input\_root\_volume\_size) | Size of root volume for the Power BI On-Premises Gateway instances - 30GB minimum for Windows Server | `number` | `30` | no |
| <a name="input_root_volume_size"></a> [root\_volume\_size](#input\_root\_volume\_size) | Size of root volume for the Power BI On-Premises Gateway instances - 30GB minimum for Windows Server | `number` | `80` | no |
| <a name="input_scale_in_recurrence_schedule"></a> [scale\_in\_recurrence\_schedule](#input\_scale\_in\_recurrence\_schedule) | The cron expression for the scale in schedule. Set to null if no recurrence is needed. | `string` | `null` | no |
| <a name="input_scale_out_recurrence_schedule"></a> [scale\_out\_recurrence\_schedule](#input\_scale\_out\_recurrence\_schedule) | The cron expression for the scale out schedule. Set to null if no recurrence is needed. | `string` | `null` | no |
| <a name="input_shared_infra_account_id"></a> [shared\_infra\_account\_id](#input\_shared\_infra\_account\_id) | The AWS Account ID of the shared infrastructure account | `string` | `"000000000000"` | no |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
resource "aws_cloudwatch_metric_alarm" "patch_task_failed" {
count = var.enable_powerbi_gateway ? 1 : 0

alarm_name = "${local.csi}-patch-task-failed"
comparison_operator = "GreaterThanOrEqualToThreshold"
evaluation_periods = 1
metric_name = "FailedCommands"
namespace = "AWS/SSM-RunCommand"
period = 300
statistic = "Sum"
threshold = 1
alarm_description = "Alarm when the AWS-RunPatchBaseline maintenance window task reports a failed run"
treat_missing_data = "notBreaching"

dimensions = {
DocumentName = "AWS-RunPatchBaseline"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resource "aws_ssm_maintenance_window" "patch_window" {

name = "${local.csi}-windows-patch-window"
description = "Windows Server 2022 Patch Window"
schedule = "cron(0 3 ? * SUN *)" # Every Sunday at 3 AM
schedule = "cron(0 3 ? * * *)" # Every day at 3 AM
duration = 4
cutoff = 1
allow_unassociated_targets = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ resource "aws_ssm_maintenance_window_task" "patch_task" {
name = "Operation"
values = ["Install"]
}
parameter {
name = "RebootOption"
values = ["RebootIfNeeded"]
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (-not (Get-Command choco -ErrorAction SilentlyContinue)) {
}

# Install PowerBI On-Premises Gateway and Desktop
choco install -y powerbigateway --version=3000.230.14 --ignore-checksums
choco install -y powerbigateway --version=3000.298.8 --ignore-checksums
choco install -y powerbi --ignore-checksums

# Install vim
Expand All @@ -29,7 +29,7 @@ choco install -y vim
choco install -y powershell-core

# Install Amazon Athena ODBC 2.x Driver
`$athenaDriverUrl = "https://s3.amazonaws.com/athena-downloads/drivers/ODBC/v2.0.3.0/Windows/AmazonAthenaODBC-2.0.3.0.msi"
`$athenaDriverUrl = "https://downloads.athena.us-east-1.amazonaws.com/drivers/ODBC/v2.0.6.0/Windows/AmazonAthenaODBC-2.0.6.0.msi"
`$athenaDriverInstaller = "C:\scripts\SimbaAthenaODBC.msi"
Invoke-WebRequest -Uri `$athenaDriverUrl -OutFile `$athenaDriverInstaller

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ variable "spot_max_price" {
variable "root_volume_size" {
type = number
description = "Size of root volume for the Power BI On-Premises Gateway instances - 30GB minimum for Windows Server"
default = 30
default = 80
}

variable "scale_out_recurrence_schedule" {
Expand Down
8 changes: 0 additions & 8 deletions infrastructure/terraform/etc/env_eu-west-2_int.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ private_subnet_cidrs = [
"10.0.6.0/24"
]

instance_type = "t3.medium"
root_volume_size = 30
desired_capacity = 1
min_size = 1
max_size = 1
enable_spot = false
spot_max_price = "0.3"

enable_s3_backup = false

shared_infra_account_id = "099709604300"
8 changes: 0 additions & 8 deletions infrastructure/terraform/etc/env_eu-west-2_main.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@ private_subnet_cidrs = [
"10.0.6.0/24"
]

instance_type = "t3.medium"
root_volume_size = 30
desired_capacity = 1
min_size = 1
max_size = 1
enable_spot = false
spot_max_price = "0.3"

shared_infra_account_id = "099709604300"

destination_backup_vault_arn = "arn:aws:backup:eu-west-2:390844765011:backup-vault:nhs-notify-reporting-dev-backup-vault"
9 changes: 2 additions & 7 deletions infrastructure/terraform/etc/env_eu-west-2_prod.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,8 @@ private_subnet_cidrs = [
"10.0.6.0/24"
]

instance_type = "t3.medium"
root_volume_size = 30
desired_capacity = 1
min_size = 1
max_size = 1
enable_spot = false
spot_max_price = "0.3"
instance_type = "t3.xlarge"
root_volume_size = 200

batch_client_ids = [
"c10ab104-86ae-48dc-b243-4906760952d3",
Expand Down
8 changes: 0 additions & 8 deletions infrastructure/terraform/etc/env_eu-west-2_ref.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ private_subnet_cidrs = [
"10.0.6.0/24"
]

instance_type = "t3.medium"
root_volume_size = 30
desired_capacity = 1
min_size = 1
max_size = 1
enable_spot = false
spot_max_price = "0.3"

batch_client_ids = [
"perf-test-client-1",
"perf-test-client-2"
Expand Down
8 changes: 0 additions & 8 deletions infrastructure/terraform/etc/env_eu-west-2_uat.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ private_subnet_cidrs = [
"10.0.6.0/24"
]

instance_type = "t3.medium"
root_volume_size = 30
desired_capacity = 1
min_size = 1
max_size = 1
enable_spot = false
spot_max_price = "0.3"

enable_s3_backup = false

shared_infra_account_id = "099709604300"
Loading