Skip to content

Commit abfeb53

Browse files
committed
Fix variable references in Terragrunt configuration files
1 parent 7003d4b commit abfeb53

File tree

7 files changed

+126
-77
lines changed

7 files changed

+126
-77
lines changed

infrastructure/dev/us-east-2/compute/parallel-cluster/terragrunt.hcl

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,24 @@ inputs = {
7979

8080
# EFA Configuration
8181
efa = {
82-
enabled = local.efa_config.enabled
83-
gdr_support = local.efa_config.enable_gpudirect
82+
enabled = true
83+
gdr_support = false # Disabled for dev
8484
}
8585

8686
# Tags
87-
tags = merge(local.common_tags, {
87+
tags = {
8888
Name = local.cluster_name
8989
Type = "ParallelCluster"
9090
Purpose = "HPC-Compute"
91-
})
91+
Environment = local.environment
92+
Region = local.region
93+
}
9294

9395
# Additional variables for local Terraform resources
9496
environment = local.environment
9597
region = local.region
96-
common_tags = local.common_tags
98+
common_tags = {
99+
Environment = local.environment
100+
Region = local.region
101+
}
97102
}

infrastructure/dev/us-east-2/monitoring/cloudwatch/terragrunt.hcl

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,35 +23,42 @@ dependency "kms" {
2323
inputs = {
2424
# CloudWatch Log Groups
2525
log_groups = {
26-
for name, config in local.cloudwatch_config.log_groups : name => {
27-
name = config.name
28-
retention_in_days = config.retention_in_days
26+
hpc_system_logs = {
27+
name = "/aws/hpc/${local.environment}/system"
28+
retention_in_days = local.monitoring.cloudwatch.log_retention_days
29+
kms_key_id = dependency.kms.outputs.kms_key_arn
30+
}
31+
hpc_application_logs = {
32+
name = "/aws/hpc/${local.environment}/application"
33+
retention_in_days = local.monitoring.cloudwatch.log_retention_days
2934
kms_key_id = dependency.kms.outputs.kms_key_arn
3035
}
3136
}
3237

3338
# CloudWatch Alarms
3439
alarms = {
3540
high_queue_depth = {
36-
alarm_name = local.cloudwatch_config.alarms.high_queue_depth.alarm_name
37-
comparison_operator = local.cloudwatch_config.alarms.high_queue_depth.comparison_operator
38-
evaluation_periods = local.cloudwatch_config.alarms.high_queue_depth.evaluation_periods
39-
metric_name = local.cloudwatch_config.alarms.high_queue_depth.metric_name
40-
namespace = local.cloudwatch_config.alarms.high_queue_depth.namespace
41-
period = local.cloudwatch_config.alarms.high_queue_depth.period
42-
statistic = local.cloudwatch_config.alarms.high_queue_depth.statistic
43-
threshold = local.cloudwatch_config.alarms.high_queue_depth.threshold
44-
alarm_description = local.cloudwatch_config.alarms.high_queue_depth.alarm_description
41+
alarm_name = "hpc-${local.environment}-high-queue-depth"
42+
comparison_operator = "GreaterThanThreshold"
43+
evaluation_periods = "2"
44+
metric_name = "JobsQueued"
45+
namespace = "AWS/ParallelCluster"
46+
period = "300"
47+
statistic = "Average"
48+
threshold = "100"
49+
alarm_description = "This metric monitors high queue depth"
4550
alarm_actions = [dependency.kms.outputs.sns_topic_arn]
4651
ok_actions = [dependency.kms.outputs.sns_topic_arn]
47-
treat_missing_data = local.cloudwatch_config.alarms.high_queue_depth.treat_missing_data
52+
treat_missing_data = "notBreaching"
4853
}
4954
}
5055

5156
# Tags
52-
tags = merge(local.common_tags, {
57+
tags = {
5358
Name = "hpc-${local.environment}-cloudwatch"
5459
Type = "CloudWatch"
5560
Purpose = "Monitoring"
56-
})
61+
Environment = local.environment
62+
Region = local.region
63+
}
5764
}

infrastructure/dev/us-east-2/networking/efa-sg/terragrunt.hcl

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ dependency "vpc" {
2323
inputs = {
2424
cluster_name = "hpc-${local.environment}"
2525
vpc_id = dependency.vpc.outputs.vpc_id
26-
vpc_cidr = local.vpc_config.cidr_block
26+
vpc_cidr = local.networking.vpc_cidr
2727
subnet_id = dependency.vpc.outputs.compute_subnets[0]
28-
availability_zone = local.subnet_config.compute.availability_zones[0]
28+
availability_zone = local.networking.primary_az
2929

3030
# EFA Configuration
3131
efa_device = "efa0"
3232
mtu_size = 9000
3333
enable_gpudirect = false # Disabled for dev
3434

3535
# Instance Configuration
36-
instance_type = local.instance_types.compute.hpc_optimized
36+
instance_type = local.instance_types.compute
3737
ami_id = data.aws_ami.hpc_optimized.id
3838

3939
# EFA-specific settings
@@ -58,24 +58,29 @@ inputs = {
5858
cpu_credits = "standard"
5959

6060
# S3 Configuration
61-
s3_bucket_name = local.s3_config.data_repository.bucket_name
61+
s3_bucket_name = local.storage.s3.data_repository_bucket
6262

6363
# Monitoring Configuration
64-
log_retention_days = local.cloudwatch_config.log_groups.hpc_system_logs.retention_in_days
64+
log_retention_days = local.monitoring.cloudwatch.log_retention_days
6565
kms_key_id = aws_kms_key.hpc.arn
6666

6767
# Alarm Configuration
6868
alarm_actions = [aws_sns_topic.hpc_alerts.arn]
6969
ok_actions = [aws_sns_topic.hpc_alerts.arn]
7070

7171
# Tags
72-
tags = merge(local.common_tags, {
72+
tags = {
7373
Component = "EFA-Network"
7474
Tier = "HPC-Compute"
75-
})
75+
Environment = local.environment
76+
Region = local.region
77+
}
7678

7779
# Additional variables for local Terraform resources
7880
environment = local.environment
7981
region = local.region
80-
common_tags = local.common_tags
82+
common_tags = {
83+
Environment = local.environment
84+
Region = local.region
85+
}
8186
}

infrastructure/dev/us-east-2/networking/vpc/terragrunt.hcl

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ terraform {
1818
inputs = {
1919
# VPC Module inputs
2020
name = "hpc-${local.environment}-vpc"
21-
cidr = local.vpc_config.cidr_block
21+
cidr = local.networking.vpc_cidr
2222

23-
azs = local.subnet_config.private.availability_zones
24-
private_subnets = local.subnet_config.private.cidr_blocks
25-
public_subnets = local.subnet_config.public.cidr_blocks
23+
azs = local.availability_zones
24+
private_subnets = local.networking.subnet_cidrs.private
25+
public_subnets = local.networking.subnet_cidrs.public
2626

2727
# Additional subnets for HPC
28-
database_subnets = local.subnet_config.storage.cidr_blocks
29-
compute_subnets = local.subnet_config.compute.cidr_blocks
28+
database_subnets = local.networking.subnet_cidrs.storage
29+
compute_subnets = local.networking.subnet_cidrs.compute
3030

3131
# Enable DNS
32-
enable_dns_hostnames = local.vpc_config.enable_dns_hostnames
33-
enable_dns_support = local.vpc_config.enable_dns_support
32+
enable_dns_hostnames = true
33+
enable_dns_support = true
3434

3535
# Enable NAT Gateway (single for dev)
3636
enable_nat_gateway = true
@@ -46,36 +46,49 @@ inputs = {
4646
enable_s3_endpoint = true
4747

4848
# Tags
49-
tags = merge(local.common_tags, {
49+
tags = {
5050
Name = "hpc-${local.environment}-vpc"
5151
Type = "VPC"
52-
})
52+
Environment = local.environment
53+
Region = local.region
54+
}
5355

5456
# Subnet tags
55-
private_subnet_tags = merge(local.common_tags, {
57+
private_subnet_tags = {
5658
Type = "Private-Subnet"
5759
Tier = "Compute"
58-
})
60+
Environment = local.environment
61+
Region = local.region
62+
}
5963

60-
public_subnet_tags = merge(local.common_tags, {
64+
public_subnet_tags = {
6165
Type = "Public-Subnet"
6266
Tier = "Management"
63-
})
67+
Environment = local.environment
68+
Region = local.region
69+
}
6470

65-
database_subnet_tags = merge(local.common_tags, {
71+
database_subnet_tags = {
6672
Type = "Database-Subnet"
6773
Tier = "Storage"
68-
})
74+
Environment = local.environment
75+
Region = local.region
76+
}
6977

70-
compute_subnet_tags = merge(local.common_tags, {
78+
compute_subnet_tags = {
7179
Type = "Compute-Subnet"
7280
Tier = "HPC-Compute"
73-
})
81+
Environment = local.environment
82+
Region = local.region
83+
}
7484

7585
# Additional variables for local Terraform resources
7686
environment = local.environment
7787
region = local.region
78-
vpc_cidr = local.vpc_config.cidr_block
79-
common_tags = local.common_tags
88+
vpc_cidr = local.networking.vpc_cidr
89+
common_tags = {
90+
Environment = local.environment
91+
Region = local.region
92+
}
8093
}
8194

infrastructure/dev/us-east-2/storage/fsx-lustre-persistent/terragrunt.hcl

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,21 @@ inputs = {
2929
name = "hpc-${local.environment}-persistent"
3030

3131
# Storage Configuration
32-
storage_capacity = local.fsx_lustre_config.persistent.storage_capacity
33-
storage_type = local.fsx_lustre_config.persistent.storage_type
34-
deployment_type = local.fsx_lustre_config.persistent.deployment_type
35-
per_unit_storage_throughput = local.fsx_lustre_config.persistent.per_unit_storage_throughput
32+
storage_capacity = local.storage.fsx_lustre.persistent.storage_capacity
33+
storage_type = "SSD"
34+
deployment_type = "PERSISTENT_1"
35+
per_unit_storage_throughput = local.storage.fsx_lustre.persistent.per_unit_storage_throughput
3636

3737
# Data compression
38-
data_compression_type = local.fsx_lustre_config.persistent.data_compression_type
38+
data_compression_type = "LZ4"
3939

4040
# Auto import policy
41-
auto_import_policy = local.fsx_lustre_config.persistent.auto_import_policy
41+
auto_import_policy = "NEW_CHANGED"
4242

4343
# Backup Configuration
44-
automatic_backup_retention_days = local.fsx_lustre_config.persistent.automatic_backup_retention_days
45-
daily_automatic_backup_start_time = local.fsx_lustre_config.persistent.daily_automatic_backup_start_time
46-
weekly_maintenance_start_time = local.fsx_lustre_config.persistent.weekly_maintenance_start_time
44+
automatic_backup_retention_days = 7 # 7 days backup for persistent
45+
daily_automatic_backup_start_time = "03:00"
46+
weekly_maintenance_start_time = "1:00:00"
4747

4848
# Network Configuration
4949
subnet_ids = dependency.vpc.outputs.database_subnets
@@ -53,9 +53,11 @@ inputs = {
5353
data_repository_path = "s3://${dependency.s3_bucket.outputs.s3_bucket_id}/persistent"
5454

5555
# Tags
56-
tags = merge(local.common_tags, local.fsx_lustre_config.persistent.tags, {
56+
tags = {
5757
Name = "hpc-${local.environment}-persistent"
5858
Type = "FSx-Lustre"
5959
Purpose = "Persistent-Storage"
60-
})
60+
Environment = local.environment
61+
Region = local.region
62+
}
6163
}

infrastructure/dev/us-east-2/storage/fsx-lustre-scratch/terragrunt.hcl

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,21 @@ inputs = {
2929
name = "hpc-${local.environment}-scratch"
3030

3131
# Storage Configuration
32-
storage_capacity = local.fsx_lustre_config.scratch.storage_capacity
33-
storage_type = local.fsx_lustre_config.scratch.storage_type
34-
deployment_type = local.fsx_lustre_config.scratch.deployment_type
35-
per_unit_storage_throughput = local.fsx_lustre_config.scratch.per_unit_storage_throughput
32+
storage_capacity = local.storage.fsx_lustre.scratch.storage_capacity
33+
storage_type = "SSD"
34+
deployment_type = "SCRATCH_1"
35+
per_unit_storage_throughput = local.storage.fsx_lustre.scratch.per_unit_storage_throughput
3636

3737
# Data compression
38-
data_compression_type = local.fsx_lustre_config.scratch.data_compression_type
38+
data_compression_type = "LZ4"
3939

4040
# Auto import policy
41-
auto_import_policy = local.fsx_lustre_config.scratch.auto_import_policy
41+
auto_import_policy = "NEW_CHANGED"
4242

4343
# Backup Configuration
44-
automatic_backup_retention_days = local.fsx_lustre_config.scratch.automatic_backup_retention_days
45-
daily_automatic_backup_start_time = local.fsx_lustre_config.scratch.daily_automatic_backup_start_time
46-
weekly_maintenance_start_time = local.fsx_lustre_config.scratch.weekly_maintenance_start_time
44+
automatic_backup_retention_days = 0 # No backup for scratch
45+
daily_automatic_backup_start_time = "03:00"
46+
weekly_maintenance_start_time = "1:00:00"
4747

4848
# Network Configuration
4949
subnet_ids = dependency.vpc.outputs.database_subnets
@@ -53,9 +53,11 @@ inputs = {
5353
data_repository_path = "s3://${dependency.s3_bucket.outputs.s3_bucket_id}/scratch"
5454

5555
# Tags
56-
tags = merge(local.common_tags, local.fsx_lustre_config.scratch.tags, {
56+
tags = {
5757
Name = "hpc-${local.environment}-scratch"
5858
Type = "FSx-Lustre"
5959
Purpose = "Scratch-Storage"
60-
})
60+
Environment = local.environment
61+
Region = local.region
62+
}
6163
}

infrastructure/dev/us-east-2/storage/s3-data-repository/terragrunt.hcl

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,47 @@ dependency "kms" {
2222

2323
inputs = {
2424
# Bucket Configuration
25-
bucket = local.s3_config.data_repository.bucket_name
25+
bucket = local.storage.s3.data_repository_bucket
2626

2727
# Versioning
2828
versioning = {
29-
enabled = local.s3_config.data_repository.versioning_enabled
29+
enabled = true
3030
}
3131

3232
# Encryption
3333
server_side_encryption_configuration = {
3434
rule = {
3535
apply_server_side_encryption_by_default = {
36-
sse_algorithm = local.s3_config.data_repository.encryption_algorithm
36+
sse_algorithm = "AES256"
3737
}
3838
}
3939
}
4040

4141
# Lifecycle rules
42-
lifecycle_rule = local.s3_config.data_repository.lifecycle_rules
42+
lifecycle_rule = [
43+
{
44+
id = "transition_to_ia"
45+
enabled = true
46+
transition = [
47+
{
48+
days = 30
49+
storage_class = "STANDARD_IA"
50+
}
51+
]
52+
}
53+
]
4354

4455
# Intelligent tiering
45-
intelligent_tiering = local.s3_config.data_repository.intelligent_tiering
56+
intelligent_tiering = {
57+
enabled = true
58+
}
4659

4760
# Tags
48-
tags = merge(local.common_tags, {
61+
tags = {
4962
Name = "hpc-${local.environment}-data-repository"
5063
Type = "S3-Bucket"
5164
Purpose = "Data-Repository"
52-
})
65+
Environment = local.environment
66+
Region = local.region
67+
}
5368
}

0 commit comments

Comments
 (0)