-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutput.tf
More file actions
82 lines (68 loc) · 2.76 KB
/
output.tf
File metadata and controls
82 lines (68 loc) · 2.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Network Output
output "vpc_id" {
description = "VPC ID (either created or provided)"
value = local.create_vpc ? aws_vpc.vpc[0].id : var.vpc_id
}
# S3 Outputs
output "managed_secrets_bucket" {
description = "S3 bucket for secrets storage"
value = local.create_secrets_bucket ? aws_s3_bucket.managed_secrets_bucket[0].id : null
}
output "managed_secrets_logging_bucket" {
description = "S3 bucket for secrets bucket logging"
value = local.create_secrets_bucket ? aws_s3_bucket.managed_secrets_logging_bucket[0].id : null
}
# KMS Output
output "pipeline_signing_kms_key" {
description = "KMS key ARN for pipeline signing"
value = local.create_signing_key ? aws_kms_key.pipeline_signing_kms_key[0].arn : null
}
# Auto Scaling Outputs
output "auto_scaling_group_name" {
description = "Name of the agent Auto Scaling Group"
value = aws_autoscaling_group.agent_auto_scale_group.id
}
output "auto_scaling_group_arn" {
description = "ARN of the agent Auto Scaling Group"
value = aws_autoscaling_group.agent_auto_scale_group.arn
}
# IAM Outputs
output "instance_role_arn" {
description = "ARN of the IAM role attached to agent instances"
value = local.use_custom_iam_role ? var.instance_role_arn : aws_iam_role.iam_role[0].arn
}
output "instance_role_name" {
description = "Name of the IAM role attached to agent instances"
value = local.use_custom_iam_role ? local.custom_role_name : aws_iam_role.iam_role[0].name
}
# Lambda Outputs
output "scaler_lambda_function_name" {
description = "Name of the Buildkite agent scaler Lambda function"
value = local.has_variable_size ? aws_lambda_function.scaler[0].function_name : null
}
output "scaler_lambda_function_arn" {
description = "ARN of the Buildkite agent scaler Lambda function"
value = local.has_variable_size ? aws_lambda_function.scaler[0].arn : null
}
output "scaler_log_group" {
description = "CloudWatch Log Group for the scaler Lambda"
value = local.has_variable_size ? aws_cloudwatch_log_group.scaler_lambda_logs[0].name : null
}
# Lifecycle Management Outputs
output "lifecycle_hook_name" {
description = "Name of the lifecycle hook for graceful termination"
value = local.enable_graceful_shutdown ? aws_autoscaling_lifecycle_hook.instance_terminating[0].name : null
}
# Launch Template / AMI Outputs
output "launch_template_id" {
description = "ID of the launch template used by the Auto Scaling Group"
value = aws_launch_template.agent_launch_template.id
}
output "launch_template_version" {
description = "Latest version of the launch template"
value = aws_launch_template.agent_launch_template.latest_version
}
output "image_id" {
description = "AMI ID used by agent instances"
value = local.computed_ami_id
}