Skip to content

Commit 9e0ce0b

Browse files
authored
cleanup and add iam role outputs (#1)
1 parent 62b9a8a commit 9e0ce0b

File tree

6 files changed

+48
-9
lines changed

6 files changed

+48
-9
lines changed

.github/workflows/check.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: check
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build:
6+
runs-on: macOS-latest
7+
steps:
8+
- uses: actions/checkout@v1
9+
10+
- name: Install prereq
11+
run: |
12+
brew install docker tfenv tflint
13+
tfenv install
14+
15+
- name: tf fmt
16+
run: |
17+
terraform fmt
18+
- name: tflint
19+
run: |
20+
tflint

.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
repos:
3+
- repo: git://github.com/antonbabenko/pre-commit-terraform
4+
rev: v1.24.0
5+
hooks:
6+
- id: terraform_fmt
7+
- id: terraform_docs
8+
- repo: https://github.com/pre-commit/pre-commit-hooks
9+
rev: v2.4.0
10+
hooks:
11+
- id: end-of-file-fixer
12+
- id: trailing-whitespace
13+
- id: no-commit-to-branch

.terraform-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.12.23

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 Rhythmic Technologies, Inc.
3+
Copyright (c) 2020 Rhythmic Technologies, Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# terraform-aws-eks-iam-cluster-autoscaler
22
[![](https://github.com/rhythmictech/terraform-aws-eks-iam-cluster-autoscaler/workflows/check/badge.svg)](https://github.com/rhythmictech/terraform-aws-eks-iam-cluster-autoscaler/actions)
33

4-
Configure IAM role and related policies to use EKS Service Accounts with the external-dns service.
4+
Configure IAM role and related policies to use the EKS cluster autoscaler
55

66
## Usage
77
```
@@ -22,13 +22,14 @@ module "cluster_autoscaler" {
2222
|------|-------------|:----:|:-----:|:-----:|
2323
| cluster\_name | | string | n/a | yes |
2424
| issuer\_url | OIDC issuer URL \(include prefix\) | string | n/a | yes |
25-
| kubernetes\_namespace | Namespace to operate in \(service accounts and pods must be in the same namespace\) | string | `"default"` | no |
26-
| service\_account | Name of service account to create \(computed based on cluster name if not specified\) | string | `""` | no |
25+
| kubernetes\_namespace | Namespace to operate in \(service accounts and pods must be in the same namespace\) | string | `"kube-system"` | no |
26+
| service\_account | Name of service account to create | string | `""` | no |
2727

2828
## Outputs
2929

3030
| Name | Description |
3131
|------|-------------|
32-
| aws\_account\_id | |
32+
| iam\_role\_cluster\_autoscaler\_arn | |
33+
| iam\_role\_cluster\_autoscaler\_name | |
3334

34-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
35+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

outputs.tf

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
output "aws_account_id" {
2-
value = data.aws_caller_identity.current.account_id
3-
}
1+
output "iam_role_cluster_autoscaler_arn" {
2+
value = aws_iam_role.cluster_autoscaler.arn
3+
}
4+
5+
output "iam_role_cluster_autoscaler_name" {
6+
value = aws_iam_role.cluster_autoscaler.name
7+
}

0 commit comments

Comments
 (0)