outputs.tf 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. output "cluster_name" {
  2. description = "Name of the EKS cluster."
  3. value = aws_eks_cluster.this.name
  4. }
  5. output "cluster_arn" {
  6. description = "ARN of the EKS cluster."
  7. value = aws_eks_cluster.this.arn
  8. }
  9. output "cluster_version" {
  10. description = "Kubernetes version of the EKS cluster."
  11. value = aws_eks_cluster.this.version
  12. }
  13. output "cluster_endpoint" {
  14. description = "Kubernetes API server endpoint."
  15. value = aws_eks_cluster.this.endpoint
  16. }
  17. output "cluster_certificate_authority_data" {
  18. description = "Base64-encoded certificate data required for Kubernetes clients."
  19. value = aws_eks_cluster.this.certificate_authority[0].data
  20. sensitive = true
  21. }
  22. output "cluster_oidc_issuer_url" {
  23. description = "OIDC issuer URL for the cluster."
  24. value = aws_eks_cluster.this.identity[0].oidc[0].issuer
  25. }
  26. output "oidc_provider_arn" {
  27. description = "ARN of the IAM OIDC provider for the cluster."
  28. value = aws_iam_openid_connect_provider.this.arn
  29. }
  30. output "vpc_id" {
  31. description = "ID of the VPC used by the cluster."
  32. value = local.vpc_id
  33. }
  34. output "public_subnet_ids" {
  35. description = "IDs of the public subnets used by the cluster."
  36. value = local.public_subnet_ids
  37. }
  38. output "private_subnet_ids" {
  39. description = "IDs of the private subnets used by the cluster."
  40. value = local.private_subnet_ids
  41. }
  42. output "node_group_name" {
  43. description = "Name of the managed node group."
  44. value = aws_eks_node_group.default.node_group_name
  45. }
  46. output "node_role_name" {
  47. description = "IAM role name used by the default managed node group."
  48. value = aws_iam_role.node.name
  49. }
  50. output "installed_addons" {
  51. description = "Managed EKS addons configured by this module."
  52. value = compact([
  53. aws_eks_addon.coredns.addon_name,
  54. aws_eks_addon.kube_proxy.addon_name,
  55. aws_eks_addon.vpc_cni.addon_name,
  56. aws_eks_addon.pod_identity_agent.addon_name,
  57. ])
  58. }
  59. output "cluster_admin_principal_arns" {
  60. description = "IAM principals granted cluster-admin access through EKS access entries."
  61. value = [for entry in aws_eks_access_entry.cluster_admins : entry.principal_arn]
  62. }
  63. output "configure_kubectl" {
  64. description = "Command to update local kubeconfig for the cluster."
  65. value = "aws eks update-kubeconfig --region ${var.region} --name ${aws_eks_cluster.this.name}"
  66. }