-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutput.tf
109 lines (91 loc) · 4.25 KB
/
output.tf
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# From https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/outputs.tf
################################################################################
# IAM role details
################################################################################
output "platform_iam_role_enabled" {
description = "Flag to enable IAM role for the platform. If false, the user will be created."
value = !var.platform_user_enabled
}
output "platform_iam_role_arn" {
description = "The platform IAM role arn"
value = var.platform_user_enabled ? "" : aws_iam_role.truefoundry_platform_feature_iam_role[0].arn
}
output "platform_iam_role_assume_role_arns" {
description = "The role arns that can assume the platform IAM role"
value = var.platform_user_enabled ? [] : var.control_plane_roles
}
output "platform_iam_role_policy_arns" {
description = "The platform IAM role policy arns"
value = var.platform_user_enabled ? [] : local.truefoundry_platform_policy_arns
}
################################################################################
# User details
################################################################################
output "platform_user_enabled" {
description = "Flag to enable user for the platform. If false, the iam role will be created."
value = var.platform_user_enabled
}
output "platform_user_access_key" {
description = "The user access key ID"
value = var.platform_user_enabled ? aws_iam_access_key.truefoundry_platform_user_keys[0].id : ""
}
output "platform_user_secret_key" {
description = "The user secret key"
value = var.platform_user_enabled ? aws_iam_access_key.truefoundry_platform_user_keys[0].secret : ""
sensitive = true
}
output "platform_user_arn" {
description = "The user IAM resource arn"
value = var.platform_user_enabled ? aws_iam_user.truefoundry_platform_user[0].arn : ""
}
################################################################################
# Bucket details
################################################################################
output "platform_bucket_enabled" {
description = "Flag to enable S3 bucket for the platform"
value = var.feature_blob_storage_enabled
}
output "platform_bucket_name" {
description = "Name/ID of the S3 bucket"
value = var.feature_blob_storage_enabled ? module.truefoundry_bucket[0].s3_bucket_id : ""
}
output "platform_bucket_arn" {
description = "ARN of the S3 bucket"
value = var.feature_blob_storage_enabled ? module.truefoundry_bucket[0].s3_bucket_arn : ""
}
output "blob_storage_uri" {
description = "URI of the S3 bucket"
value = var.feature_blob_storage_enabled ? "s3://${module.truefoundry_bucket[0].s3_bucket_id}" : ""
}
################################################################################
# ECR details
################################################################################
output "platform_ecr_enabled" {
description = "Flag to enable ECR for the platform"
value = var.feature_docker_registry_enabled
}
output "platform_ecr_url" {
description = "The ECR url to connect"
value = var.feature_docker_registry_enabled ? "${var.aws_account_id}.dkr.ecr.${var.aws_region}.amazonaws.com" : ""
}
################################################################################
# Secrets Manager details
################################################################################
output "platform_secrets_manager_enabled" {
description = "Flag to enable Secrets Manager for the platform"
value = var.feature_secrets_manager_enabled
}
################################################################################
# Parameter Store details
################################################################################
output "platform_ssm_enabled" {
description = "Flag to enable Parameter Store for the platform"
value = var.feature_parameter_store_enabled
}
################################################################################
# Cluster integration details
################################################################################
output "platform_cluster_integration_enabled" {
description = "Flag to enable cluster integration for the platform"
value = var.feature_cluster_integration_enabled
}