From d473b710242c6af5210fcee34b937c67afcde978 Mon Sep 17 00:00:00 2001 From: Steffen Pingel Date: Tue, 5 Mar 2019 08:54:09 +0100 Subject: [PATCH] Add outputs for cluster role ARN and name (#290) This enables attaching additional policies, e.g. for using encrypted volumes, to the cluster. Signed-off-by: Steffen Pingel --- CHANGELOG.md | 1 + README.md | 2 ++ outputs.tf | 10 ++++++++++ 3 files changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02c0678..4e7d8b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ project adheres to [Semantic Versioning](http://semver.org/). ### Added - Added output for generated kubeconfig filename (by @syst0m) +- Added outputs for cluster role ARN and name (by @spingel) ## [[v2.2.0](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v2.1.0...v2.2.0)] - 2019-02-07] diff --git a/README.md b/README.md index 93411bd..4c2cee6 100644 --- a/README.md +++ b/README.md @@ -156,6 +156,8 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a | cluster\_certificate\_authority\_data | Nested attribute containing certificate-authority-data for your cluster. This is the base64 encoded certificate data required to communicate with your cluster. | | cluster\_endpoint | The endpoint for your EKS Kubernetes API. | | cluster\_id | The name/id of the EKS cluster. | +| cluster\_role\_arn | IAM role ARN of the EKS cluster role. | +| cluster\_role\_name | IAM role name of the EKS cluster role. | | cluster\_security\_group\_id | Security group ID attached to the EKS cluster. | | cluster\_version | The Kubernetes server version for the EKS cluster. | | config\_map\_aws\_auth | A kubernetes configuration to authenticate to this EKS cluster. | diff --git a/outputs.tf b/outputs.tf index dee4b7c..e0b5420 100644 --- a/outputs.tf +++ b/outputs.tf @@ -34,6 +34,16 @@ output "config_map_aws_auth" { value = "${data.template_file.config_map_aws_auth.rendered}" } +output "cluster_iam_role_name" { + description = "IAM role name of the EKS cluster." + value = "${aws_iam_role.cluster.name}" +} + +output "cluster_iam_role_arn" { + description = "IAM role ARN of the EKS cluster." + value = "${aws_iam_role.cluster.arn}" +} + output "kubeconfig" { description = "kubectl config file contents for this EKS cluster." value = "${data.template_file.kubeconfig.rendered}"