File tree Expand file tree Collapse file tree 16 files changed +196
-33
lines changed
account-wide-infrastructure Expand file tree Collapse file tree 16 files changed +196
-33
lines changed Original file line number Diff line number Diff line change 1+ module "prod-athena" {
2+ source = " ../modules/athena"
3+ name_prefix = " nhsd-nrlf--prod"
4+ target_bucket_name = module. prod-glue . target_bucket_name
5+ }
Original file line number Diff line number Diff line change 1+ module "vpc" {
2+ source = " ../modules/vpc"
3+ vpc_cidr_block = var. vpc_cidr_block
4+ enable_dns_hostnames = var. enable_dns_hostnames
5+ vpc_public_subnets_cidr_block = var. vpc_public_subnets_cidr_block
6+ vpc_private_subnets_cidr_block = var. vpc_private_subnets_cidr_block
7+ aws_azs = var. aws_azs
8+ name_prefix = " nhsd-nrlf--prod"
9+ }
10+
11+ module "powerbi_gw_instance_v2" {
12+ source = " ../modules/ec2"
13+ use_custom_ami = true
14+ instance_type = var. instance_type
15+ name_prefix = " nhsd-nrlf--test-powerbi-gw-v2"
16+ target_bucket_arn = module. prod-glue . target_bucket_arn
17+ glue_kms_key_arn = module. prod-glue . aws_kms_key_arn
18+ athena_kms_key_arn = module. prod-athena . kms_key_arn
19+ athena_bucket_arn = module. prod-athena . bucket_arn
20+
21+ subnet_id = module. vpc . private_subnet_id
22+ security_groups = [module . vpc . powerbi_gw_security_group_id ]
23+ }
Original file line number Diff line number Diff line change 1+ module "prod-glue" {
2+ source = " ../modules/glue"
3+ name_prefix = " nhsd-nrlf--prod"
4+ python_version = 3
5+ }
Original file line number Diff line number Diff line change @@ -8,3 +8,45 @@ variable "prod_api_domain_name" {
88 description = " The internal DNS name of the API Gateway for the prod environment"
99 default = " prod.api.record-locator.national.nhs.uk"
1010}
11+
12+ variable "aws_azs" {
13+ type = string
14+ description = " AWS Availability Zones"
15+ default = " eu-west-2a"
16+ }
17+
18+ variable "enable_dns_hostnames" {
19+ type = bool
20+ description = " Enable DNS hostnames in VPC"
21+ default = true
22+ }
23+
24+ variable "vpc_cidr_block" {
25+ type = string
26+ description = " Base CIDR Block for VPC"
27+ default = " 10.0.0.0/16"
28+ }
29+
30+ variable "vpc_public_subnets_cidr_block" {
31+ type = string
32+ description = " CIDR Block for Public Subnets in VPC"
33+ default = " 10.0.0.0/24"
34+ }
35+
36+ variable "vpc_private_subnets_cidr_block" {
37+ type = string
38+ description = " CIDR Block for Private Subnets in VPC"
39+ default = " 10.0.1.0/24"
40+ }
41+
42+ variable "instance_type" {
43+ type = string
44+ description = " Type for EC2 Instance"
45+ default = " t2.micro"
46+ }
47+
48+ variable "use_custom_ami" {
49+ type = bool
50+ description = " Use custom image"
51+ default = false
52+ }
Original file line number Diff line number Diff line change 1+ module "qa-athena" {
2+ source = " ../modules/athena"
3+ name_prefix = " nhsd-nrlf--qa"
4+ target_bucket_name = module. qa-glue . target_bucket_name
5+ }
6+
17module "int-athena" {
28 source = " ../modules/athena"
39 name_prefix = " nhsd-nrlf--int"
410 target_bucket_name = module. int-glue . target_bucket_name
511}
12+
13+ module "int-sandbox-athena" {
14+ source = " ../modules/athena"
15+ name_prefix = " nhsd-nrlf--int-sandbox"
16+ target_bucket_name = module. int-sandbox-glue . target_bucket_name
17+ }
18+
19+ module "ref-athena" {
20+ source = " ../modules/athena"
21+ name_prefix = " nhsd-nrlf--ref"
22+ target_bucket_name = module. ref-glue . target_bucket_name
23+ }
Original file line number Diff line number Diff line change 1+ module "vpc" {
2+ source = " ../modules/vpc"
3+ vpc_cidr_block = var. vpc_cidr_block
4+ enable_dns_hostnames = var. enable_dns_hostnames
5+ vpc_public_subnets_cidr_block = var. vpc_public_subnets_cidr_block
6+ vpc_private_subnets_cidr_block = var. vpc_private_subnets_cidr_block
7+ aws_azs = var. aws_azs
8+ name_prefix = " nhsd-nrlf--dev"
9+ }
10+
11+ module "powerbi_gw_instance_v2" {
12+ source = " ../modules/ec2"
13+ use_custom_ami = true
14+ instance_type = var. instance_type
15+ name_prefix = " nhsd-nrlf--dev-powerbi-gw-v2"
16+ target_bucket_arn = module. dev-glue . target_bucket_arn
17+ glue_kms_key_arn = module. dev-glue . aws_kms_key_arn
18+ athena_kms_key_arn = module. dev-athena . kms_key_arn
19+ athena_bucket_arn = module. dev-athena . bucket_arn
20+
21+ subnet_id = module. vpc . private_subnet_id
22+ security_groups = [module . vpc . powerbi_gw_security_group_id ]
23+ }
Original file line number Diff line number Diff line change @@ -3,3 +3,21 @@ module "int-glue" {
33 name_prefix = " nhsd-nrlf--int"
44 python_version = 3
55}
6+
7+ module "int-glue" {
8+ source = " ../modules/glue"
9+ name_prefix = " nhsd-nrlf--int-sandbox"
10+ python_version = 3
11+ }
12+
13+ module "int-glue" {
14+ source = " ../modules/glue"
15+ name_prefix = " nhsd-nrlf--qa"
16+ python_version = 3
17+ }
18+
19+ module "int-glue" {
20+ source = " ../modules/glue"
21+ name_prefix = " nhsd-nrlf--ref"
22+ python_version = 3
23+ }
Original file line number Diff line number Diff line change @@ -28,3 +28,45 @@ variable "ref_api_domain_name" {
2828 description = " The internal DNS name of the API Gateway for the ref environment"
2929 default = " ref.api.record-locator.ref.national.nhs.uk"
3030}
31+
32+ variable "aws_azs" {
33+ type = string
34+ description = " AWS Availability Zones"
35+ default = " eu-west-2a"
36+ }
37+
38+ variable "enable_dns_hostnames" {
39+ type = bool
40+ description = " Enable DNS hostnames in VPC"
41+ default = true
42+ }
43+
44+ variable "vpc_cidr_block" {
45+ type = string
46+ description = " Base CIDR Block for VPC"
47+ default = " 10.0.0.0/16"
48+ }
49+
50+ variable "vpc_public_subnets_cidr_block" {
51+ type = string
52+ description = " CIDR Block for Public Subnets in VPC"
53+ default = " 10.0.0.0/24"
54+ }
55+
56+ variable "vpc_private_subnets_cidr_block" {
57+ type = string
58+ description = " CIDR Block for Private Subnets in VPC"
59+ default = " 10.0.1.0/24"
60+ }
61+
62+ variable "instance_type" {
63+ type = string
64+ description = " Type for EC2 Instance"
65+ default = " t2.micro"
66+ }
67+
68+ variable "use_custom_ami" {
69+ type = bool
70+ description = " Use custom image"
71+ default = false
72+ }
Original file line number Diff line number Diff line change @@ -43,11 +43,9 @@ data "external" "current-info" {
4343}
4444
4545data "aws_s3_bucket" "source-data-bucket" {
46- count = local. is_dev_env && ! local. is_sandbox_env ? 1 : 0
4746 bucket = " ${ local . shared_prefix } -source-data-bucket"
4847}
4948
5049data "aws_kms_key" "glue" {
51- count = local. is_dev_env && ! local. is_sandbox_env ? 1 : 0
5250 key_id = " alias/${ local . shared_prefix } -glue"
5351}
Original file line number Diff line number Diff line change 11module "firehose__processor" {
2- source = " ./modules/firehose"
3- assume_account = local. aws_account_id
4- prefix = local. prefix
5- region = local. region
6- environment = local. environment
7- cloudwatch_kms_arn = module. kms__cloudwatch . kms_arn
8- splunk_environment = local. splunk_environment
9- splunk_index = local. splunk_index
10- destination = " splunk"
11- reporting_bucket_arn = local. reporting_bucket_arn
12- reporting_kms_arn = local. reporting_kms_arn
13- reporting_infra_toggle = local. is_dev_env && ! local. is_sandbox_env
2+ source = " ./modules/firehose"
3+ assume_account = local. aws_account_id
4+ prefix = local. prefix
5+ region = local. region
6+ environment = local. environment
7+ cloudwatch_kms_arn = module. kms__cloudwatch . kms_arn
8+ splunk_environment = local. splunk_environment
9+ splunk_index = local. splunk_index
10+ destination = " splunk"
11+ reporting_bucket_arn = local. reporting_bucket_arn
12+ reporting_kms_arn = local. reporting_kms_arn
1413}
You can’t perform that action at this time.
0 commit comments