Skip to content

Commit

Permalink
added more outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Feb 18, 2025
1 parent 4f7f043 commit b0a72ed
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,16 @@ sys 0m2.015s

| Name | Description |
|------|-------------|
| <a name="output_console_access_roles"></a> [console\_access\_roles](#output\_console\_access\_roles) | List of console access roles deployed to the cluster |
| <a name="output_efs_dns_name"></a> [efs\_dns\_name](#output\_efs\_dns\_name) | The DNS name for the EFS filesystem |
| <a name="output_efs_filesystem_arn"></a> [efs\_filesystem\_arn](#output\_efs\_filesystem\_arn) | The ARN of the EFS filesystem |
| <a name="output_efs_filesystem_id"></a> [efs\_filesystem\_id](#output\_efs\_filesystem\_id) | The ID of the EFS filesystem created for the cluster |
| <a name="output_module_name"></a> [module\_name](#output\_module\_name) | The name of this module. |
| <a name="output_module_version"></a> [module\_version](#output\_module\_version) | The version of this module. |
| <a name="output_network_policies"></a> [network\_policies](#output\_network\_policies) | Map of network policies applied to namespaces |
| <a name="output_operators_namespace"></a> [operators\_namespace](#output\_operators\_namespace) | The namespace for the operators. |
| <a name="output_operators_namespace_labels"></a> [operators\_namespace\_labels](#output\_operators\_namespace\_labels) | Labels applied to the operators namespace |
| <a name="output_rwo_storage_class"></a> [rwo\_storage\_class](#output\_rwo\_storage\_class) | Kubernetes storage class that supports read/write once. |
| <a name="output_rwx_storage_class"></a> [rwx\_storage\_class](#output\_rwx\_storage\_class) | Kubernetes storage class that supports read/write many. |
| <a name="output_storage_classes"></a> [storage\_classes](#output\_storage\_classes) | Map of all storage class names and their configurations |
<!-- END_TF_DOCS -->
71 changes: 71 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,49 @@ output "rwx_storage_class" {
value = kubernetes_storage_class.efs_sc.metadata[0].name
}

output "storage_classes" {
description = "Map of all storage class names and their configurations"
value = {
gp3_encrypted = {
name = kubernetes_storage_class.gp3_encrypted.metadata[0].name
is_default = true
provisioner = kubernetes_storage_class.gp3_encrypted.storage_provisioner
volume_binding_mode = kubernetes_storage_class.gp3_encrypted.volume_binding_mode
}
gp2_encrypted = {
name = kubernetes_storage_class.ebs_encrypted.metadata[0].name
is_default = false
provisioner = kubernetes_storage_class.ebs_encrypted.storage_provisioner
volume_binding_mode = kubernetes_storage_class.ebs_encrypted.volume_binding_mode
}
efs = {
name = kubernetes_storage_class.efs_sc.metadata[0].name
is_default = false
provisioner = kubernetes_storage_class.efs_sc.storage_provisioner
volume_binding_mode = kubernetes_storage_class.efs_sc.volume_binding_mode
}
}
}

################################################################################
# EFS Configuration
################################################################################

output "efs_filesystem_id" {
description = "The ID of the EFS filesystem created for the cluster"
value = module.efs.id
}

output "efs_filesystem_arn" {
description = "The ARN of the EFS filesystem"
value = module.efs.arn
}

output "efs_dns_name" {
description = "The DNS name for the EFS filesystem"
value = module.efs.dns_name
}

################################################################################
# Operators
################################################################################
Expand All @@ -34,3 +77,31 @@ output "operators_namespace" {
description = "The namespace for the operators."
value = kubernetes_namespace.operators.metadata[0].name
}

output "operators_namespace_labels" {
description = "Labels applied to the operators namespace"
value = kubernetes_namespace.operators.metadata[0].labels
}

################################################################################
# Network Policies
################################################################################

output "network_policies" {
description = "Map of network policies applied to namespaces"
value = {
operators = {
name = kubernetes_network_policy.operators_default.metadata[0].name
namespace = kubernetes_network_policy.operators_default.metadata[0].namespace
}
}
}

################################################################################
# Console Access
################################################################################

output "console_access_roles" {
description = "List of console access roles deployed to the cluster"
value = [for release in helm_release.console_access : release.name]
}

0 comments on commit b0a72ed

Please sign in to comment.