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 <steffen.pingel@tasktop.com>
This commit is contained in:
Steffen Pingel
2019-03-05 08:54:09 +01:00
committed by Max Williams
parent 87114b0bd0
commit d473b71024
3 changed files with 13 additions and 0 deletions

View File

@@ -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]

View File

@@ -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. |

View File

@@ -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}"