From 0ead9a3212aebebc27316665d71ed8443f2412d3 Mon Sep 17 00:00:00 2001 From: tomarv2 Date: Wed, 23 Mar 2022 14:18:38 +0000 Subject: [PATCH 1/3] Sync from management repo --- .github/workflows/pre-commit.yml | 2 +- .gitignore | 24 +++++++++++------------- .pre-commit-config.yaml | 2 +- README.md | 22 +++++++++------------- examples/main.tf | 2 +- locals.tf | 7 ------- outputs.tf | 2 +- versions.tf => providers.tf | 2 +- tags.tf | 9 +++++++++ 9 files changed, 34 insertions(+), 38 deletions(-) rename versions.tf => providers.tf (77%) create mode 100755 tags.tf diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index dab48e9..90a5e52 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -25,7 +25,7 @@ jobs: - name: Build matrix id: matrix run: | - DIRS=$(python -c "import json; import glob; print(json.dumps([x.replace('/versions.tf', '') for x in glob.glob('./**/versions.tf', recursive=True)]))") + DIRS=$(python -c "import json; import glob; print(json.dumps([x.replace('/providers.tf', '') for x in glob.glob('./**/providers.tf', recursive=True)]))") echo "::set-output name=directories::$DIRS" outputs: directories: ${{ steps.matrix.outputs.directories }} diff --git a/.gitignore b/.gitignore index 1aaa5cc..17a644c 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ override.tf.json # example: *tfplan* .idea/ +.vscode/ .terraform.lock.hcl # go @@ -81,15 +82,10 @@ _testmain.go # Python # Editors -.vscode/ -.idea/ # Vagrant .vagrant/ -# Mac/OSX -.DS_Store - # Windows Thumbs.db @@ -99,9 +95,6 @@ __pycache__/ *.py[cod] *$py.class -# C extensions -*.so - # Distribution / packaging .Python build/ @@ -206,9 +199,14 @@ venv.bak/ .dmypy.json dmypy.json -# ignore test related file(s) -**/test** -**. - -# ignore terraform external modules +# Terraform external modules **/.external_modules + +# Test files and directories +**/[Tt]est/* +**/[Tt]ests/* +**/*[Tt]est*/* +**/*[Tt]ests*/* + +# remote_backend.tf file +**/remote_backend.tf diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 18fb2d8..e4e6807 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - - repo: git://github.com/antonbabenko/pre-commit-terraform + - repo: https://github.com/antonbabenko/pre-commit-terraform rev: v1.60.0 hooks: - id: terraform_fmt diff --git a/README.md b/README.md index f4810d5..aa87026 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@

-# Terraform module for [AWS Elasticache](https://registry.terraform.io/modules/tomarv2/elasticache/aws/latest) +## Terraform module for [AWS Elasticache](https://registry.terraform.io/modules/tomarv2/elasticache/aws/latest) #### @@ -22,17 +22,17 @@ > :arrow_right: Terraform module for [Google Memorystore](https://registry.terraform.io/modules/tomarv2/memorystore/google/latest) -## Versions +### Versions - Module tested for Terraform 1.0.1. -- AWS provider version [3.63](https://registry.terraform.io/providers/hashicorp/aws/latest) +- AWS provider version [3.74](https://registry.terraform.io/providers/hashicorp/aws/latest) - `main` branch: Provider versions not pinned to keep up with Terraform releases - `tags` releases: Tags are pinned with versions (use in your releases) -## Usage +### Usage -### Option 1: +#### Option 1: ``` terrafrom init @@ -42,9 +42,9 @@ terraform destroy -var='teamid=tryme' -var='prjid=project1' ``` **Note:** With this option please take care of remote state storage -### Option 2: +#### Option 2: -#### Recommended method (stores remote state in S3 using `prjid` and `teamid` to create directory structure): +##### Recommended method (stores remote state in S3 using `prjid` and `teamid` to create directory structure): - Create python 3.8+ virtual environment ``` @@ -90,17 +90,13 @@ tf -c=aws apply -var='teamid=foo' -var='prjid=bar' tf -c=aws destroy -var='teamid=foo' -var='prjid=bar' ``` -**NOTE:** - -- Read more on [tfremote](https://github.com/tomarv2/tfremote) ---- - +**Note:** Read more on [tfremote](https://github.com/tomarv2/tfremote) ``` terraform { required_version = ">= 1.0.1" required_providers { aws = { - version = "~> 3.63" + version = "~> 3.74" } } } diff --git a/examples/main.tf b/examples/main.tf index e13aeff..f06468b 100644 --- a/examples/main.tf +++ b/examples/main.tf @@ -2,7 +2,7 @@ terraform { required_version = ">= 1.0.1" required_providers { aws = { - version = "~> 3.63" + version = "~> 3.74" } } } diff --git a/locals.tf b/locals.tf index 2f35d72..c89728d 100644 --- a/locals.tf +++ b/locals.tf @@ -3,13 +3,6 @@ module "global" { } locals { - shared_tags = tomap( - { - "Name" = "${var.teamid}-${var.prjid}", - "team" = var.teamid, - "project" = var.prjid - } - ) account_id = data.aws_caller_identity.current.account_id region = data.aws_region.current.name } diff --git a/outputs.tf b/outputs.tf index ec563e3..7559a3e 100644 --- a/outputs.tf +++ b/outputs.tf @@ -4,7 +4,7 @@ output "elasticache_id" { } output "elasticache_cluster_address" { - value = aws_elasticache_cluster.default.*.cluster_address + value = aws_elasticache_cluster.default.*.cache_nodes.0.address description = "Elasticache Cluster address" } diff --git a/versions.tf b/providers.tf similarity index 77% rename from versions.tf rename to providers.tf index 8ed783a..93f2248 100644 --- a/versions.tf +++ b/providers.tf @@ -2,7 +2,7 @@ terraform { required_version = ">= 1.0.1" required_providers { aws = { - version = "~> 3.63" + version = "~> 3.74" } } } diff --git a/tags.tf b/tags.tf new file mode 100755 index 0000000..5e98596 --- /dev/null +++ b/tags.tf @@ -0,0 +1,9 @@ +locals { + shared_tags = tomap( + { + "Name" = "${var.teamid}-${var.prjid}", + "Team" = var.teamid, + "Project" = var.prjid + } + ) +} From d62b11a80edcc3d27710debd5a5cee547e8afeb3 Mon Sep 17 00:00:00 2001 From: tomarv2 Date: Mon, 28 Mar 2022 17:20:22 +0000 Subject: [PATCH 2/3] Sync from management repo --- .github/workflows/pre-commit.yml | 68 ++++++++++++++++++++++++----- .github/workflows/state-actions.yml | 32 ++++++++++++++ .pre-commit-config.yaml | 4 +- README.md | 62 +++++--------------------- 4 files changed, 103 insertions(+), 63 deletions(-) create mode 100644 .github/workflows/state-actions.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 90a5e52..b8da0f2 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -4,11 +4,10 @@ on: pull_request: push: branches: - - main - develop + - main jobs: -# Min Terraform version(s) getDirectories: name: Get root directories runs-on: ubuntu-latest @@ -31,7 +30,7 @@ jobs: directories: ${{ steps.matrix.outputs.directories }} preCommitMinVersions: - name: Min TF validate + name: Min validate needs: getDirectories runs-on: ubuntu-latest strategy: @@ -58,11 +57,9 @@ jobs: with: terraform_version: ${{ steps.minMax.outputs.minVersion }} - - name: Install pre-commit dependencies + - name: Install pre-commit run: pip install pre-commit - -# Max Terraform version getBaseVersion: name: Module max TF version runs-on: ubuntu-latest @@ -78,7 +75,7 @@ jobs: maxVersion: ${{ steps.minMax.outputs.maxVersion }} preCommitMaxVersion: - name: Max TF pre-commit + name: Max pre-commit runs-on: ubuntu-latest needs: getBaseVersion strategy: @@ -105,10 +102,59 @@ jobs: run: | pip install pre-commit pip install checkov - curl -L "$(curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/latest | grep -o -E "https://.+?-v1.0.1-linux-amd64" | head -n1)" > terraform-docs && chmod +x terraform-docs && sudo mv terraform-docs /usr/bin/ curl -L "$(curl -s https://api.github.com/repos/terraform-linters/tflint/releases/latest | grep -o -E "https://.+?_linux_amd64.zip")" > tflint.zip && unzip tflint.zip && rm tflint.zip && sudo mv tflint /usr/bin/ - name: Execute pre-commit - # Run all pre-commit checks on max version supported - if: ${{ matrix.version == needs.getBaseVersion.outputs.maxVersion }} - run: pre-commit run --color=always --show-diff-on-failure --all-files + continue-on-error: true # To avoid pre-commit failure + run: | + pre-commit run --color=always --show-diff-on-failure --all-files + + - name: Get current branch name + id: vars + run: | + echo ::set-output name=branch_name::${GITHUB_REF##*/} + + - name: "Get branch name and save to env" + env: + IS_PR: ${{ github.EVENT_NAME == 'pull_request' }} + run: | + if ${IS_PR}; then + BRANCH_NAME="${GITHUB_HEAD_REF}" + else + BRANCH_NAME="${GITHUB_REF##*/}" + fi + echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV + + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.ref }} + + - name: Render terraform docs and commit changes + if: ${{ env.BRANCH_NAME }} == 'develop' + uses: terraform-docs/gh-actions@main + with: + working-dir: . + output-file: README.md + output-method: inject + git-push: "true" + + - name: Commit pre-commit modified files + if: ${{ env.BRANCH_NAME }} == 'develop' + run: | + git config --local user.email "terraform+github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git diff-index --quiet HEAD || (git add -A && git commit -m'[bot] update files' --allow-empty && git push -f) + + - uses: actions/checkout@v2 + - name: Create PR + continue-on-error: true + uses: repo-sync/pull-request@v2 + if: ${{ env.BRANCH_NAME }} == 'develop' + with: + source_branch: "develop" + destination_branch: "main" + pr_title: "Pulling ${{ github.ref }} into main" + pr_body: ":crown: *Automated PR*" + pr_label: "auto-pr" + pr_allow_empty: false + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/state-actions.yml b/.github/workflows/state-actions.yml new file mode 100644 index 0000000..e54077c --- /dev/null +++ b/.github/workflows/state-actions.yml @@ -0,0 +1,32 @@ +name: "Mark or close stale issues and PRs" +on: + schedule: + - cron: "0 0 10 * *" + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v4 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + # Staling issues and PR's + days-before-stale: 30 + stale-issue-label: stale + stale-pr-label: stale + stale-issue-message: | + This issue has been automatically marked as stale because it has been open 30 days + with no activity. Remove stale label or comment or this issue will be closed in 10 days + stale-pr-message: | + This PR has been automatically marked as stale because it has been open 30 days + with no activity. Remove stale label or comment or this PR will be closed in 10 days + # Not stale if have this labels or part of milestone + exempt-issue-labels: bug,wip,on-hold + exempt-pr-labels: bug,wip,on-hold + exempt-all-milestones: true + # Close issue operations + # Label will be automatically removed if the issues are no longer closed nor locked. + days-before-close: 10 + delete-branch: false + close-issue-message: This issue was automatically closed because of stale in 10 days + close-pr-message: This PR was automatically closed because of stale in 10 days diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e4e6807..fb4c52c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/antonbabenko/pre-commit-terraform - rev: v1.60.0 + rev: v1.64.0 hooks: - id: terraform_fmt - id: terraform_tflint @@ -12,7 +12,7 @@ repos: - '--args=--only=terraform_documented_outputs' - '--args=--only=terraform_documented_variables' - '--args=--only=terraform_typed_variables' - - '--args=--only=terraform_module_pinned_source' + #- '--args=--only=terraform_module_pinned_source' - '--args=--only=terraform_naming_convention' - '--args=--only=terraform_required_providers' - '--args=--only=terraform_standard_module_structure' diff --git a/README.md b/README.md index aa87026..784a693 100644 --- a/README.md +++ b/README.md @@ -131,70 +131,32 @@ module "security_group" { Please refer to examples directory [link](examples) for references. +**Note:** + +- For more information on redis: [link](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/cluster-create-determine-requirements.html#redis-cluster-configuration) + + ## Requirements -| Name | Version | -|------|---------| -| [terraform](#requirement\_terraform) | >= 1.0.1 | -| [aws](#requirement\_aws) | ~> 3.63 | +No requirements. ## Providers -| Name | Version | -|------|---------| -| [aws](#provider\_aws) | ~> 3.63 | +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.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_cluster) | resource | -| [aws_elasticache_parameter_group.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_parameter_group) | resource | -| [aws_elasticache_subnet_group.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_subnet_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 | -|------|-------------|------|---------|:--------:| -| [apply\_immediately](#input\_apply\_immediately) | Specifies whether any database modifications are applied immediately, or during the next maintenance window. Default is false. | `bool` | `true` | no | -| [availability\_zone](#input\_availability\_zone) | The Availability Zone for the cache cluster. If you want to create cache nodes in multi-az, use preferred\_availability\_zones instead. Default: System chosen Availability Zone. Changing this value will re-create the resource. | `string` | `null` | no | -| [az\_mode](#input\_az\_mode) | (Memcached only) Specifies whether the nodes in this Memcached node group are created in a single Availability Zone or created across multiple Availability Zones in the cluster's region. Valid values for this parameter are single-az or cross-az, default is single-az. If you want to choose cross-az, num\_cache\_nodes must be greater than 1. | `string` | `null` | no | -| [cache\_nodes](#input\_cache\_nodes) | The initial number of cache nodes that the cache cluster will have. For Redis, this value must be 1. For Memcache, this value must be between 1 and 20. | `number` | `1` | no | -| [cluster\_id](#input\_cluster\_id) | Group identifier. ElastiCache converts this name to lowercase | `string` | `null` | no | -| [cluster\_mode\_enabled](#input\_cluster\_mode\_enabled) | Flag to enable/disable creation of a native redis cluster. `automatic_failover_enabled` must be set to `true`. Only 1 `cluster_mode` block is allowed | `bool` | `false` | no | -| [deploy\_redis](#input\_deploy\_redis) | Feature flag, true or false | `bool` | `true` | no | -| [deploy\_redis\_parameter\_group](#input\_deploy\_redis\_parameter\_group) | Feature flag, true or false | `bool` | `true` | no | -| [engine](#input\_engine) | Name of the cache engine to be used for this cache cluster. Valid values for this parameter are memcached or redis. | `string` | `"redis"` | no | -| [engine\_version](#input\_engine\_version) | Version of engine | `string` | `"5.0.6"` | no | -| [maintenance\_window](#input\_maintenance\_window) | Specifies the weekly time range for when maintenance on the cache cluster is performed. | `string` | `"mon:10:30-mon:11:30"` | no | -| [node\_type](#input\_node\_type) | The compute and memory capacity of the nodes | `string` | `"cache.t2.micro"` | no | -| [notification\_topic\_arn](#input\_notification\_topic\_arn) | An Amazon Resource Name (ARN) of an SNS topic to send ElastiCache notifications to. Example: arn:aws:sns:us-east-1:012345678999:my\_sns\_topic. | `string` | `null` | no | -| [parameter](#input\_parameter) | A list of Redis parameters to apply. Note that parameters may differ from one Redis family to another |
list(object({
name = string
value = string
}))
| `[]` | no | -| [parameter\_group\_family](#input\_parameter\_group\_family) | The family of the ElastiCache parameter group | `string` | `"redis5.0"` | no | -| [port](#input\_port) | The port number on which each of the cache nodes will accept connections. For Memcache the default is 11211, and for Redis the default port is 6379. | `number` | `6379` | no | -| [prjid](#input\_prjid) | Name of the project/stack e.g: mystack, nifieks, demoaci. Should not be changed after running 'tf apply' | `string` | n/a | yes | -| [security\_group\_ids](#input\_security\_group\_ids) | One or more VPC security groups associated with the cache cluster | `string` | n/a | yes | -| [snapshot\_arns](#input\_snapshot\_arns) | A single-element string list containing an Amazon Resource Name (ARN) of a Redis RDB snapshot file stored in Amazon S3. Example: arn:aws:s3:::my\_bucket/snapshot1.rdb | `list(any)` |
[
""
]
| no | -| [snapshot\_retention\_limit](#input\_snapshot\_retention\_limit) | Number of days snapshot image will be retained | `number` | `5` | no | -| [snapshot\_window](#input\_snapshot\_window) | Daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster. Example: 05:00-09:00. | `string` | `""` | no | -| [teamid](#input\_teamid) | Name of the team/group e.g. devops, dataengineering. Should not be changed after running 'tf apply' | `string` | n/a | yes | +No inputs. ## Outputs -| Name | Description | -|------|-------------| -| [aws\_elasticache\_parameter\_group](#output\_aws\_elasticache\_parameter\_group) | Elasticache Parameter Group | -| [elasticache\_cluster\_address](#output\_elasticache\_cluster\_address) | Elasticache Cluster address | -| [elasticache\_id](#output\_elasticache\_id) | Elasticache Id | - -**Note:** - -- For more information on redis: [link](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/cluster-create-determine-requirements.html#redis-cluster-configuration) +No outputs. + From e47a861ffcebc1f5288d41c017741038414ac99b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 28 Mar 2022 17:25:01 +0000 Subject: [PATCH 3/3] terraform-docs: automated action --- README.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 784a693..da34752 100644 --- a/README.md +++ b/README.md @@ -138,25 +138,65 @@ Please refer to examples directory [link](examples) for references. ## Requirements -No requirements. +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 1.0.1 | +| [aws](#requirement\_aws) | ~> 3.74 | ## Providers -No providers. +| Name | Version | +|------|---------| +| [aws](#provider\_aws) | ~> 3.74 | ## Modules -No modules. +| Name | Source | Version | +|------|--------|---------| +| [global](#module\_global) | git::git@github.com:tomarv2/terraform-global.git//aws | v0.0.1 | ## Resources -No resources. +| Name | Type | +|------|------| +| [aws_elasticache_cluster.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_cluster) | resource | +| [aws_elasticache_parameter_group.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_parameter_group) | resource | +| [aws_elasticache_subnet_group.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_subnet_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 | +|------|-------------|------|---------|:--------:| +| [apply\_immediately](#input\_apply\_immediately) | Specifies whether any database modifications are applied immediately, or during the next maintenance window. Default is false. | `bool` | `true` | no | +| [availability\_zone](#input\_availability\_zone) | The Availability Zone for the cache cluster. If you want to create cache nodes in multi-az, use preferred\_availability\_zones instead. Default: System chosen Availability Zone. Changing this value will re-create the resource. | `string` | `null` | no | +| [az\_mode](#input\_az\_mode) | (Memcached only) Specifies whether the nodes in this Memcached node group are created in a single Availability Zone or created across multiple Availability Zones in the cluster's region. Valid values for this parameter are single-az or cross-az, default is single-az. If you want to choose cross-az, num\_cache\_nodes must be greater than 1. | `string` | `null` | no | +| [cache\_nodes](#input\_cache\_nodes) | The initial number of cache nodes that the cache cluster will have. For Redis, this value must be 1. For Memcache, this value must be between 1 and 20. | `number` | `1` | no | +| [cluster\_id](#input\_cluster\_id) | Group identifier. ElastiCache converts this name to lowercase | `string` | `null` | no | +| [cluster\_mode\_enabled](#input\_cluster\_mode\_enabled) | Flag to enable/disable creation of a native redis cluster. `automatic_failover_enabled` must be set to `true`. Only 1 `cluster_mode` block is allowed | `bool` | `false` | no | +| [deploy\_redis](#input\_deploy\_redis) | Feature flag, true or false | `bool` | `true` | no | +| [deploy\_redis\_parameter\_group](#input\_deploy\_redis\_parameter\_group) | Feature flag, true or false | `bool` | `true` | no | +| [engine](#input\_engine) | Name of the cache engine to be used for this cache cluster. Valid values for this parameter are memcached or redis. | `string` | `"redis"` | no | +| [engine\_version](#input\_engine\_version) | Version of engine | `string` | `"5.0.6"` | no | +| [maintenance\_window](#input\_maintenance\_window) | Specifies the weekly time range for when maintenance on the cache cluster is performed. | `string` | `"mon:10:30-mon:11:30"` | no | +| [node\_type](#input\_node\_type) | The compute and memory capacity of the nodes | `string` | `"cache.t2.micro"` | no | +| [notification\_topic\_arn](#input\_notification\_topic\_arn) | An Amazon Resource Name (ARN) of an SNS topic to send ElastiCache notifications to. Example: arn:aws:sns:us-east-1:012345678999:my\_sns\_topic. | `string` | `null` | no | +| [parameter](#input\_parameter) | A list of Redis parameters to apply. Note that parameters may differ from one Redis family to another |
list(object({
name = string
value = string
}))
| `[]` | no | +| [parameter\_group\_family](#input\_parameter\_group\_family) | The family of the ElastiCache parameter group | `string` | `"redis5.0"` | no | +| [port](#input\_port) | The port number on which each of the cache nodes will accept connections. For Memcache the default is 11211, and for Redis the default port is 6379. | `number` | `6379` | no | +| [prjid](#input\_prjid) | Name of the project/stack e.g: mystack, nifieks, demoaci. Should not be changed after running 'tf apply' | `string` | n/a | yes | +| [security\_group\_ids](#input\_security\_group\_ids) | One or more VPC security groups associated with the cache cluster | `string` | n/a | yes | +| [snapshot\_arns](#input\_snapshot\_arns) | A single-element string list containing an Amazon Resource Name (ARN) of a Redis RDB snapshot file stored in Amazon S3. Example: arn:aws:s3:::my\_bucket/snapshot1.rdb | `list(any)` |
[
""
]
| no | +| [snapshot\_retention\_limit](#input\_snapshot\_retention\_limit) | Number of days snapshot image will be retained | `number` | `5` | no | +| [snapshot\_window](#input\_snapshot\_window) | Daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster. Example: 05:00-09:00. | `string` | `""` | no | +| [teamid](#input\_teamid) | Name of the team/group e.g. devops, dataengineering. Should not be changed after running 'tf apply' | `string` | n/a | yes | ## Outputs -No outputs. +| Name | Description | +|------|-------------| +| [aws\_elasticache\_parameter\_group](#output\_aws\_elasticache\_parameter\_group) | Elasticache Parameter Group | +| [elasticache\_cluster\_address](#output\_elasticache\_cluster\_address) | Elasticache Cluster address | +| [elasticache\_id](#output\_elasticache\_id) | Elasticache Id |