From 5c0d8cf6388c5fcc3edc2b9e2c7e8e72889c8fe7 Mon Sep 17 00:00:00 2001 From: tomarv2 Date: Tue, 4 Apr 2023 04:54:47 +0000 Subject: [PATCH 1/2] Sync from management repo --- .github/workflows/security_scans.yml | 33 --------------------- .pre-commit-config.yaml | 44 +++++++++++++++++----------- README.md | 35 +++++----------------- examples/main.tf | 4 +-- locals.tf | 2 +- providers.tf | 2 +- 6 files changed, 39 insertions(+), 81 deletions(-) delete mode 100644 .github/workflows/security_scans.yml diff --git a/.github/workflows/security_scans.yml b/.github/workflows/security_scans.yml deleted file mode 100644 index d5b2df0..0000000 --- a/.github/workflows/security_scans.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Security Scans - -on: - push: - branches: - - develop - - main - paths-ignore: - - 'README.md' - - 'LICENSE' - - '.gitignore' - - '**.md' - pull_request: - paths-ignore: - - 'README.md' - - 'LICENSE' - - '.gitignore' - - '**.md' - -jobs: - scans: - name: Security Scans - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Checkov Scan - id: checkov - uses: bridgecrewio/checkov-action@master - with: - directory: "." - framework: terraform # optional: run only on a specific infrastructure {cloudformation,terraform,kubernetes,all} - output_format: json # optional: the output format, one of: cli, json, junitxml, github_failed_only diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f971f4d..fb589da 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,24 +1,24 @@ repos: - repo: https://github.com/antonbabenko/pre-commit-terraform - rev: v1.76.0 + rev: v1.77.1 hooks: - id: terraform_fmt - 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_naming_convention' - - '--args=--only=terraform_required_providers' - - '--args=--only=terraform_standard_module_structure' - - '--args=--only=terraform_workspace_remote' + - "--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_naming_convention" + - "--args=--only=terraform_required_providers" + - "--args=--only=terraform_standard_module_structure" + - "--args=--only=terraform_workspace_remote" - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.4.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -30,8 +30,18 @@ repos: - id: requirements-txt-fixer - repo: https://github.com/bridgecrewio/checkov.git - rev: '2.1.280' + rev: "2.1.280" hooks: - - id: checkov - verbose: true - args: [-d, '.', --framework, 'terraform', --skip-check, 'CKV2_AWS_5,CKV_AWS_134', --download-external-modules, 'True'] + - id: checkov + verbose: true + args: + [ + -d, + ".", + --framework, + "terraform", + --skip-check, + "CKV2_AWS_5,CKV_AWS_134", + --download-external-modules, + "True", + ] diff --git a/README.md b/README.md index abdbbde..009eaae 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ - - + +

## Terraform module for [AWS Elasticache](https://registry.terraform.io/modules/tomarv2/elasticache/aws/latest) @@ -101,44 +101,25 @@ Please refer to examples directory [link](examples) for references. ## Requirements -| Name | Version | -|------|---------| -| [terraform](#requirement\_terraform) | >= 1.0.1 | -| [aws](#requirement\_aws) | ~> 4.35 | +No requirements. ## Providers -| Name | Version | -|------|---------| -| [aws](#provider\_aws) | ~> 4.35 | +No providers. ## Modules -| Name | Source | Version | -|------|--------|---------| -| [global](#module\_global) | git::git@github.com:tomarv2/terraform-global.git//aws | v0.0.1 | +No modules. ## Resources -| Name | Type | -|------|------| -| [aws_elasticache_cluster.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_cluster) | resource | -| [aws_elasticache_parameter_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_parameter_group) | resource | -| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source | -| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source | +No resources. ## Inputs -| Name | Description | Type | Default | Required | -|------|-------------|------|---------|:--------:| -| [config](#input\_config) | Redis configuration | `map(any)` | `{}` | no | -| [extra\_tags](#input\_extra\_tags) | Additional tags to associate | `map(string)` | `{}` | no | +No inputs. ## Outputs -| Name | Description | -|------|-------------| -| [cluster\_address](#output\_cluster\_address) | Elasticache Cluster address | -| [cluster\_id](#output\_cluster\_id) | Elasticache Id | -| [parameter\_group](#output\_parameter\_group) | Elasticache Parameter Group | +No outputs. diff --git a/examples/main.tf b/examples/main.tf index d1525f7..0903768 100644 --- a/examples/main.tf +++ b/examples/main.tf @@ -2,7 +2,7 @@ terraform { required_version = ">= 1.0.1" required_providers { aws = { - version = "~> 4.35" + version = "~> 4.61" } } } @@ -29,7 +29,7 @@ module "redis" { } module "security_group" { - #source = "git::git@github.com:tomarv2/terraform-aws-security-group.git?ref=v0.0.12" + #source = "github.com/tomarv2/terraform-aws-security-group.git" source = "../../terraform-aws-security-group" config = { demo_redis = { diff --git a/locals.tf b/locals.tf index c89728d..c8e072d 100644 --- a/locals.tf +++ b/locals.tf @@ -1,5 +1,5 @@ module "global" { - source = "git::git@github.com:tomarv2/terraform-global.git//aws?ref=v0.0.1" + source = "github.com/tomarv2/terraform-global.git//aws?ref=v0.0.1" } locals { diff --git a/providers.tf b/providers.tf index 6c0e9ed..dbf0906 100644 --- a/providers.tf +++ b/providers.tf @@ -2,7 +2,7 @@ terraform { required_version = ">= 1.0.1" required_providers { aws = { - version = "~> 4.35" + version = "~> 4.61" } } } From 1497c4c60b1cb16e7c5a368f2c63029790f17567 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 4 Apr 2023 05:00:00 +0000 Subject: [PATCH 2/2] terraform-docs: automated action --- README.md | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 009eaae..cfa9b2e 100644 --- a/README.md +++ b/README.md @@ -101,25 +101,44 @@ Please refer to examples directory [link](examples) for references. ## Requirements -No requirements. +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 1.0.1 | +| [aws](#requirement\_aws) | ~> 4.61 | ## Providers -No providers. +| Name | Version | +|------|---------| +| [aws](#provider\_aws) | ~> 4.61 | ## Modules -No modules. +| Name | Source | Version | +|------|--------|---------| +| [global](#module\_global) | github.com/tomarv2/terraform-global.git//aws | v0.0.1 | ## Resources -No resources. +| Name | Type | +|------|------| +| [aws_elasticache_cluster.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_cluster) | resource | +| [aws_elasticache_parameter_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_parameter_group) | resource | +| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source | +| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source | ## Inputs -No inputs. +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [config](#input\_config) | Redis configuration | `map(any)` | `{}` | no | +| [extra\_tags](#input\_extra\_tags) | Additional tags to associate | `map(string)` | `{}` | no | ## Outputs -No outputs. +| Name | Description | +|------|-------------| +| [cluster\_address](#output\_cluster\_address) | Elasticache Cluster address | +| [cluster\_id](#output\_cluster\_id) | Elasticache Id | +| [parameter\_group](#output\_parameter\_group) | Elasticache Parameter Group |