Skip to content
This repository was archived by the owner on Sep 27, 2024. It is now read-only.

Commit d7e7d5c

Browse files
bushong1github-actions[bot]pre-commit-ci-lite[bot]
authored
configure precommit ci (#28)
* Adding pre-commit config * Adding markdown files * terraform-docs: automated action * Readme test * [pre-commit.ci lite] apply automatic fixes * combine docs + precommit --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
1 parent c80505f commit d7e7d5c

File tree

7 files changed

+174
-49
lines changed

7 files changed

+174
-49
lines changed

.github/workflows/pre-commit.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
on:
2+
pull_request:
3+
push:
4+
branches: [main]
5+
6+
jobs:
7+
pre_commit:
8+
name: Run pre-commit and commit any autocorrections
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Setup Terraform
13+
uses: hashicorp/setup-terraform@v3
14+
with:
15+
terraform_version: 1.6.6
16+
- name: Setup Terragrunt
17+
uses: autero1/action-terragrunt@v1.1.0
18+
with:
19+
terragrunt_version: 0.54.8
20+
# To avoid rate-limiting
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
- uses: terraform-linters/setup-tflint@v3
23+
name: TFLint - Setup
24+
with:
25+
tflint_version: latest
26+
27+
- name: TFLint - Init
28+
run: tflint --init
29+
env:
30+
# https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/plugins.md#avoiding-rate-limiting
31+
GITHUB_TOKEN: ${{ github.token }}
32+
- name: TFLint - Show version
33+
run: tflint --version
34+
- uses: actions/setup-python@v4
35+
with:
36+
python-version: 3.x
37+
- name: Terraform Docs - Install
38+
run: |
39+
curl -sSLo ./terraform-docs.tar.gz https://terraform-docs.io/dl/v0.17.0/terraform-docs-v0.17.0-$(uname)-amd64.tar.gz
40+
tar -xzf terraform-docs.tar.gz -- terraform-docs
41+
chmod +x terraform-docs
42+
echo $PATH
43+
mv terraform-docs /usr/local/bin/terraform-docs
44+
terraform-docs --version
45+
- uses: pre-commit/action@v3.0.0
46+
- uses: pre-commit-ci/lite-action@v1.0.1
47+
if: always()

.pre-commit-config.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,30 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.4.0
5+
rev: v4.5.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
99
- id: check-yaml
1010
args: ["--allow-multiple-documents"]
1111
- id: check-added-large-files
1212
- repo: https://github.com/antonbabenko/pre-commit-terraform
13-
rev: v1.77.0 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases
13+
rev: v1.85.0 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases
1414
hooks:
1515
- id: terraform_fmt # args: ["--enable require-variable-braces,deprecate-which"]
1616
- id: terraform_tflint
17-
exclude: .*
17+
args:
18+
- "--args=--fix"
1819
- id: terragrunt_fmt
1920
- id: terraform_docs
21+
ci:
22+
autofix_commit_msg: |
23+
[pre-commit.ci] auto fixes from pre-commit.com hooks
24+
25+
for more information, see https://pre-commit.ci
26+
autofix_prs: true
27+
autoupdate_branch: ''
28+
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
29+
autoupdate_schedule: weekly
30+
skip: [terraform_fmt, terraform_tflint, terragrunt_fmt, terraform_docs]
31+
submodules: false

LICENSE.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# License
2+
3+
As a work of the [United States government](https://www.usa.gov/), this project
4+
is in the public domain within the United States of America.
5+
6+
Additionally, we waive copyright and related rights in the work worldwide
7+
through the CC0 1.0 Universal public domain dedication.
8+
9+
## CC0 1.0 Universal Summary
10+
11+
This is a human-readable summary of the [Legal Code (read the full
12+
text)](https://creativecommons.org/publicdomain/zero/1.0/legalcode).
13+
14+
### No Copyright
15+
16+
The person who associated a work with this deed has dedicated the work to the
17+
public domain by waiving all of their rights to the work worldwide under
18+
copyright law, including all related and neighboring rights, to the extent
19+
allowed by law.
20+
21+
You can copy, modify, distribute, and perform the work, even for commercial
22+
purposes, all without asking permission.
23+
24+
### Other Information
25+
26+
In no way are the patent or trademark rights of any person affected by CC0, nor
27+
are the rights that other persons may have in the work or in how the work is
28+
used, such as publicity or privacy rights.
29+
30+
Unless expressly stated otherwise, the person who associated a work with this
31+
deed makes no warranties about the work, and disclaims liability for all uses
32+
of the work, to the fullest extent permitted by applicable law. When using or
33+
citing the work, you should not imply endorsement by the author or the
34+
affirmer.

README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# batcave-tf-autoscaler
2+
3+
<!-- BEGIN_TF_DOCS -->
4+
## Requirements
5+
6+
| Name | Version |
7+
|------|---------|
8+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
9+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.0.0 |
10+
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | ~> 2.11.0 |
11+
| <a name="requirement_kubernetes"></a> [kubernetes](#requirement\_kubernetes) | ~> 2.23.0 |
12+
13+
## Providers
14+
15+
| Name | Version |
16+
|------|---------|
17+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.0.0 |
18+
| <a name="provider_helm"></a> [helm](#provider\_helm) | ~> 2.11.0 |
19+
20+
## Modules
21+
22+
| Name | Source | Version |
23+
|------|--------|---------|
24+
| <a name="module_iam_assumable_role_admin"></a> [iam\_assumable\_role\_admin](#module\_iam\_assumable\_role\_admin) | terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks | 5.30.0 |
25+
26+
## Resources
27+
28+
| Name | Type |
29+
|------|------|
30+
| [helm_release.autoscaler](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
31+
| [aws_eks_cluster_auth.cluster](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/eks_cluster_auth) | data source |
32+
33+
## Inputs
34+
35+
| Name | Description | Type | Default | Required |
36+
|------|-------------|------|---------|:--------:|
37+
| <a name="input_additional_values"></a> [additional\_values](#input\_additional\_values) | Map of key/value pairs to pass to the autoscaler chart. | `map(any)` | `{}` | no |
38+
| <a name="input_autoscaler_expander_method"></a> [autoscaler\_expander\_method](#input\_autoscaler\_expander\_method) | Method by which CA will select a new instance to launch. Current options: random, most-pods, least-waste. See: https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders | `string` | `"least-waste"` | no |
39+
| <a name="input_aws_region"></a> [aws\_region](#input\_aws\_region) | n/a | `string` | `"us-east-1"` | no |
40+
| <a name="input_cluster_certificate_authority_data"></a> [cluster\_certificate\_authority\_data](#input\_cluster\_certificate\_authority\_data) | n/a | `string` | n/a | yes |
41+
| <a name="input_cluster_endpoint"></a> [cluster\_endpoint](#input\_cluster\_endpoint) | n/a | `string` | n/a | yes |
42+
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | n/a | `string` | n/a | yes |
43+
| <a name="input_cluster_version"></a> [cluster\_version](#input\_cluster\_version) | The version of the cluster. Used to determine the version of the autoscaler to deploy. Defaults to the most recent version known by this module. | `string` | `""` | no |
44+
| <a name="input_cpu_limits"></a> [cpu\_limits](#input\_cpu\_limits) | Pod limit values | `string` | `"50m"` | no |
45+
| <a name="input_cpu_requests"></a> [cpu\_requests](#input\_cpu\_requests) | n/a | `string` | `"10m"` | no |
46+
| <a name="input_extraArgs"></a> [extraArgs](#input\_extraArgs) | List of extraArgs values to pass to the autoscaler chart. See: https://github.com/kubernetes/autoscaler/blob/master/charts/cluster-autoscaler/values.yaml#L165 | `map(any)` | `{}` | no |
47+
| <a name="input_helm_namespace"></a> [helm\_namespace](#input\_helm\_namespace) | ## Helm variables | `string` | `"kube-system"` | no |
48+
| <a name="input_iam_path"></a> [iam\_path](#input\_iam\_path) | n/a | `string` | `"/delegatedadmin/developer/"` | no |
49+
| <a name="input_memory_limits"></a> [memory\_limits](#input\_memory\_limits) | n/a | `string` | `"512Mi"` | no |
50+
| <a name="input_memory_requests"></a> [memory\_requests](#input\_memory\_requests) | n/a | `string` | `"50Mi"` | no |
51+
| <a name="input_monitoring_enabled"></a> [monitoring\_enabled](#input\_monitoring\_enabled) | Enable monitoring for the cluster autoscaler; Note that this should _not_ be enabled before bigbang is deployed, as it will fail to deploy since the monitoring namespace does not exist yet. | `bool` | `false` | no |
52+
| <a name="input_oidc_provider_arn"></a> [oidc\_provider\_arn](#input\_oidc\_provider\_arn) | n/a | `string` | `""` | no |
53+
| <a name="input_permissions_boundary"></a> [permissions\_boundary](#input\_permissions\_boundary) | n/a | `string` | `"arn:aws:iam::373346310182:policy/cms-cloud-admin/developer-boundary-policy"` | no |
54+
55+
## Outputs
56+
57+
| Name | Description |
58+
|------|-------------|
59+
| <a name="output_oidc_iam_role_arn"></a> [oidc\_iam\_role\_arn](#output\_oidc\_iam\_role\_arn) | n/a |
60+
<!-- END_TF_DOCS -->

Readme.md

Lines changed: 0 additions & 45 deletions
This file was deleted.

SECURITY.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Security and Responsible Disclosure Policy
2+
3+
*Submit a vulnerability:* Unfortunately, we cannot accept secure submissions via
4+
email or via GitHub Issues. Please use our website to submit vulnerabilities at
5+
[https://hhs.responsibledisclosure.com](https://hhs.responsibledisclosure.com).
6+
HHS maintains an acknowledgements page to recognize your efforts on behalf of
7+
the American public, but you are also welcome to submit anonymously.
8+
9+
Review the HHS Disclosure Policy and websites in scope:
10+
[https://www.hhs.gov/vulnerability-disclosure-policy/index.html](https://www.hhs.gov/vulnerability-disclosure-policy/index.html).
11+
12+
This policy describes *what systems and types of research* are covered under this
13+
policy, *how to send* us vulnerability reports, and *how long* we ask security
14+
researchers to wait before publicly disclosing vulnerabilities.
15+
16+
If you have other cybersecurity related questions, please contact us at
17+
[csirc@hhs.gov.](mailto:csirc@hhs.gov).

output.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
output "oidc_iam_role_arn" {
22
value = module.iam_assumable_role_admin.iam_role_arn
3-
}
3+
}

0 commit comments

Comments
 (0)