Skip to content

Commit

Permalink
Merge pull request #2 from aws-ia/2022-02-13-checkov-skip-check-for-a…
Browse files Browse the repository at this point in the history
…pi-groups

fix: Adding `checkov` ignore rule `CKV_K8S_49` for `kubernetes_role` on main.tf
  • Loading branch information
rodrigobersa authored Feb 14, 2023
2 parents ecb9a99 + 1fb24e9 commit 12a1438
Show file tree
Hide file tree
Showing 16 changed files with 45 additions and 334 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ terraform.rc
go.mod
go.sum

.DS_Store
.DS_Store
63 changes: 0 additions & 63 deletions .header.md

This file was deleted.

45 changes: 36 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,38 @@
---
fail_fast: false
minimum_pre_commit_version: "2.6.0"
repos:
-
repo: https://github.com/aws-ia/pre-commit-configs
# To update run:
# pre-commit autoupdate --freeze
rev: 80ed3f0a164f282afaac0b6aec70e20f7e541932 # frozen: v1.5.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: aws-ia-meta-hook
- id: trailing-whitespace
args: ['--markdown-linebreak-ext=md']
- id: end-of-file-fixer
- id: check-merge-conflict
- id: detect-private-key
- id: detect-aws-credentials
args: ['--allow-missing-credentials']
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.77.1
hooks:
- id: terraform_fmt
- id: terraform_docs
args:
- '--args=--lockfile=false'
- id: terraform_tflint
args:
- '--args=--only=terraform_deprecated_interpolation'
- '--args=--only=terraform_deprecated_index'
- '--args=--only=terraform_unused_declarations'
- '--args=--only=terraform_comment_syntax'
- '--args=--only=terraform_documented_outputs'
- '--args=--only=terraform_documented_variables'
- '--args=--only=terraform_typed_variables'
- '--args=--only=terraform_module_pinned_source'
- '--args=--only=terraform_naming_convention'
- '--args=--only=terraform_required_version'
- '--args=--only=terraform_required_providers'
- '--args=--only=terraform_standard_module_structure'
- '--args=--only=terraform_workspace_remote'
- id: terraform_validate
exclude: deploy
- id: terraform_tfsec
args:
- --args=--concise-output
21 changes: 0 additions & 21 deletions .terraform-docs.yaml

This file was deleted.

66 changes: 0 additions & 66 deletions .tflint.hcl

This file was deleted.

39 changes: 0 additions & 39 deletions .tfsec/launch_configuration_imdsv2_tfchecks.json

This file was deleted.

39 changes: 0 additions & 39 deletions .tfsec/launch_template_imdsv2_tfchecks.json

This file was deleted.

27 changes: 0 additions & 27 deletions .tfsec/no_launch_config_tfchecks.json

This file was deleted.

27 changes: 0 additions & 27 deletions .tfsec/sg_no_embedded_egress_rules_tfchecks.json

This file was deleted.

27 changes: 0 additions & 27 deletions .tfsec/sg_no_embedded_ingress_rules_tfchecks.json

This file was deleted.

2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @aws-ia/aws-ia
* @aws-ia/aws-ia
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ Make sure to replace the `${eks_cluster_id}`, `${AWS_REGION}` and `${TEAM_ROLE_A
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.72 |
| <a name="requirement_awscc"></a> [awscc](#requirement\_awscc) | >= 0.24.0 |
| <a name="requirement_kubectl"></a> [kubectl](#requirement\_kubectl) | >= 1.14 |
| <a name="requirement_kubernetes"></a> [kubernetes](#requirement\_kubernetes) | >= 2.10 |

Expand Down
2 changes: 1 addition & 1 deletion examples/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ No inputs.
## Outputs

No outputs.
<!-- END_TF_DOCS -->
<!-- END_TF_DOCS -->
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ resource "kubernetes_cluster_role_binding" "team" {

resource "kubernetes_role" "team" {
for_each = var.application_teams
#checkov:skip=CKV_K8S_49:API Groups access required for first deployment.
metadata {
name = "${each.key}-role"
namespace = kubernetes_namespace.team[each.key].metadata[0].name
Expand Down
Loading

0 comments on commit 12a1438

Please sign in to comment.