diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..3fe750a6
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,10 @@
+
+name: ci
+on:
+ pull_request:
+ branches: ["main", "master"]
+
+jobs:
+ call-worflow:
+ uses: studiographene/github-action-workflows/.github/workflows/checkov-terraform-iac-scan.yml@master
+ secrets: inherit
diff --git a/README.md b/README.md
index 7a773666..34d83e56 100644
--- a/README.md
+++ b/README.md
@@ -1,87 +1,34 @@
+# Purpose
-
-# terraform-aws-elasticache-redis [](https://github.com/cloudposse/terraform-aws-elasticache-redis/releases/latest) [](https://slack.cloudposse.com)
-
-
-[![README Header][readme_header_img]][readme_header_link]
-
-[![Cloud Posse][logo]](https://cpco.io/homepage)
-
-
+Module Courtesy: **cloudposse**
Terraform module to provision an [`ElastiCache`](https://aws.amazon.com/elasticache/) Redis Cluster
---
-This project is part of our comprehensive ["SweetOps"](https://cpco.io/sweetops) approach towards DevOps.
-[
][share_email]
-[
][share_googleplus]
-[
][share_facebook]
-[
][share_reddit]
-[
][share_linkedin]
-[
][share_twitter]
-
-
[][terraform_modules]
-
-
It's 100% Open Source and licensed under the [APACHE2](LICENSE).
-
-
-
-
-
-
-We literally have [*hundreds of terraform modules*][terraform_modules] that are Open Source and well-maintained. Check them out!
-
-
-
-
-
-
## Security & Compliance [
](https://bridgecrew.io/)
Security scanning is graciously provided by Bridgecrew. Bridgecrew is the leading fully hosted, cloud-native solution providing continuous Terraform security and compliance.
-| Benchmark | Description |
-|--------|---------------|
-| [](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=cloudposse%2Fterraform-aws-elasticache-redis&benchmark=INFRASTRUCTURE+SECURITY) | Infrastructure Security Compliance |
-| [](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=cloudposse%2Fterraform-aws-elasticache-redis&benchmark=CIS+KUBERNETES+V1.5) | Center for Internet Security, KUBERNETES Compliance |
-| [](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=cloudposse%2Fterraform-aws-elasticache-redis&benchmark=CIS+AWS+V1.2) | Center for Internet Security, AWS Compliance |
-| [](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=cloudposse%2Fterraform-aws-elasticache-redis&benchmark=CIS+AZURE+V1.1) | Center for Internet Security, AZURE Compliance |
-| [](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=cloudposse%2Fterraform-aws-elasticache-redis&benchmark=PCI-DSS+V3.2) | Payment Card Industry Data Security Standards Compliance |
-| [](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=cloudposse%2Fterraform-aws-elasticache-redis&benchmark=NIST-800-53) | National Institute of Standards and Technology Compliance |
-| [](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=cloudposse%2Fterraform-aws-elasticache-redis&benchmark=ISO27001) | Information Security Management System, ISO/IEC 27001 Compliance |
-| [](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=cloudposse%2Fterraform-aws-elasticache-redis&benchmark=SOC2)| Service Organization Control 2 Compliance |
-| [](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=cloudposse%2Fterraform-aws-elasticache-redis&benchmark=CIS+GCP+V1.1) | Center for Internet Security, GCP Compliance |
-| [](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=cloudposse%2Fterraform-aws-elasticache-redis&benchmark=HIPAA) | Health Insurance Portability and Accountability Compliance |
-
-
+| Benchmark | Description |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
+| [](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=cloudposse%2Fterraform-aws-elasticache-redis&benchmark=INFRASTRUCTURE+SECURITY) | Infrastructure Security Compliance |
+| [](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=cloudposse%2Fterraform-aws-elasticache-redis&benchmark=CIS+KUBERNETES+V1.5) | Center for Internet Security, KUBERNETES Compliance |
+| [](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=cloudposse%2Fterraform-aws-elasticache-redis&benchmark=CIS+AWS+V1.2) | Center for Internet Security, AWS Compliance |
+| [](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=cloudposse%2Fterraform-aws-elasticache-redis&benchmark=CIS+AZURE+V1.1) | Center for Internet Security, AZURE Compliance |
+| [](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=cloudposse%2Fterraform-aws-elasticache-redis&benchmark=PCI-DSS+V3.2) | Payment Card Industry Data Security Standards Compliance |
+| [](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=cloudposse%2Fterraform-aws-elasticache-redis&benchmark=NIST-800-53) | National Institute of Standards and Technology Compliance |
+| [](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=cloudposse%2Fterraform-aws-elasticache-redis&benchmark=ISO27001) | Information Security Management System, ISO/IEC 27001 Compliance |
+| [](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=cloudposse%2Fterraform-aws-elasticache-redis&benchmark=SOC2) | Service Organization Control 2 Compliance |
+| [](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=cloudposse%2Fterraform-aws-elasticache-redis&benchmark=CIS+GCP+V1.1) | Center for Internet Security, GCP Compliance |
+| [](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=cloudposse%2Fterraform-aws-elasticache-redis&benchmark=HIPAA) | Health Insurance Portability and Accountability Compliance |
## Usage
-
**IMPORTANT:** We do not pin modules to versions in our examples because of the
difficulty of keeping the versions in the documentation in sync with the latest released versions.
We highly recommend that in your code you pin the version to the exact version you are
@@ -92,7 +39,6 @@ Also, because of a bug in the Terraform registry ([hashicorp/terraform#21417](ht
the registry shows many of our inputs as required when in fact they are optional.
The table below correctly indicates which inputs are required.
-
_**Disruptive changes introduced at version 0.41.0**. If upgrading from an earlier version, see
[migration notes](https://github.com/cloudposse/terraform-aws-elasticache-redis/blob/master/docs/migration-notes-0.41.0.md) for details._
@@ -124,8 +70,7 @@ provider "aws" {
}
module "this" {
- source = "cloudposse/label/null"
- # Cloud Posse recommends pinning every module to a specific version
+ source = "app.terraform.io/studiographene/label/null"
# version = "x.x.x"
namespace = var.namespace
stage = var.stage
@@ -134,7 +79,6 @@ module "this" {
module "vpc" {
source = "cloudposse/vpc/aws"
- # Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
cidr_block = "172.16.0.0/16"
@@ -144,7 +88,6 @@ module "vpc" {
module "subnets" {
source = "cloudposse/dynamic-subnets/aws"
- # Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
availability_zones = var.availability_zones
@@ -159,7 +102,6 @@ module "subnets" {
module "redis" {
source = "cloudposse/elasticache-redis/aws"
- # Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
availability_zones = var.availability_zones
@@ -187,17 +129,14 @@ module "redis" {
}
```
-
-
-
## Examples
Review the [complete example](examples/complete) to see how to use this module.
-
-
+
## Makefile Targets
+
```text
Available targets:
@@ -207,136 +146,126 @@ Available targets:
lint Lint terraform code
```
+
+
## Requirements
-| Name | Version |
-|------|---------|
-| [terraform](#requirement\_terraform) | >= 1.3 |
-| [aws](#requirement\_aws) | >= 4.18 |
+| Name | Version |
+| ------------------------------------------------------------------------ | ------- |
+| [terraform](#requirement_terraform) | >= 1.3 |
+| [aws](#requirement_aws) | >= 4.18 |
## Providers
-| Name | Version |
-|------|---------|
-| [aws](#provider\_aws) | >= 4.18 |
+| Name | Version |
+| ------------------------------------------------ | ------- |
+| [aws](#provider_aws) | >= 4.18 |
## Modules
-| Name | Source | Version |
-|------|--------|---------|
-| [aws\_security\_group](#module\_aws\_security\_group) | cloudposse/security-group/aws | 1.0.1 |
-| [dns](#module\_dns) | cloudposse/route53-cluster-hostname/aws | 0.12.2 |
-| [this](#module\_this) | cloudposse/label/null | 0.25.0 |
+| Name | Source | Version |
+| ----------------------------------------------------------------------------------------- | --------------------------------------- | ------- |
+| [aws_security_group](#module_aws_security_group) | cloudposse/security-group/aws | 1.0.1 |
+| [dns](#module_dns) | cloudposse/route53-cluster-hostname/aws | 0.12.2 |
+| [this](#module_this) | cloudposse/label/null | 0.25.0 |
## Resources
-| Name | Type |
-|------|------|
-| [aws_cloudwatch_metric_alarm.cache_cpu](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm) | resource |
-| [aws_cloudwatch_metric_alarm.cache_memory](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm) | resource |
-| [aws_elasticache_parameter_group.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_parameter_group) | resource |
+| Name | Type |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
+| [aws_cloudwatch_metric_alarm.cache_cpu](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm) | resource |
+| [aws_cloudwatch_metric_alarm.cache_memory](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm) | resource |
+| [aws_elasticache_parameter_group.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_parameter_group) | resource |
| [aws_elasticache_replication_group.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_replication_group) | resource |
-| [aws_elasticache_subnet_group.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_subnet_group) | resource |
+| [aws_elasticache_subnet_group.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_subnet_group) | resource |
## Inputs
-| Name | Description | Type | Default | Required |
-|------|-------------|------|---------|:--------:|
-| [additional\_security\_group\_rules](#input\_additional\_security\_group\_rules) | A list of Security Group rule objects to add to the created security group, in addition to the ones
this module normally creates. (To suppress the module's rules, set `create_security_group` to false
and supply your own security group via `associated_security_group_ids`.)
The keys and values of the objects are fully compatible with the `aws_security_group_rule` resource, except
for `security_group_id` which will be ignored, and the optional "key" which, if provided, must be unique and known at "plan" time.
To get more info see https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule . | `list(any)` | `[]` | no |
-| [additional\_tag\_map](#input\_additional\_tag\_map) | Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not added to `tags` or `id`.
This is for some rare cases where resources want additional configuration of tags
and therefore take a list of maps with tag key, value, and additional configuration. | `map(string)` | `{}` | no |
-| [alarm\_actions](#input\_alarm\_actions) | Alarm action list | `list(string)` | `[]` | no |
-| [alarm\_cpu\_threshold\_percent](#input\_alarm\_cpu\_threshold\_percent) | CPU threshold alarm level | `number` | `75` | no |
-| [alarm\_memory\_threshold\_bytes](#input\_alarm\_memory\_threshold\_bytes) | Ram threshold alarm level | `number` | `10000000` | no |
-| [allow\_all\_egress](#input\_allow\_all\_egress) | If `true`, the created security group will allow egress on all ports and protocols to all IP address.
If this is false and no egress rules are otherwise specified, then no egress will be allowed.
Defaults to `true` unless the deprecated `egress_cidr_blocks` is provided and is not `["0.0.0.0/0"]`, in which case defaults to `false`. | `bool` | `null` | no |
-| [allowed\_cidr\_blocks](#input\_allowed\_cidr\_blocks) | DEPRECATED: Use `additional_security_group_rules` instead.
Historical description: List of CIDR blocks that are allowed ingress to the cluster's Security Group created in the module | `list(string)` | `[]` | no |
-| [allowed\_security\_group\_ids](#input\_allowed\_security\_group\_ids) | A list of IDs of Security Groups to allow access to the security group created by this module. | `list(string)` | `[]` | no |
-| [allowed\_security\_groups](#input\_allowed\_security\_groups) | DEPRECATED: Use `allowed_security_group_ids` instead. | `list(string)` | `[]` | no |
-| [apply\_immediately](#input\_apply\_immediately) | Apply changes immediately | `bool` | `true` | no |
-| [associated\_security\_group\_ids](#input\_associated\_security\_group\_ids) | A list of IDs of Security Groups to associate the created resource with, in addition to the created security group.
These security groups will not be modified and, if `create_security_group` is `false`, must provide all the required access. | `list(string)` | `[]` | no |
-| [at\_rest\_encryption\_enabled](#input\_at\_rest\_encryption\_enabled) | Enable encryption at rest | `bool` | `false` | no |
-| [attributes](#input\_attributes) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,
in the order they appear in the list. New attributes are appended to the
end of the list. The elements of the list are joined by the `delimiter`
and treated as a single ID element. | `list(string)` | `[]` | no |
-| [auth\_token](#input\_auth\_token) | Auth token for password protecting redis, `transit_encryption_enabled` must be set to `true`. Password must be longer than 16 chars | `string` | `null` | no |
-| [auto\_minor\_version\_upgrade](#input\_auto\_minor\_version\_upgrade) | Specifies whether minor version engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window. Only supported if the engine version is 6 or higher. | `bool` | `null` | no |
-| [automatic\_failover\_enabled](#input\_automatic\_failover\_enabled) | Automatic failover (Not available for T1/T2 instances) | `bool` | `false` | no |
-| [availability\_zones](#input\_availability\_zones) | Availability zone IDs | `list(string)` | `[]` | no |
-| [cloudwatch\_metric\_alarms\_enabled](#input\_cloudwatch\_metric\_alarms\_enabled) | Boolean flag to enable/disable CloudWatch metrics alarms | `bool` | `false` | 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 |
-| [cluster\_mode\_num\_node\_groups](#input\_cluster\_mode\_num\_node\_groups) | Number of node groups (shards) for this Redis replication group. Changing this number will trigger an online resizing operation before other settings modifications | `number` | `0` | no |
-| [cluster\_mode\_replicas\_per\_node\_group](#input\_cluster\_mode\_replicas\_per\_node\_group) | Number of replica nodes in each node group. Valid values are 0 to 5. Changing this number will force a new resource | `number` | `0` | no |
-| [cluster\_size](#input\_cluster\_size) | Number of nodes in cluster. *Ignored when `cluster_mode_enabled` == `true`* | `number` | `1` | no |
-| [context](#input\_context) | Single object for setting entire context at once.
See description of individual variables for details.
Leave string and numeric variables as `null` to use default value.
Individual variable settings (non-null) override settings in context object,
except for attributes, tags, and additional\_tag\_map, which are merged. | `any` |
{
"additional_tag_map": {},
"attributes": [],
"delimiter": null,
"descriptor_formats": {},
"enabled": true,
"environment": null,
"id_length_limit": null,
"label_key_case": null,
"label_order": [],
"label_value_case": null,
"labels_as_tags": [
"unset"
],
"name": null,
"namespace": null,
"regex_replace_chars": null,
"stage": null,
"tags": {},
"tenant": null
}
| no |
-| [create\_security\_group](#input\_create\_security\_group) | Set `true` to create and configure a new security group. If false, `associated_security_group_ids` must be provided. | `bool` | `true` | no |
-| [data\_tiering\_enabled](#input\_data\_tiering\_enabled) | Enables data tiering. Data tiering is only supported for replication groups using the r6gd node type. | `bool` | `false` | no |
-| [delimiter](#input\_delimiter) | Delimiter to be used between ID elements.
Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. | `string` | `null` | no |
-| [description](#input\_description) | Description of elasticache replication group | `string` | `null` | no |
-| [descriptor\_formats](#input\_descriptor\_formats) | Describe additional descriptors to be output in the `descriptors` output map.
Map of maps. Keys are names of descriptors. Values are maps of the form
`{
format = string
labels = list(string)
}`
(Type is `any` so the map values can later be enhanced to provide additional options.)
`format` is a Terraform format string to be passed to the `format()` function.
`labels` is a list of labels, in order, to pass to `format()` function.
Label values will be normalized before being passed to `format()` so they will be
identical to how they appear in `id`.
Default is `{}` (`descriptors` output will be empty). | `any` | `{}` | no |
-| [dns\_subdomain](#input\_dns\_subdomain) | The subdomain to use for the CNAME record. If not provided then the CNAME record will use var.name. | `string` | `""` | no |
-| [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | DEPRECATED: Use `allow_all_egress` and `additional_security_group_rules` instead.
Historical description: Outbound traffic address.
Historical default: ["0.0.0.0/0"] | `list(any)` | `null` | no |
-| [elasticache\_subnet\_group\_name](#input\_elasticache\_subnet\_group\_name) | Subnet group name for the ElastiCache instance | `string` | `""` | no |
-| [enabled](#input\_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no |
-| [engine\_version](#input\_engine\_version) | Redis engine version | `string` | `"4.0.10"` | no |
-| [environment](#input\_environment) | ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT' | `string` | `null` | no |
-| [existing\_security\_groups](#input\_existing\_security\_groups) | DEPRECATED: Use `associated_security_group_ids` instead.
Historical description: List of existing Security Group IDs to place the cluster into.
Set `use_existing_security_groups` to `true` to enable using `existing_security_groups` as Security Groups for the cluster. | `list(string)` | `[]` | no |
-| [family](#input\_family) | Redis family | `string` | `"redis4.0"` | no |
-| [final\_snapshot\_identifier](#input\_final\_snapshot\_identifier) | The name of your final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster. If omitted, no final snapshot will be made. | `string` | `null` | no |
-| [id\_length\_limit](#input\_id\_length\_limit) | Limit `id` to this many characters (minimum 6).
Set to `0` for unlimited length.
Set to `null` for keep the existing setting, which defaults to `0`.
Does not affect `id_full`. | `number` | `null` | no |
-| [instance\_type](#input\_instance\_type) | Elastic cache instance type | `string` | `"cache.t2.micro"` | no |
-| [kms\_key\_id](#input\_kms\_key\_id) | The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses service managed encryption. `at_rest_encryption_enabled` must be set to `true` | `string` | `null` | no |
-| [label\_key\_case](#input\_label\_key\_case) | Controls the letter case of the `tags` keys (label names) for tags generated by this module.
Does not affect keys of tags passed in via the `tags` input.
Possible values: `lower`, `title`, `upper`.
Default value: `title`. | `string` | `null` | no |
-| [label\_order](#input\_label\_order) | The order in which the labels (ID elements) appear in the `id`.
Defaults to ["namespace", "environment", "stage", "name", "attributes"].
You can omit any of the 6 labels ("tenant" is the 6th), but at least one must be present. | `list(string)` | `null` | no |
-| [label\_value\_case](#input\_label\_value\_case) | Controls the letter case of ID elements (labels) as included in `id`,
set as tag values, and output by this module individually.
Does not affect values of tags passed in via the `tags` input.
Possible values: `lower`, `title`, `upper` and `none` (no transformation).
Set this to `title` and set `delimiter` to `""` to yield Pascal Case IDs.
Default value: `lower`. | `string` | `null` | no |
-| [labels\_as\_tags](#input\_labels\_as\_tags) | Set of labels (ID elements) to include as tags in the `tags` output.
Default is to include all labels.
Tags with empty values will not be included in the `tags` output.
Set to `[]` to suppress all generated tags.
**Notes:**
The value of the `name` tag, if included, will be the `id`, not the `name`.
Unlike other `null-label` inputs, the initial setting of `labels_as_tags` cannot be
changed in later chained modules. Attempts to change it will be silently ignored. | `set(string)` | [
"default"
]
| no |
-| [log\_delivery\_configuration](#input\_log\_delivery\_configuration) | The log\_delivery\_configuration block allows the streaming of Redis SLOWLOG or Redis Engine Log to CloudWatch Logs or Kinesis Data Firehose. Max of 2 blocks. | `list(map(any))` | `[]` | no |
-| [maintenance\_window](#input\_maintenance\_window) | Maintenance window | `string` | `"wed:03:00-wed:04:00"` | no |
-| [multi\_az\_enabled](#input\_multi\_az\_enabled) | Multi AZ (Automatic Failover must also be enabled. If Cluster Mode is enabled, Multi AZ is on by default, and this setting is ignored) | `bool` | `false` | no |
-| [name](#input\_name) | ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.
This is the only ID element not also included as a `tag`.
The "name" tag is set to the full `id` string. There is no tag with the value of the `name` input. | `string` | `null` | no |
-| [namespace](#input\_namespace) | ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique | `string` | `null` | no |
-| [notification\_topic\_arn](#input\_notification\_topic\_arn) | Notification topic arn | `string` | `""` | no |
-| [ok\_actions](#input\_ok\_actions) | The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Number (ARN) | `list(string)` | `[]` | 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\_description](#input\_parameter\_group\_description) | Managed by Terraform | `string` | `null` | no |
-| [port](#input\_port) | Redis port | `number` | `6379` | no |
-| [regex\_replace\_chars](#input\_regex\_replace\_chars) | Terraform regular expression (regex) string.
Characters matching the regex will be removed from the ID elements.
If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no |
-| [replication\_group\_id](#input\_replication\_group\_id) | Replication group ID with the following constraints:
A name must contain from 1 to 20 alphanumeric characters or hyphens.
The first character must be a letter.
A name cannot end with a hyphen or contain two consecutive hyphens. | `string` | `""` | no |
-| [security\_group\_create\_before\_destroy](#input\_security\_group\_create\_before\_destroy) | Set `true` to enable Terraform `create_before_destroy` behavior on the created security group.
We only recommend setting this `false` if you are upgrading this module and need to keep
the existing security group from being replaced.
Note that changing this value will always cause the security group to be replaced. | `bool` | `true` | no |
-| [security\_group\_create\_timeout](#input\_security\_group\_create\_timeout) | How long to wait for the security group to be created. | `string` | `"10m"` | no |
-| [security\_group\_delete\_timeout](#input\_security\_group\_delete\_timeout) | How long to retry on `DependencyViolation` errors during security group deletion. | `string` | `"15m"` | no |
-| [security\_group\_description](#input\_security\_group\_description) | The description to assign to the created Security Group.
Warning: Changing the description causes the security group to be replaced.
Set this to `null` to maintain parity with releases <= `0.34.0`. | `string` | `"Security group for Elasticache Redis"` | no |
-| [security\_group\_name](#input\_security\_group\_name) | The name to assign to the created security group. Must be unique within the VPC.
If not provided, will be derived from the `null-label.context` passed in.
If `create_before_destroy` is true, will be used as a name prefix. | `list(string)` | `[]` | no |
-| [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(string)` | `[]` | no |
-| [snapshot\_name](#input\_snapshot\_name) | The name of a snapshot from which to restore data into the new node group. Changing the snapshot\_name forces a new resource. | `string` | `null` | no |
-| [snapshot\_retention\_limit](#input\_snapshot\_retention\_limit) | The number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them. | `number` | `0` | no |
-| [snapshot\_window](#input\_snapshot\_window) | The daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster. | `string` | `"06:30-07:30"` | no |
-| [stage](#input\_stage) | ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no |
-| [subnets](#input\_subnets) | Subnet IDs | `list(string)` | `[]` | no |
-| [tags](#input\_tags) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).
Neither the tag keys nor the tag values will be modified by this module. | `map(string)` | `{}` | no |
-| [tenant](#input\_tenant) | ID element \_(Rarely used, not included by default)\_. A customer identifier, indicating who this instance of a resource is for | `string` | `null` | no |
-| [transit\_encryption\_enabled](#input\_transit\_encryption\_enabled) | Set `true` to enable encryption in transit. Forced `true` if `var.auth_token` is set.
If this is enabled, use the [following guide](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/in-transit-encryption.html#connect-tls) to access redis. | `bool` | `true` | no |
-| [use\_existing\_security\_groups](#input\_use\_existing\_security\_groups) | DEPRECATED: Use `create_security_group` instead.
Historical description: Flag to enable/disable creation of Security Group in the module.
Set to `true` to disable Security Group creation and provide a list of existing security Group IDs in `existing_security_groups` to place the cluster into.
Historical default: `false` | `bool` | `null` | no |
-| [user\_group\_ids](#input\_user\_group\_ids) | User Group ID to associate with the replication group | `list(string)` | `null` | no |
-| [vpc\_id](#input\_vpc\_id) | VPC ID | `string` | n/a | yes |
-| [zone\_id](#input\_zone\_id) | Route53 DNS Zone ID as list of string (0 or 1 items). If empty, no custom DNS name will be published.
If the list contains a single Zone ID, a custom DNS name will be pulished in that zone.
Can also be a plain string, but that use is DEPRECATED because of Terraform issues. | `any` | `[]` | no |
+| Name | Description | Type | Default | Required |
+| --------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: | --- | --- |
+| [additional_tag_map](#input_additional_tag_map) | Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not added to `tags` or `id`.
This is for some rare cases where resources want additional configuration of tags
and therefore take a list of maps with tag key, value, and additional configuration. | `map(string)` | `{}` | no |
+| [alarm_actions](#input_alarm_actions) | Alarm action list | `list(string)` | `[]` | no |
+| [alarm_cpu_threshold_percent](#input_alarm_cpu_threshold_percent) | CPU threshold alarm level | `number` | `75` | no |
+| [alarm_memory_threshold_bytes](#input_alarm_memory_threshold_bytes) | Ram threshold alarm level | `number` | `10000000` | no |
+| [apply_immediately](#input_apply_immediately) | Apply changes immediately | `bool` | `true` | no | | no |
+| [at_rest_encryption_enabled](#input_at_rest_encryption_enabled) | Enable encryption at rest | `bool` | `false` | no |
+| [attributes](#input_attributes) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,
in the order they appear in the list. New attributes are appended to the
end of the list. The elements of the list are joined by the `delimiter`
and treated as a single ID element. | `list(string)` | `[]` | no |
+| [auth_token](#input_auth_token) | Auth token for password protecting redis, `transit_encryption_enabled` must be set to `true`. Password must be longer than 16 chars | `string` | `null` | no |
+| [auto_minor_version_upgrade](#input_auto_minor_version_upgrade) | Specifies whether minor version engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window. Only supported if the engine version is 6 or higher. | `bool` | `null` | no |
+| [automatic_failover_enabled](#input_automatic_failover_enabled) | Automatic failover (Not available for T1/T2 instances) | `bool` | `false` | no |
+| [availability_zones](#input_availability_zones) | Availability zone IDs | `list(string)` | `[]` | no |
+| [cloudwatch_metric_alarms_enabled](#input_cloudwatch_metric_alarms_enabled) | Boolean flag to enable/disable CloudWatch metrics alarms | `bool` | `false` | 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 |
+| [cluster_mode_num_node_groups](#input_cluster_mode_num_node_groups) | Number of node groups (shards) for this Redis replication group. Changing this number will trigger an online resizing operation before other settings modifications | `number` | `0` | no |
+| [cluster_mode_replicas_per_node_group](#input_cluster_mode_replicas_per_node_group) | Number of replica nodes in each node group. Valid values are 0 to 5. Changing this number will force a new resource | `number` | `0` | no |
+| [cluster_size](#input_cluster_size) | Number of nodes in cluster. _Ignored when `cluster_mode_enabled` == `true`_ | `number` | `1` | no |
+| [context](#input_context) | Single object for setting entire context at once.
See description of individual variables for details.
Leave string and numeric variables as `null` to use default value.
Individual variable settings (non-null) override settings in context object,
except for attributes, tags, and additional_tag_map, which are merged. | `any` | {
"additional_tag_map": {},
"attributes": [],
"delimiter": null,
"descriptor_formats": {},
"enabled": true,
"environment": null,
"id_length_limit": null,
"label_key_case": null,
"label_order": [],
"label_value_case": null,
"labels_as_tags": [
"unset"
],
"name": null,
"namespace": null,
"regex_replace_chars": null,
"stage": null,
"tags": {},
"tenant": null
}
| no |
+| [data_tiering_enabled](#input_data_tiering_enabled) | Enables data tiering. Data tiering is only supported for replication groups using the r6gd node type. | `bool` | `false` | no |
+| [delimiter](#input_delimiter) | Delimiter to be used between ID elements.
Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. | `string` | `null` | no |
+| [description](#input_description) | Description of elasticache replication group | `string` | `null` | no |
+| [descriptor_formats](#input_descriptor_formats) | Describe additional descriptors to be output in the `descriptors` output map.
Map of maps. Keys are names of descriptors. Values are maps of the form
`{
format = string
labels = list(string)
}`
(Type is `any` so the map values can later be enhanced to provide additional options.)
`format` is a Terraform format string to be passed to the `format()` function.
`labels` is a list of labels, in order, to pass to `format()` function.
Label values will be normalized before being passed to `format()` so they will be
identical to how they appear in `id`.
Default is `{}` (`descriptors` output will be empty). | `any` | `{}` | no |
+| [dns_subdomain](#input_dns_subdomain) | The subdomain to use for the CNAME record. If not provided then the CNAME record will use var.name. | `string` | `""` | no |
+
+| [elasticache_subnet_group_name](#input_elasticache_subnet_group_name) | Subnet group name for the ElastiCache instance | `string` | `""` | no |
+| [enabled](#input_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no |
+| [engine_version](#input_engine_version) | Redis engine version | `string` | `"4.0.10"` | no |
+| [environment](#input_environment) | ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT' | `string` | `null` | no |
+| [family](#input_family) | Redis family | `string` | `"redis4.0"` | no |
+| [final_snapshot_identifier](#input_final_snapshot_identifier) | The name of your final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster. If omitted, no final snapshot will be made. | `string` | `null` | no |
+| [id_length_limit](#input_id_length_limit) | Limit `id` to this many characters (minimum 6).
Set to `0` for unlimited length.
Set to `null` for keep the existing setting, which defaults to `0`.
Does not affect `id_full`. | `number` | `null` | no |
+| [instance_type](#input_instance_type) | Elastic cache instance type | `string` | `"cache.t2.micro"` | no |
+| [kms_key_id](#input_kms_key_id) | The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses service managed encryption. `at_rest_encryption_enabled` must be set to `true` | `string` | `null` | no |
+| [label_key_case](#input_label_key_case) | Controls the letter case of the `tags` keys (label names) for tags generated by this module.
Does not affect keys of tags passed in via the `tags` input.
Possible values: `lower`, `title`, `upper`.
Default value: `title`. | `string` | `null` | no |
+| [label_order](#input_label_order) | The order in which the labels (ID elements) appear in the `id`.
Defaults to ["namespace", "environment", "stage", "name", "attributes"].
You can omit any of the 6 labels ("tenant" is the 6th), but at least one must be present. | `list(string)` | `null` | no |
+| [label_value_case](#input_label_value_case) | Controls the letter case of ID elements (labels) as included in `id`,
set as tag values, and output by this module individually.
Does not affect values of tags passed in via the `tags` input.
Possible values: `lower`, `title`, `upper` and `none` (no transformation).
Set this to `title` and set `delimiter` to `""` to yield Pascal Case IDs.
Default value: `lower`. | `string` | `null` | no |
+| [labels_as_tags](#input_labels_as_tags) | Set of labels (ID elements) to include as tags in the `tags` output.
Default is to include all labels.
Tags with empty values will not be included in the `tags` output.
Set to `[]` to suppress all generated tags.
**Notes:**
The value of the `name` tag, if included, will be the `id`, not the `name`.
Unlike other `null-label` inputs, the initial setting of `labels_as_tags` cannot be
changed in later chained modules. Attempts to change it will be silently ignored. | `set(string)` | [
"default"
]
| no |
+| [log_delivery_configuration](#input_log_delivery_configuration) | The log_delivery_configuration block allows the streaming of Redis SLOWLOG or Redis Engine Log to CloudWatch Logs or Kinesis Data Firehose. Max of 2 blocks. | `list(map(any))` | `[]` | no |
+| [maintenance_window](#input_maintenance_window) | Maintenance window | `string` | `"wed:03:00-wed:04:00"` | no |
+| [multi_az_enabled](#input_multi_az_enabled) | Multi AZ (Automatic Failover must also be enabled. If Cluster Mode is enabled, Multi AZ is on by default, and this setting is ignored) | `bool` | `false` | no |
+| [name](#input_name) | ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.
This is the only ID element not also included as a `tag`.
The "name" tag is set to the full `id` string. There is no tag with the value of the `name` input. | `string` | `null` | no |
+| [namespace](#input_namespace) | ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique | `string` | `null` | no |
+| [notification_topic_arn](#input_notification_topic_arn) | Notification topic arn | `string` | `""` | no |
+| [ok_actions](#input_ok_actions) | The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Number (ARN) | `list(string)` | `[]` | 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_description](#input_parameter_group_description) | Managed by Terraform | `string` | `null` | no |
+| [port](#input_port) | Redis port | `number` | `6379` | no |
+| [regex_replace_chars](#input_regex_replace_chars) | Terraform regular expression (regex) string.
Characters matching the regex will be removed from the ID elements.
If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no |
+| [replication_group_id](#input_replication_group_id) | Replication group ID with the following constraints:
A name must contain from 1 to 20 alphanumeric characters or hyphens.
The first character must be a letter.
A name cannot end with a hyphen or contain two consecutive hyphens. | `string` | `""` | no |
+| [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(string)` | `[]` | no |
+| [snapshot_name](#input_snapshot_name) | The name of a snapshot from which to restore data into the new node group. Changing the snapshot_name forces a new resource. | `string` | `null` | no |
+| [snapshot_retention_limit](#input_snapshot_retention_limit) | The number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them. | `number` | `0` | no |
+| [snapshot_window](#input_snapshot_window) | The daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster. | `string` | `"06:30-07:30"` | no |
+| [stage](#input_stage) | ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no |
+| [subnets](#input_subnets) | Subnet IDs | `list(string)` | `[]` | no |
+| [tags](#input_tags) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).
Neither the tag keys nor the tag values will be modified by this module. | `map(string)` | `{}` | no |
+| [tenant](#input_tenant) | ID element \_(Rarely used, not included by default)\_. A customer identifier, indicating who this instance of a resource is for | `string` | `null` | no |
+| [transit_encryption_enabled](#input_transit_encryption_enabled) | Set `true` to enable encryption in transit. Forced `true` if `var.auth_token` is set.
If this is enabled, use the [following guide](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/in-transit-encryption.html#connect-tls) to access redis. | `bool` | `true` | no |
+| [user_group_ids](#input_user_group_ids) | User Group ID to associate with the replication group | `list(string)` | `null` | no |
+| [vpc_id](#input_vpc_id) | VPC ID | `string` | n/a | yes |
+| [zone_id](#input_zone_id) | Route53 DNS Zone ID as list of string (0 or 1 items). If empty, no custom DNS name will be published.
If the list contains a single Zone ID, a custom DNS name will be pulished in that zone.
Can also be a plain string, but that use is DEPRECATED because of Terraform issues. | `any` | `[]` | no |
+| [ingress_cidr_blocks](#ingress_cidr_blocks) | List of IPv4 CIDR ranges to allow in security group ingress. | `list(string)` | `[]` | no | |
+| [allowed_security_groups](#allowed_security_groups) | List of security group IDs to allow in security group ingress. | `list(string)` | `[]` | no |
+| [intra_security_group_traffic_enabled](#intra_security_group_traffic_enabled) | Whether to allow traffic between resources inside the database's security group. | `boolean` | `false` | no |
## Outputs
-| Name | Description |
-|------|-------------|
-| [arn](#output\_arn) | Elasticache Replication Group ARN |
-| [cluster\_enabled](#output\_cluster\_enabled) | Indicates if cluster mode is enabled |
-| [endpoint](#output\_endpoint) | Redis primary or configuration endpoint, whichever is appropriate for the given cluster mode |
-| [engine\_version\_actual](#output\_engine\_version\_actual) | The running version of the cache engine |
-| [host](#output\_host) | Redis hostname |
-| [id](#output\_id) | Redis cluster ID |
-| [member\_clusters](#output\_member\_clusters) | Redis cluster members |
-| [port](#output\_port) | Redis port |
-| [reader\_endpoint\_address](#output\_reader\_endpoint\_address) | The address of the endpoint for the reader node in the replication group, if the cluster mode is disabled. |
-| [security\_group\_id](#output\_security\_group\_id) | The ID of the created security group |
-| [security\_group\_name](#output\_security\_group\_name) | The name of the created security group |
-
-
+| Name | Description |
+| -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
+| [arn](#output_arn) | Elasticache Replication Group ARN |
+| [cluster_enabled](#output_cluster_enabled) | Indicates if cluster mode is enabled |
+| [endpoint](#output_endpoint) | Redis primary or configuration endpoint, whichever is appropriate for the given cluster mode |
+| [engine_version_actual](#output_engine_version_actual) | The running version of the cache engine |
+| [host](#output_host) | Redis hostname |
+| [id](#output_id) | Redis cluster ID |
+| [member_clusters](#output_member_clusters) | Redis cluster members |
+| [port](#output_port) | Redis port |
+| [reader_endpoint_address](#output_reader_endpoint_address) | The address of the endpoint for the reader node in the replication group, if the cluster mode is disabled. |
+| [security_group_id](#output_security_group_id) | The ID of the created security group |
+| [security_group_name](#output_security_group_name) | The name of the created security group |
+
## Share the Love
@@ -344,8 +273,6 @@ Like this project? Please give it a ★ on [our GitHub](https://github.com/cloud
Are you using this project or any of our other projects? Consider [leaving a testimonial][testimonial]. =)
-
-
## Related Projects
Check out these related projects.
@@ -363,7 +290,6 @@ File a GitHub [issue](https://github.com/cloudposse/terraform-aws-elasticache-re
## DevOps Accelerator for Startups
-
We are a [**DevOps Accelerator**][commercial_support]. We'll help you build your cloud infrastructure from the ground up so you can own it. Then we'll show you how to operate it and stick around for as long as you need us.
[][commercial_support]
@@ -385,7 +311,7 @@ We deliver 10x the value for a fraction of the cost of a full-time engineer. Our
## Slack Community
-Join our [Open Source Community][slack] on Slack. It's **FREE** for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build totally *sweet* infrastructure.
+Join our [Open Source Community][slack] on Slack. It's **FREE** for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build totally _sweet_ infrastructure.
## Discourse Forums
@@ -393,7 +319,7 @@ Participate in our [Discourse Forums][discourse]. Here you'll find answers to co
## Newsletter
-Sign up for [our newsletter][newsletter] that covers everything on our technology radar. Receive updates on what we're up to on GitHub as well as awesome new projects we discover.
+Sign up for [our newsletter][newsletter] that covers everything on our technology radar. Receive updates on what we're up to on GitHub as well as awesome new projects we discover.
## Office Hours
@@ -413,21 +339,18 @@ If you are interested in being a contributor and want to get involved in develop
In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.
- 1. **Fork** the repo on GitHub
- 2. **Clone** the project to your own machine
- 3. **Commit** changes to your own branch
- 4. **Push** your work back up to your fork
- 5. Submit a **Pull Request** so that we can review your changes
+1. **Fork** the repo on GitHub
+2. **Clone** the project to your own machine
+3. **Commit** changes to your own branch
+4. **Push** your work back up to your fork
+5. Submit a **Pull Request** so that we can review your changes
**NOTE:** Be sure to merge the latest changes from "upstream" before making a pull request!
-
## Copyright
Copyright © 2017-2023 [Cloud Posse, LLC](https://cpco.io/copyright)
-
-
## License
[](https://opensource.org/licenses/Apache-2.0)
@@ -453,14 +376,6 @@ specific language governing permissions and limitations
under the License.
```
-
-
-
-
-
-
-
-
## Trademarks
All other trademarks referenced herein are the property of their respective owners.
@@ -471,67 +386,70 @@ This project is maintained and funded by [Cloud Posse, LLC][website]. Like it? P
[![Cloud Posse][logo]][website]
-We're a [DevOps Professional Services][hire] company based in Los Angeles, CA. We ❤️ [Open Source Software][we_love_open_source].
+We're a [DevOps Professional Services][hire] company based in Los Angeles, CA. We ❤️ [Open Source Software][we_love_open_source].
We offer [paid support][commercial_support] on all of our projects.
Check out [our other projects][github], [follow us on twitter][twitter], [apply for a job][jobs], or [hire us][hire] to help with your cloud strategy and implementation.
-
-
### Contributors
-| [![Erik Osterman][osterman_avatar]][osterman_homepage]
[Erik Osterman][osterman_homepage] | [![Igor Rodionov][goruha_avatar]][goruha_homepage]
[Igor Rodionov][goruha_homepage] | [![Andriy Knysh][aknysh_avatar]][aknysh_homepage]
[Andriy Knysh][aknysh_homepage] | [![Daren Desjardins][darend_avatar]][darend_homepage]
[Daren Desjardins][darend_homepage] | [![Max Moon][MoonMoon1919_avatar]][MoonMoon1919_homepage]
[Max Moon][MoonMoon1919_homepage] | [![Christopher Riley][christopherriley_avatar]][christopherriley_homepage]
[Christopher Riley][christopherriley_homepage] | [![RB][nitrocode_avatar]][nitrocode_homepage]
[RB][nitrocode_homepage] |
-|---|---|---|---|---|---|---|
+
+| [![Erik Osterman][osterman_avatar]][osterman_homepage]
[Erik Osterman][osterman_homepage] | [![Igor Rodionov][goruha_avatar]][goruha_homepage]
[Igor Rodionov][goruha_homepage] | [![Andriy Knysh][aknysh_avatar]][aknysh_homepage]
[Andriy Knysh][aknysh_homepage] | [![Daren Desjardins][darend_avatar]][darend_homepage]
[Daren Desjardins][darend_homepage] | [![Max Moon][MoonMoon1919_avatar]][MoonMoon1919_homepage]
[Max Moon][MoonMoon1919_homepage] | [![Christopher Riley][christopherriley_avatar]][christopherriley_homepage]
[Christopher Riley][christopherriley_homepage] | [![RB][nitrocode_avatar]][nitrocode_homepage]
[RB][nitrocode_homepage] |
+| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
+
- [osterman_homepage]: https://github.com/osterman
- [osterman_avatar]: https://img.cloudposse.com/150x150/https://github.com/osterman.png
- [goruha_homepage]: https://github.com/goruha
- [goruha_avatar]: https://img.cloudposse.com/150x150/https://github.com/goruha.png
- [aknysh_homepage]: https://github.com/aknysh
- [aknysh_avatar]: https://img.cloudposse.com/150x150/https://github.com/aknysh.png
- [darend_homepage]: https://github.com/darend
- [darend_avatar]: https://img.cloudposse.com/150x150/https://github.com/darend.png
- [MoonMoon1919_homepage]: https://github.com/MoonMoon1919
- [MoonMoon1919_avatar]: https://img.cloudposse.com/150x150/https://github.com/MoonMoon1919.png
- [christopherriley_homepage]: https://github.com/christopherriley
- [christopherriley_avatar]: https://img.cloudposse.com/150x150/https://github.com/christopherriley.png
- [nitrocode_homepage]: https://github.com/nitrocode
- [nitrocode_avatar]: https://img.cloudposse.com/150x150/https://github.com/nitrocode.png
+[osterman_homepage]: https://github.com/osterman
+[osterman_avatar]: https://img.cloudposse.com/150x150/https://github.com/osterman.png
+[goruha_homepage]: https://github.com/goruha
+[goruha_avatar]: https://img.cloudposse.com/150x150/https://github.com/goruha.png
+[aknysh_homepage]: https://github.com/aknysh
+[aknysh_avatar]: https://img.cloudposse.com/150x150/https://github.com/aknysh.png
+[darend_homepage]: https://github.com/darend
+[darend_avatar]: https://img.cloudposse.com/150x150/https://github.com/darend.png
+[MoonMoon1919_homepage]: https://github.com/MoonMoon1919
+[MoonMoon1919_avatar]: https://img.cloudposse.com/150x150/https://github.com/MoonMoon1919.png
+[christopherriley_homepage]: https://github.com/christopherriley
+[christopherriley_avatar]: https://img.cloudposse.com/150x150/https://github.com/christopherriley.png
+[nitrocode_homepage]: https://github.com/nitrocode
+[nitrocode_avatar]: https://img.cloudposse.com/150x150/https://github.com/nitrocode.png
[![README Footer][readme_footer_img]][readme_footer_link]
[![Beacon][beacon]][website]
+
- [logo]: https://cloudposse.com/logo-300x69.svg
- [docs]: https://cpco.io/docs?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=docs
- [website]: https://cpco.io/homepage?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=website
- [github]: https://cpco.io/github?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=github
- [jobs]: https://cpco.io/jobs?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=jobs
- [hire]: https://cpco.io/hire?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=hire
- [slack]: https://cpco.io/slack?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=slack
- [linkedin]: https://cpco.io/linkedin?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=linkedin
- [twitter]: https://cpco.io/twitter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=twitter
- [testimonial]: https://cpco.io/leave-testimonial?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=testimonial
- [office_hours]: https://cloudposse.com/office-hours?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=office_hours
- [newsletter]: https://cpco.io/newsletter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=newsletter
- [discourse]: https://ask.sweetops.com/?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=discourse
- [email]: https://cpco.io/email?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=email
- [commercial_support]: https://cpco.io/commercial-support?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=commercial_support
- [we_love_open_source]: https://cpco.io/we-love-open-source?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=we_love_open_source
- [terraform_modules]: https://cpco.io/terraform-modules?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=terraform_modules
- [readme_header_img]: https://cloudposse.com/readme/header/img
- [readme_header_link]: https://cloudposse.com/readme/header/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=readme_header_link
- [readme_footer_img]: https://cloudposse.com/readme/footer/img
- [readme_footer_link]: https://cloudposse.com/readme/footer/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=readme_footer_link
- [readme_commercial_support_img]: https://cloudposse.com/readme/commercial-support/img
- [readme_commercial_support_link]: https://cloudposse.com/readme/commercial-support/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=readme_commercial_support_link
- [share_twitter]: https://twitter.com/intent/tweet/?text=terraform-aws-elasticache-redis&url=https://github.com/cloudposse/terraform-aws-elasticache-redis
- [share_linkedin]: https://www.linkedin.com/shareArticle?mini=true&title=terraform-aws-elasticache-redis&url=https://github.com/cloudposse/terraform-aws-elasticache-redis
- [share_reddit]: https://reddit.com/submit/?url=https://github.com/cloudposse/terraform-aws-elasticache-redis
- [share_facebook]: https://facebook.com/sharer/sharer.php?u=https://github.com/cloudposse/terraform-aws-elasticache-redis
- [share_googleplus]: https://plus.google.com/share?url=https://github.com/cloudposse/terraform-aws-elasticache-redis
- [share_email]: mailto:?subject=terraform-aws-elasticache-redis&body=https://github.com/cloudposse/terraform-aws-elasticache-redis
- [beacon]: https://ga-beacon.cloudposse.com/UA-76589703-4/cloudposse/terraform-aws-elasticache-redis?pixel&cs=github&cm=readme&an=terraform-aws-elasticache-redis
+
+[logo]: https://cloudposse.com/logo-300x69.svg
+[docs]: https://cpco.io/docs?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=docs
+[website]: https://cpco.io/homepage?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=website
+[github]: https://cpco.io/github?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=github
+[jobs]: https://cpco.io/jobs?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=jobs
+[hire]: https://cpco.io/hire?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=hire
+[slack]: https://cpco.io/slack?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=slack
+[linkedin]: https://cpco.io/linkedin?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=linkedin
+[twitter]: https://cpco.io/twitter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=twitter
+[testimonial]: https://cpco.io/leave-testimonial?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=testimonial
+[office_hours]: https://cloudposse.com/office-hours?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=office_hours
+[newsletter]: https://cpco.io/newsletter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=newsletter
+[discourse]: https://ask.sweetops.com/?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=discourse
+[email]: https://cpco.io/email?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=email
+[commercial_support]: https://cpco.io/commercial-support?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=commercial_support
+[we_love_open_source]: https://cpco.io/we-love-open-source?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=we_love_open_source
+[terraform_modules]: https://cpco.io/terraform-modules?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=terraform_modules
+[readme_header_img]: https://cloudposse.com/readme/header/img
+[readme_header_link]: https://cloudposse.com/readme/header/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=readme_header_link
+[readme_footer_img]: https://cloudposse.com/readme/footer/img
+[readme_footer_link]: https://cloudposse.com/readme/footer/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=readme_footer_link
+[readme_commercial_support_img]: https://cloudposse.com/readme/commercial-support/img
+[readme_commercial_support_link]: https://cloudposse.com/readme/commercial-support/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elasticache-redis&utm_content=readme_commercial_support_link
+[share_twitter]: https://twitter.com/intent/tweet/?text=terraform-aws-elasticache-redis&url=https://github.com/cloudposse/terraform-aws-elasticache-redis
+[share_linkedin]: https://www.linkedin.com/shareArticle?mini=true&title=terraform-aws-elasticache-redis&url=https://github.com/cloudposse/terraform-aws-elasticache-redis
+[share_reddit]: https://reddit.com/submit/?url=https://github.com/cloudposse/terraform-aws-elasticache-redis
+[share_facebook]: https://facebook.com/sharer/sharer.php?u=https://github.com/cloudposse/terraform-aws-elasticache-redis
+[share_googleplus]: https://plus.google.com/share?url=https://github.com/cloudposse/terraform-aws-elasticache-redis
+[share_email]: mailto:?subject=terraform-aws-elasticache-redis&body=https://github.com/cloudposse/terraform-aws-elasticache-redis
+[beacon]: https://ga-beacon.cloudposse.com/UA-76589703-4/cloudposse/terraform-aws-elasticache-redis?pixel&cs=github&cm=readme&an=terraform-aws-elasticache-redis
+
diff --git a/README.yaml b/README.yaml
index 9004b133..e84791ed 100644
--- a/README.yaml
+++ b/README.yaml
@@ -47,7 +47,6 @@ related:
description: "Terraform module designed to generate consistent names and tags for resources. Use terraform-null-label to implement a strict naming convention."
url: "https://github.com/cloudposse/terraform-null-label"
-
# Short description of this project
description: |-
Terraform module to provision an [`ElastiCache`](https://aws.amazon.com/elasticache/) Redis Cluster
@@ -88,7 +87,7 @@ usage: |-
}
module "this" {
- source = "cloudposse/label/null"
+ source = "app.terraform.io/studiographene/sg-label/null"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
namespace = var.namespace
diff --git a/README_VERSION.md b/README_VERSION.md
new file mode 100644
index 00000000..2ca11e03
--- /dev/null
+++ b/README_VERSION.md
@@ -0,0 +1,7 @@
+# v1.1.4
+
+### What:
+
+> Fix
+
+Security Group ingress and egress rules moved to separete resource block. Which fixes the rules getting over wirtten when rules are created outside this module
diff --git a/context.tf b/context.tf
index 5e0ef885..8e030a9f 100644
--- a/context.tf
+++ b/context.tf
@@ -1,15 +1,7 @@
#
-# ONLY EDIT THIS FILE IN github.com/cloudposse/terraform-null-label
+# ONLY EDIT THIS FILE IN https://github.com/studiographene/terraform-null-sg-label/blob/main/exports/
# All other instances of this file should be a copy of that one
#
-#
-# Copy this file from https://github.com/cloudposse/terraform-null-label/blob/master/exports/context.tf
-# and then place it in your Terraform module to automatically get
-# Cloud Posse's standard configuration inputs suitable for passing
-# to Cloud Posse modules.
-#
-# curl -sL https://raw.githubusercontent.com/cloudposse/terraform-null-label/master/exports/context.tf -o context.tf
-#
# Modules should access the whole context as `module.this.context`
# to get the input variables with nulls for defaults,
# for example `context = module.this.context`,
@@ -21,15 +13,14 @@
#
module "this" {
- source = "cloudposse/label/null"
- version = "0.25.0" # requires Terraform >= 0.13.0
+ source = "app.terraform.io/studiographene/sg-label/null"
+ version = "1.0.4"
enabled = var.enabled
- namespace = var.namespace
- tenant = var.tenant
+ project_name = var.project_name
+ aws_estate = var.aws_estate
environment = var.environment
stage = var.stage
- name = var.name
delimiter = var.delimiter
attributes = var.attributes
tags = var.tags
@@ -41,21 +32,20 @@ module "this" {
label_value_case = var.label_value_case
descriptor_formats = var.descriptor_formats
labels_as_tags = var.labels_as_tags
+ name = var.name
+ namespace = var.namespace
context = var.context
}
-# Copy contents of cloudposse/terraform-null-label/variables.tf here
-
variable "context" {
type = any
default = {
enabled = true
- namespace = null
- tenant = null
+ project_name = null
+ aws_estate = null
environment = null
stage = null
- name = null
delimiter = null
attributes = []
tags = {}
@@ -74,6 +64,8 @@ variable "context" {
# by setting `labels_as_tags` to `[]`, so we need
# a different sentinel to indicate "default"
labels_as_tags = ["unset"]
+ name = null
+ namespace = null
}
description = <<-EOT
Single object for setting entire context at once.
@@ -100,22 +92,22 @@ variable "enabled" {
description = "Set to false to prevent the module from creating any resources"
}
-variable "namespace" {
+variable "project_name" {
type = string
default = null
- description = "ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique"
+ description = "ID element. Usually an abbreviation of project or brand name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique"
}
-variable "tenant" {
+variable "aws_estate" {
type = string
default = null
- description = "ID element _(Rarely used, not included by default)_. A customer identifier, indicating who this instance of a resource is for"
+ description = "ID element _(Rarely used, not included by default)_. An AWS account identifier"
}
variable "environment" {
type = string
default = null
- description = "ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT'"
+ description = "ID element. Usually used for role 'prod', 'staging', 'dev', 'UAT', OR region e.g. 'uw2', 'us-west-2'"
}
variable "stage" {
@@ -124,22 +116,12 @@ variable "stage" {
description = "ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release'"
}
-variable "name" {
- type = string
- default = null
- description = <<-EOT
- ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.
- This is the only ID element not also included as a `tag`.
- The "name" tag is set to the full `id` string. There is no tag with the value of the `name` input.
- EOT
-}
-
variable "delimiter" {
type = string
default = null
description = <<-EOT
- Delimiter to be used between ID elements.
- Defaults to `-` (hyphen). Set to `""` to use no delimiter at all.
+ Delimiter to be used between ID elements. Set to `""` to use no delimiter at all.
+ Default = "-" (hyphen).
EOT
}
@@ -163,7 +145,6 @@ variable "labels_as_tags" {
Tags with empty values will not be included in the `tags` output.
Set to `[]` to suppress all generated tags.
**Notes:**
- The value of the `name` tag, if included, will be the `id`, not the `name`.
Unlike other `null-label` inputs, the initial setting of `labels_as_tags` cannot be
changed in later chained modules. Attempts to change it will be silently ignored.
EOT
@@ -193,8 +174,8 @@ variable "label_order" {
default = null
description = <<-EOT
The order in which the labels (ID elements) appear in the `id`.
- Defaults to ["namespace", "environment", "stage", "name", "attributes"].
- You can omit any of the 6 labels ("tenant" is the 6th), but at least one must be present.
+ Defaults to ["project_name", "aws_estate", "environment", "stage", "attributes"].
+ You can omit any of the 5 labels, but at least one must be present.
EOT
}
@@ -276,4 +257,18 @@ variable "descriptor_formats" {
EOT
}
-#### End of copy of cloudposse/terraform-null-label/variables.tf
+variable "name" {
+ type = string
+ default = null
+ description = <<-EOT
+ ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.
+ This is the only ID element not also included as a `tag`.
+ The "name" tag is set to the full `id` string. There is no tag with the value of the `name` input.
+ EOT
+}
+
+variable "namespace" {
+ type = string
+ default = null
+ description = "ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique"
+}
diff --git a/docs/terraform.md b/docs/terraform.md
index 21790268..17ea2e37 100644
--- a/docs/terraform.md
+++ b/docs/terraform.md
@@ -1,127 +1,129 @@
+
## Requirements
-| Name | Version |
-|------|---------|
-| [terraform](#requirement\_terraform) | >= 1.3 |
-| [aws](#requirement\_aws) | >= 4.18 |
+| Name | Version |
+| ------------------------------------------------------------------------ | ------- |
+| [terraform](#requirement_terraform) | >= 1.3 |
+| [aws](#requirement_aws) | >= 4.18 |
## Providers
-| Name | Version |
-|------|---------|
-| [aws](#provider\_aws) | >= 4.18 |
+| Name | Version |
+| ------------------------------------------------ | ------- |
+| [aws](#provider_aws) | >= 4.18 |
## Modules
-| Name | Source | Version |
-|------|--------|---------|
-| [aws\_security\_group](#module\_aws\_security\_group) | cloudposse/security-group/aws | 1.0.1 |
-| [dns](#module\_dns) | cloudposse/route53-cluster-hostname/aws | 0.12.2 |
-| [this](#module\_this) | cloudposse/label/null | 0.25.0 |
+| Name | Source | Version |
+| ----------------------------------------------------------------------------------------- | --------------------------------------------- | ------- |
+| [aws_security_group](#module_aws_security_group) | cloudposse/security-group/aws | 1.0.1 |
+| [dns](#module_dns) | cloudposse/route53-cluster-hostname/aws | 0.12.2 |
+| [this](#module_this) | app.terraform.io/studiographene/sg-label/null | 1.0.4 |
## Resources
-| Name | Type |
-|------|------|
-| [aws_cloudwatch_metric_alarm.cache_cpu](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm) | resource |
-| [aws_cloudwatch_metric_alarm.cache_memory](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm) | resource |
-| [aws_elasticache_parameter_group.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_parameter_group) | resource |
+| Name | Type |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
+| [aws_cloudwatch_metric_alarm.cache_cpu](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm) | resource |
+| [aws_cloudwatch_metric_alarm.cache_memory](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm) | resource |
+| [aws_elasticache_parameter_group.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_parameter_group) | resource |
| [aws_elasticache_replication_group.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_replication_group) | resource |
-| [aws_elasticache_subnet_group.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_subnet_group) | resource |
+| [aws_elasticache_subnet_group.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_subnet_group) | resource |
## Inputs
-| Name | Description | Type | Default | Required |
-|------|-------------|------|---------|:--------:|
-| [additional\_security\_group\_rules](#input\_additional\_security\_group\_rules) | A list of Security Group rule objects to add to the created security group, in addition to the ones
this module normally creates. (To suppress the module's rules, set `create_security_group` to false
and supply your own security group via `associated_security_group_ids`.)
The keys and values of the objects are fully compatible with the `aws_security_group_rule` resource, except
for `security_group_id` which will be ignored, and the optional "key" which, if provided, must be unique and known at "plan" time.
To get more info see https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule . | `list(any)` | `[]` | no |
-| [additional\_tag\_map](#input\_additional\_tag\_map) | Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not added to `tags` or `id`.
This is for some rare cases where resources want additional configuration of tags
and therefore take a list of maps with tag key, value, and additional configuration. | `map(string)` | `{}` | no |
-| [alarm\_actions](#input\_alarm\_actions) | Alarm action list | `list(string)` | `[]` | no |
-| [alarm\_cpu\_threshold\_percent](#input\_alarm\_cpu\_threshold\_percent) | CPU threshold alarm level | `number` | `75` | no |
-| [alarm\_memory\_threshold\_bytes](#input\_alarm\_memory\_threshold\_bytes) | Ram threshold alarm level | `number` | `10000000` | no |
-| [allow\_all\_egress](#input\_allow\_all\_egress) | If `true`, the created security group will allow egress on all ports and protocols to all IP address.
If this is false and no egress rules are otherwise specified, then no egress will be allowed.
Defaults to `true` unless the deprecated `egress_cidr_blocks` is provided and is not `["0.0.0.0/0"]`, in which case defaults to `false`. | `bool` | `null` | no |
-| [allowed\_cidr\_blocks](#input\_allowed\_cidr\_blocks) | DEPRECATED: Use `additional_security_group_rules` instead.
Historical description: List of CIDR blocks that are allowed ingress to the cluster's Security Group created in the module | `list(string)` | `[]` | no |
-| [allowed\_security\_group\_ids](#input\_allowed\_security\_group\_ids) | A list of IDs of Security Groups to allow access to the security group created by this module. | `list(string)` | `[]` | no |
-| [allowed\_security\_groups](#input\_allowed\_security\_groups) | DEPRECATED: Use `allowed_security_group_ids` instead. | `list(string)` | `[]` | no |
-| [apply\_immediately](#input\_apply\_immediately) | Apply changes immediately | `bool` | `true` | no |
-| [associated\_security\_group\_ids](#input\_associated\_security\_group\_ids) | A list of IDs of Security Groups to associate the created resource with, in addition to the created security group.
These security groups will not be modified and, if `create_security_group` is `false`, must provide all the required access. | `list(string)` | `[]` | no |
-| [at\_rest\_encryption\_enabled](#input\_at\_rest\_encryption\_enabled) | Enable encryption at rest | `bool` | `false` | no |
-| [attributes](#input\_attributes) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,
in the order they appear in the list. New attributes are appended to the
end of the list. The elements of the list are joined by the `delimiter`
and treated as a single ID element. | `list(string)` | `[]` | no |
-| [auth\_token](#input\_auth\_token) | Auth token for password protecting redis, `transit_encryption_enabled` must be set to `true`. Password must be longer than 16 chars | `string` | `null` | no |
-| [auto\_minor\_version\_upgrade](#input\_auto\_minor\_version\_upgrade) | Specifies whether minor version engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window. Only supported if the engine version is 6 or higher. | `bool` | `null` | no |
-| [automatic\_failover\_enabled](#input\_automatic\_failover\_enabled) | Automatic failover (Not available for T1/T2 instances) | `bool` | `false` | no |
-| [availability\_zones](#input\_availability\_zones) | Availability zone IDs | `list(string)` | `[]` | no |
-| [cloudwatch\_metric\_alarms\_enabled](#input\_cloudwatch\_metric\_alarms\_enabled) | Boolean flag to enable/disable CloudWatch metrics alarms | `bool` | `false` | 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 |
-| [cluster\_mode\_num\_node\_groups](#input\_cluster\_mode\_num\_node\_groups) | Number of node groups (shards) for this Redis replication group. Changing this number will trigger an online resizing operation before other settings modifications | `number` | `0` | no |
-| [cluster\_mode\_replicas\_per\_node\_group](#input\_cluster\_mode\_replicas\_per\_node\_group) | Number of replica nodes in each node group. Valid values are 0 to 5. Changing this number will force a new resource | `number` | `0` | no |
-| [cluster\_size](#input\_cluster\_size) | Number of nodes in cluster. *Ignored when `cluster_mode_enabled` == `true`* | `number` | `1` | no |
-| [context](#input\_context) | Single object for setting entire context at once.
See description of individual variables for details.
Leave string and numeric variables as `null` to use default value.
Individual variable settings (non-null) override settings in context object,
except for attributes, tags, and additional\_tag\_map, which are merged. | `any` | {
"additional_tag_map": {},
"attributes": [],
"delimiter": null,
"descriptor_formats": {},
"enabled": true,
"environment": null,
"id_length_limit": null,
"label_key_case": null,
"label_order": [],
"label_value_case": null,
"labels_as_tags": [
"unset"
],
"name": null,
"namespace": null,
"regex_replace_chars": null,
"stage": null,
"tags": {},
"tenant": null
}
| no |
-| [create\_security\_group](#input\_create\_security\_group) | Set `true` to create and configure a new security group. If false, `associated_security_group_ids` must be provided. | `bool` | `true` | no |
-| [data\_tiering\_enabled](#input\_data\_tiering\_enabled) | Enables data tiering. Data tiering is only supported for replication groups using the r6gd node type. | `bool` | `false` | no |
-| [delimiter](#input\_delimiter) | Delimiter to be used between ID elements.
Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. | `string` | `null` | no |
-| [description](#input\_description) | Description of elasticache replication group | `string` | `null` | no |
-| [descriptor\_formats](#input\_descriptor\_formats) | Describe additional descriptors to be output in the `descriptors` output map.
Map of maps. Keys are names of descriptors. Values are maps of the form
`{
format = string
labels = list(string)
}`
(Type is `any` so the map values can later be enhanced to provide additional options.)
`format` is a Terraform format string to be passed to the `format()` function.
`labels` is a list of labels, in order, to pass to `format()` function.
Label values will be normalized before being passed to `format()` so they will be
identical to how they appear in `id`.
Default is `{}` (`descriptors` output will be empty). | `any` | `{}` | no |
-| [dns\_subdomain](#input\_dns\_subdomain) | The subdomain to use for the CNAME record. If not provided then the CNAME record will use var.name. | `string` | `""` | no |
-| [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | DEPRECATED: Use `allow_all_egress` and `additional_security_group_rules` instead.
Historical description: Outbound traffic address.
Historical default: ["0.0.0.0/0"] | `list(any)` | `null` | no |
-| [elasticache\_subnet\_group\_name](#input\_elasticache\_subnet\_group\_name) | Subnet group name for the ElastiCache instance | `string` | `""` | no |
-| [enabled](#input\_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no |
-| [engine\_version](#input\_engine\_version) | Redis engine version | `string` | `"4.0.10"` | no |
-| [environment](#input\_environment) | ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT' | `string` | `null` | no |
-| [existing\_security\_groups](#input\_existing\_security\_groups) | DEPRECATED: Use `associated_security_group_ids` instead.
Historical description: List of existing Security Group IDs to place the cluster into.
Set `use_existing_security_groups` to `true` to enable using `existing_security_groups` as Security Groups for the cluster. | `list(string)` | `[]` | no |
-| [family](#input\_family) | Redis family | `string` | `"redis4.0"` | no |
-| [final\_snapshot\_identifier](#input\_final\_snapshot\_identifier) | The name of your final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster. If omitted, no final snapshot will be made. | `string` | `null` | no |
-| [id\_length\_limit](#input\_id\_length\_limit) | Limit `id` to this many characters (minimum 6).
Set to `0` for unlimited length.
Set to `null` for keep the existing setting, which defaults to `0`.
Does not affect `id_full`. | `number` | `null` | no |
-| [instance\_type](#input\_instance\_type) | Elastic cache instance type | `string` | `"cache.t2.micro"` | no |
-| [kms\_key\_id](#input\_kms\_key\_id) | The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses service managed encryption. `at_rest_encryption_enabled` must be set to `true` | `string` | `null` | no |
-| [label\_key\_case](#input\_label\_key\_case) | Controls the letter case of the `tags` keys (label names) for tags generated by this module.
Does not affect keys of tags passed in via the `tags` input.
Possible values: `lower`, `title`, `upper`.
Default value: `title`. | `string` | `null` | no |
-| [label\_order](#input\_label\_order) | The order in which the labels (ID elements) appear in the `id`.
Defaults to ["namespace", "environment", "stage", "name", "attributes"].
You can omit any of the 6 labels ("tenant" is the 6th), but at least one must be present. | `list(string)` | `null` | no |
-| [label\_value\_case](#input\_label\_value\_case) | Controls the letter case of ID elements (labels) as included in `id`,
set as tag values, and output by this module individually.
Does not affect values of tags passed in via the `tags` input.
Possible values: `lower`, `title`, `upper` and `none` (no transformation).
Set this to `title` and set `delimiter` to `""` to yield Pascal Case IDs.
Default value: `lower`. | `string` | `null` | no |
-| [labels\_as\_tags](#input\_labels\_as\_tags) | Set of labels (ID elements) to include as tags in the `tags` output.
Default is to include all labels.
Tags with empty values will not be included in the `tags` output.
Set to `[]` to suppress all generated tags.
**Notes:**
The value of the `name` tag, if included, will be the `id`, not the `name`.
Unlike other `null-label` inputs, the initial setting of `labels_as_tags` cannot be
changed in later chained modules. Attempts to change it will be silently ignored. | `set(string)` | [
"default"
]
| no |
-| [log\_delivery\_configuration](#input\_log\_delivery\_configuration) | The log\_delivery\_configuration block allows the streaming of Redis SLOWLOG or Redis Engine Log to CloudWatch Logs or Kinesis Data Firehose. Max of 2 blocks. | `list(map(any))` | `[]` | no |
-| [maintenance\_window](#input\_maintenance\_window) | Maintenance window | `string` | `"wed:03:00-wed:04:00"` | no |
-| [multi\_az\_enabled](#input\_multi\_az\_enabled) | Multi AZ (Automatic Failover must also be enabled. If Cluster Mode is enabled, Multi AZ is on by default, and this setting is ignored) | `bool` | `false` | no |
-| [name](#input\_name) | ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.
This is the only ID element not also included as a `tag`.
The "name" tag is set to the full `id` string. There is no tag with the value of the `name` input. | `string` | `null` | no |
-| [namespace](#input\_namespace) | ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique | `string` | `null` | no |
-| [notification\_topic\_arn](#input\_notification\_topic\_arn) | Notification topic arn | `string` | `""` | no |
-| [ok\_actions](#input\_ok\_actions) | The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Number (ARN) | `list(string)` | `[]` | 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\_description](#input\_parameter\_group\_description) | Managed by Terraform | `string` | `null` | no |
-| [port](#input\_port) | Redis port | `number` | `6379` | no |
-| [regex\_replace\_chars](#input\_regex\_replace\_chars) | Terraform regular expression (regex) string.
Characters matching the regex will be removed from the ID elements.
If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no |
-| [replication\_group\_id](#input\_replication\_group\_id) | Replication group ID with the following constraints:
A name must contain from 1 to 20 alphanumeric characters or hyphens.
The first character must be a letter.
A name cannot end with a hyphen or contain two consecutive hyphens. | `string` | `""` | no |
-| [security\_group\_create\_before\_destroy](#input\_security\_group\_create\_before\_destroy) | Set `true` to enable Terraform `create_before_destroy` behavior on the created security group.
We only recommend setting this `false` if you are upgrading this module and need to keep
the existing security group from being replaced.
Note that changing this value will always cause the security group to be replaced. | `bool` | `true` | no |
-| [security\_group\_create\_timeout](#input\_security\_group\_create\_timeout) | How long to wait for the security group to be created. | `string` | `"10m"` | no |
-| [security\_group\_delete\_timeout](#input\_security\_group\_delete\_timeout) | How long to retry on `DependencyViolation` errors during security group deletion. | `string` | `"15m"` | no |
-| [security\_group\_description](#input\_security\_group\_description) | The description to assign to the created Security Group.
Warning: Changing the description causes the security group to be replaced.
Set this to `null` to maintain parity with releases <= `0.34.0`. | `string` | `"Security group for Elasticache Redis"` | no |
-| [security\_group\_name](#input\_security\_group\_name) | The name to assign to the created security group. Must be unique within the VPC.
If not provided, will be derived from the `null-label.context` passed in.
If `create_before_destroy` is true, will be used as a name prefix. | `list(string)` | `[]` | no |
-| [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(string)` | `[]` | no |
-| [snapshot\_name](#input\_snapshot\_name) | The name of a snapshot from which to restore data into the new node group. Changing the snapshot\_name forces a new resource. | `string` | `null` | no |
-| [snapshot\_retention\_limit](#input\_snapshot\_retention\_limit) | The number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them. | `number` | `0` | no |
-| [snapshot\_window](#input\_snapshot\_window) | The daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster. | `string` | `"06:30-07:30"` | no |
-| [stage](#input\_stage) | ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no |
-| [subnets](#input\_subnets) | Subnet IDs | `list(string)` | `[]` | no |
-| [tags](#input\_tags) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).
Neither the tag keys nor the tag values will be modified by this module. | `map(string)` | `{}` | no |
-| [tenant](#input\_tenant) | ID element \_(Rarely used, not included by default)\_. A customer identifier, indicating who this instance of a resource is for | `string` | `null` | no |
-| [transit\_encryption\_enabled](#input\_transit\_encryption\_enabled) | Set `true` to enable encryption in transit. Forced `true` if `var.auth_token` is set.
If this is enabled, use the [following guide](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/in-transit-encryption.html#connect-tls) to access redis. | `bool` | `true` | no |
-| [use\_existing\_security\_groups](#input\_use\_existing\_security\_groups) | DEPRECATED: Use `create_security_group` instead.
Historical description: Flag to enable/disable creation of Security Group in the module.
Set to `true` to disable Security Group creation and provide a list of existing security Group IDs in `existing_security_groups` to place the cluster into.
Historical default: `false` | `bool` | `null` | no |
-| [user\_group\_ids](#input\_user\_group\_ids) | User Group ID to associate with the replication group | `list(string)` | `null` | no |
-| [vpc\_id](#input\_vpc\_id) | VPC ID | `string` | n/a | yes |
-| [zone\_id](#input\_zone\_id) | Route53 DNS Zone ID as list of string (0 or 1 items). If empty, no custom DNS name will be published.
If the list contains a single Zone ID, a custom DNS name will be pulished in that zone.
Can also be a plain string, but that use is DEPRECATED because of Terraform issues. | `any` | `[]` | no |
+| Name | Description | Type | Default | Required |
+| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: |
+| [additional_security_group_rules](#input_additional_security_group_rules) | A list of Security Group rule objects to add to the created security group, in addition to the ones
this module normally creates. (To suppress the module's rules, set `create_security_group` to false
and supply your own security group via `associated_security_group_ids`.)
The keys and values of the objects are fully compatible with the `aws_security_group_rule` resource, except
for `security_group_id` which will be ignored, and the optional "key" which, if provided, must be unique and known at "plan" time.
To get more info see https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule . | `list(any)` | `[]` | no |
+| [additional_tag_map](#input_additional_tag_map) | Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not added to `tags` or `id`.
This is for some rare cases where resources want additional configuration of tags
and therefore take a list of maps with tag key, value, and additional configuration. | `map(string)` | `{}` | no |
+| [alarm_actions](#input_alarm_actions) | Alarm action list | `list(string)` | `[]` | no |
+| [alarm_cpu_threshold_percent](#input_alarm_cpu_threshold_percent) | CPU threshold alarm level | `number` | `75` | no |
+| [alarm_memory_threshold_bytes](#input_alarm_memory_threshold_bytes) | Ram threshold alarm level | `number` | `10000000` | no |
+| [allow_all_egress](#input_allow_all_egress) | If `true`, the created security group will allow egress on all ports and protocols to all IP address.
If this is false and no egress rules are otherwise specified, then no egress will be allowed.
Defaults to `true` unless the deprecated `egress_cidr_blocks` is provided and is not `["0.0.0.0/0"]`, in which case defaults to `false`. | `bool` | `null` | no |
+| [allowed_cidr_blocks](#input_allowed_cidr_blocks) | DEPRECATED: Use `additional_security_group_rules` instead.
Historical description: List of CIDR blocks that are allowed ingress to the cluster's Security Group created in the module | `list(string)` | `[]` | no |
+| [allowed_security_group_ids](#input_allowed_security_group_ids) | A list of IDs of Security Groups to allow access to the security group created by this module. | `list(string)` | `[]` | no |
+| [allowed_security_groups](#input_allowed_security_groups) | DEPRECATED: Use `allowed_security_group_ids` instead. | `list(string)` | `[]` | no |
+| [apply_immediately](#input_apply_immediately) | Apply changes immediately | `bool` | `true` | no |
+| [associated_security_group_ids](#input_associated_security_group_ids) | A list of IDs of Security Groups to associate the created resource with, in addition to the created security group.
These security groups will not be modified and, if `create_security_group` is `false`, must provide all the required access. | `list(string)` | `[]` | no |
+| [at_rest_encryption_enabled](#input_at_rest_encryption_enabled) | Enable encryption at rest | `bool` | `false` | no |
+| [attributes](#input_attributes) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,
in the order they appear in the list. New attributes are appended to the
end of the list. The elements of the list are joined by the `delimiter`
and treated as a single ID element. | `list(string)` | `[]` | no |
+| [auth_token](#input_auth_token) | Auth token for password protecting redis, `transit_encryption_enabled` must be set to `true`. Password must be longer than 16 chars | `string` | `null` | no |
+| [auto_minor_version_upgrade](#input_auto_minor_version_upgrade) | Specifies whether minor version engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window. Only supported if the engine version is 6 or higher. | `bool` | `null` | no |
+| [automatic_failover_enabled](#input_automatic_failover_enabled) | Automatic failover (Not available for T1/T2 instances) | `bool` | `false` | no |
+| [availability_zones](#input_availability_zones) | Availability zone IDs | `list(string)` | `[]` | no |
+| [cloudwatch_metric_alarms_enabled](#input_cloudwatch_metric_alarms_enabled) | Boolean flag to enable/disable CloudWatch metrics alarms | `bool` | `false` | 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 |
+| [cluster_mode_num_node_groups](#input_cluster_mode_num_node_groups) | Number of node groups (shards) for this Redis replication group. Changing this number will trigger an online resizing operation before other settings modifications | `number` | `0` | no |
+| [cluster_mode_replicas_per_node_group](#input_cluster_mode_replicas_per_node_group) | Number of replica nodes in each node group. Valid values are 0 to 5. Changing this number will force a new resource | `number` | `0` | no |
+| [cluster_size](#input_cluster_size) | Number of nodes in cluster. _Ignored when `cluster_mode_enabled` == `true`_ | `number` | `1` | no |
+| [context](#input_context) | Single object for setting entire context at once.
See description of individual variables for details.
Leave string and numeric variables as `null` to use default value.
Individual variable settings (non-null) override settings in context object,
except for attributes, tags, and additional_tag_map, which are merged. | `any` | {
"additional_tag_map": {},
"attributes": [],
"delimiter": null,
"descriptor_formats": {},
"enabled": true,
"environment": null,
"id_length_limit": null,
"label_key_case": null,
"label_order": [],
"label_value_case": null,
"labels_as_tags": [
"unset"
],
"name": null,
"namespace": null,
"regex_replace_chars": null,
"stage": null,
"tags": {},
"tenant": null
}
| no |
+| [create_security_group](#input_create_security_group) | Set `true` to create and configure a new security group. If false, `associated_security_group_ids` must be provided. | `bool` | `true` | no |
+| [data_tiering_enabled](#input_data_tiering_enabled) | Enables data tiering. Data tiering is only supported for replication groups using the r6gd node type. | `bool` | `false` | no |
+| [delimiter](#input_delimiter) | Delimiter to be used between ID elements.
Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. | `string` | `null` | no |
+| [description](#input_description) | Description of elasticache replication group | `string` | `null` | no |
+| [descriptor_formats](#input_descriptor_formats) | Describe additional descriptors to be output in the `descriptors` output map.
Map of maps. Keys are names of descriptors. Values are maps of the form
`{
format = string
labels = list(string)
}`
(Type is `any` so the map values can later be enhanced to provide additional options.)
`format` is a Terraform format string to be passed to the `format()` function.
`labels` is a list of labels, in order, to pass to `format()` function.
Label values will be normalized before being passed to `format()` so they will be
identical to how they appear in `id`.
Default is `{}` (`descriptors` output will be empty). | `any` | `{}` | no |
+| [dns_subdomain](#input_dns_subdomain) | The subdomain to use for the CNAME record. If not provided then the CNAME record will use var.name. | `string` | `""` | no |
+| [egress_cidr_blocks](#input_egress_cidr_blocks) | DEPRECATED: Use `allow_all_egress` and `additional_security_group_rules` instead.
Historical description: Outbound traffic address.
Historical default: ["0.0.0.0/0"] | `list(any)` | `null` | no |
+| [elasticache_subnet_group_name](#input_elasticache_subnet_group_name) | Subnet group name for the ElastiCache instance | `string` | `""` | no |
+| [enabled](#input_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no |
+| [engine_version](#input_engine_version) | Redis engine version | `string` | `"4.0.10"` | no |
+| [environment](#input_environment) | ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT' | `string` | `null` | no |
+| [existing_security_groups](#input_existing_security_groups) | DEPRECATED: Use `associated_security_group_ids` instead.
Historical description: List of existing Security Group IDs to place the cluster into.
Set `use_existing_security_groups` to `true` to enable using `existing_security_groups` as Security Groups for the cluster. | `list(string)` | `[]` | no |
+| [family](#input_family) | Redis family | `string` | `"redis4.0"` | no |
+| [final_snapshot_identifier](#input_final_snapshot_identifier) | The name of your final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster. If omitted, no final snapshot will be made. | `string` | `null` | no |
+| [id_length_limit](#input_id_length_limit) | Limit `id` to this many characters (minimum 6).
Set to `0` for unlimited length.
Set to `null` for keep the existing setting, which defaults to `0`.
Does not affect `id_full`. | `number` | `null` | no |
+| [instance_type](#input_instance_type) | Elastic cache instance type | `string` | `"cache.t2.micro"` | no |
+| [kms_key_id](#input_kms_key_id) | The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses service managed encryption. `at_rest_encryption_enabled` must be set to `true` | `string` | `null` | no |
+| [label_key_case](#input_label_key_case) | Controls the letter case of the `tags` keys (label names) for tags generated by this module.
Does not affect keys of tags passed in via the `tags` input.
Possible values: `lower`, `title`, `upper`.
Default value: `title`. | `string` | `null` | no |
+| [label_order](#input_label_order) | The order in which the labels (ID elements) appear in the `id`.
Defaults to ["namespace", "environment", "stage", "name", "attributes"].
You can omit any of the 6 labels ("tenant" is the 6th), but at least one must be present. | `list(string)` | `null` | no |
+| [label_value_case](#input_label_value_case) | Controls the letter case of ID elements (labels) as included in `id`,
set as tag values, and output by this module individually.
Does not affect values of tags passed in via the `tags` input.
Possible values: `lower`, `title`, `upper` and `none` (no transformation).
Set this to `title` and set `delimiter` to `""` to yield Pascal Case IDs.
Default value: `lower`. | `string` | `null` | no |
+| [labels_as_tags](#input_labels_as_tags) | Set of labels (ID elements) to include as tags in the `tags` output.
Default is to include all labels.
Tags with empty values will not be included in the `tags` output.
Set to `[]` to suppress all generated tags.
**Notes:**
The value of the `name` tag, if included, will be the `id`, not the `name`.
Unlike other `null-label` inputs, the initial setting of `labels_as_tags` cannot be
changed in later chained modules. Attempts to change it will be silently ignored. | `set(string)` | [
"default"
]
| no |
+| [log_delivery_configuration](#input_log_delivery_configuration) | The log_delivery_configuration block allows the streaming of Redis SLOWLOG or Redis Engine Log to CloudWatch Logs or Kinesis Data Firehose. Max of 2 blocks. | `list(map(any))` | `[]` | no |
+| [maintenance_window](#input_maintenance_window) | Maintenance window | `string` | `"wed:03:00-wed:04:00"` | no |
+| [multi_az_enabled](#input_multi_az_enabled) | Multi AZ (Automatic Failover must also be enabled. If Cluster Mode is enabled, Multi AZ is on by default, and this setting is ignored) | `bool` | `false` | no |
+| [name](#input_name) | ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.
This is the only ID element not also included as a `tag`.
The "name" tag is set to the full `id` string. There is no tag with the value of the `name` input. | `string` | `null` | no |
+| [namespace](#input_namespace) | ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique | `string` | `null` | no |
+| [notification_topic_arn](#input_notification_topic_arn) | Notification topic arn | `string` | `""` | no |
+| [ok_actions](#input_ok_actions) | The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Number (ARN) | `list(string)` | `[]` | 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_description](#input_parameter_group_description) | Managed by Terraform | `string` | `null` | no |
+| [port](#input_port) | Redis port | `number` | `6379` | no |
+| [regex_replace_chars](#input_regex_replace_chars) | Terraform regular expression (regex) string.
Characters matching the regex will be removed from the ID elements.
If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no |
+| [replication_group_id](#input_replication_group_id) | Replication group ID with the following constraints:
A name must contain from 1 to 20 alphanumeric characters or hyphens.
The first character must be a letter.
A name cannot end with a hyphen or contain two consecutive hyphens. | `string` | `""` | no |
+| [security_group_create_before_destroy](#input_security_group_create_before_destroy) | Set `true` to enable Terraform `create_before_destroy` behavior on the created security group.
We only recommend setting this `false` if you are upgrading this module and need to keep
the existing security group from being replaced.
Note that changing this value will always cause the security group to be replaced. | `bool` | `true` | no |
+| [security_group_create_timeout](#input_security_group_create_timeout) | How long to wait for the security group to be created. | `string` | `"10m"` | no |
+| [security_group_delete_timeout](#input_security_group_delete_timeout) | How long to retry on `DependencyViolation` errors during security group deletion. | `string` | `"15m"` | no |
+| [security_group_description](#input_security_group_description) | The description to assign to the created Security Group.
Warning: Changing the description causes the security group to be replaced.
Set this to `null` to maintain parity with releases <= `0.34.0`. | `string` | `"Security group for Elasticache Redis"` | no |
+| [security_group_name](#input_security_group_name) | The name to assign to the created security group. Must be unique within the VPC.
If not provided, will be derived from the `null-label.context` passed in.
If `create_before_destroy` is true, will be used as a name prefix. | `list(string)` | `[]` | no |
+| [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(string)` | `[]` | no |
+| [snapshot_name](#input_snapshot_name) | The name of a snapshot from which to restore data into the new node group. Changing the snapshot_name forces a new resource. | `string` | `null` | no |
+| [snapshot_retention_limit](#input_snapshot_retention_limit) | The number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them. | `number` | `0` | no |
+| [snapshot_window](#input_snapshot_window) | The daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster. | `string` | `"06:30-07:30"` | no |
+| [stage](#input_stage) | ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no |
+| [subnets](#input_subnets) | Subnet IDs | `list(string)` | `[]` | no |
+| [tags](#input_tags) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).
Neither the tag keys nor the tag values will be modified by this module. | `map(string)` | `{}` | no |
+| [tenant](#input_tenant) | ID element \_(Rarely used, not included by default)\_. A customer identifier, indicating who this instance of a resource is for | `string` | `null` | no |
+| [transit_encryption_enabled](#input_transit_encryption_enabled) | Set `true` to enable encryption in transit. Forced `true` if `var.auth_token` is set.
If this is enabled, use the [following guide](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/in-transit-encryption.html#connect-tls) to access redis. | `bool` | `true` | no |
+| [use_existing_security_groups](#input_use_existing_security_groups) | DEPRECATED: Use `create_security_group` instead.
Historical description: Flag to enable/disable creation of Security Group in the module.
Set to `true` to disable Security Group creation and provide a list of existing security Group IDs in `existing_security_groups` to place the cluster into.
Historical default: `false` | `bool` | `null` | no |
+| [user_group_ids](#input_user_group_ids) | User Group ID to associate with the replication group | `list(string)` | `null` | no |
+| [vpc_id](#input_vpc_id) | VPC ID | `string` | n/a | yes |
+| [zone_id](#input_zone_id) | Route53 DNS Zone ID as list of string (0 or 1 items). If empty, no custom DNS name will be published.
If the list contains a single Zone ID, a custom DNS name will be pulished in that zone.
Can also be a plain string, but that use is DEPRECATED because of Terraform issues. | `any` | `[]` | no |
## Outputs
-| Name | Description |
-|------|-------------|
-| [arn](#output\_arn) | Elasticache Replication Group ARN |
-| [cluster\_enabled](#output\_cluster\_enabled) | Indicates if cluster mode is enabled |
-| [endpoint](#output\_endpoint) | Redis primary or configuration endpoint, whichever is appropriate for the given cluster mode |
-| [engine\_version\_actual](#output\_engine\_version\_actual) | The running version of the cache engine |
-| [host](#output\_host) | Redis hostname |
-| [id](#output\_id) | Redis cluster ID |
-| [member\_clusters](#output\_member\_clusters) | Redis cluster members |
-| [port](#output\_port) | Redis port |
-| [reader\_endpoint\_address](#output\_reader\_endpoint\_address) | The address of the endpoint for the reader node in the replication group, if the cluster mode is disabled. |
-| [security\_group\_id](#output\_security\_group\_id) | The ID of the created security group |
-| [security\_group\_name](#output\_security\_group\_name) | The name of the created security group |
+| Name | Description |
+| -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
+| [arn](#output_arn) | Elasticache Replication Group ARN |
+| [cluster_enabled](#output_cluster_enabled) | Indicates if cluster mode is enabled |
+| [endpoint](#output_endpoint) | Redis primary or configuration endpoint, whichever is appropriate for the given cluster mode |
+| [engine_version_actual](#output_engine_version_actual) | The running version of the cache engine |
+| [host](#output_host) | Redis hostname |
+| [id](#output_id) | Redis cluster ID |
+| [member_clusters](#output_member_clusters) | Redis cluster members |
+| [port](#output_port) | Redis port |
+| [reader_endpoint_address](#output_reader_endpoint_address) | The address of the endpoint for the reader node in the replication group, if the cluster mode is disabled. |
+| [security_group_id](#output_security_group_id) | The ID of the created security group |
+| [security_group_name](#output_security_group_name) | The name of the created security group |
+
diff --git a/examples/complete/context.tf b/examples/complete/context.tf
index 5e0ef885..312883a3 100644
--- a/examples/complete/context.tf
+++ b/examples/complete/context.tf
@@ -21,8 +21,8 @@
#
module "this" {
- source = "cloudposse/label/null"
- version = "0.25.0" # requires Terraform >= 0.13.0
+ source = "app.terraform.io/studiographene/sg-label/null"
+ version = "1.0.4" # requires Terraform >= 0.13.0
enabled = var.enabled
namespace = var.namespace
diff --git a/examples/complete/main.tf b/examples/complete/main.tf
index 5f453a4d..bac291ea 100644
--- a/examples/complete/main.tf
+++ b/examples/complete/main.tf
@@ -3,7 +3,7 @@ provider "aws" {
}
module "vpc" {
- source = "cloudposse/vpc/aws"
+ source = "app.terraform.io/studiographene/sg-label/vpc/aws"
version = "2.1.0"
ipv4_primary_cidr_block = "172.16.0.0/16"
@@ -12,7 +12,7 @@ module "vpc" {
}
module "subnets" {
- source = "cloudposse/dynamic-subnets/aws"
+ source = "app.terraform.io/studiographene/sg-label/dynamic-subnets/aws"
version = "2.3.0"
availability_zones = var.availability_zones
@@ -35,7 +35,7 @@ resource "aws_route53_zone" "private" {
}
module "cloudwatch_logs" {
- source = "cloudposse/cloudwatch-logs/aws"
+ source = "app.terraform.io/studiographene/sg-label/cloudwatch-logs/aws"
version = "0.6.5"
context = module.this.context
@@ -47,7 +47,7 @@ module "redis" {
availability_zones = var.availability_zones
zone_id = [aws_route53_zone.private.id]
vpc_id = module.vpc.vpc_id
- allowed_security_groups = [module.vpc.vpc_default_security_group_id]
+ allowed_security_group_ids = [module.vpc.vpc_default_security_group_id]
subnets = module.subnets.private_subnet_ids
cluster_size = var.cluster_size
instance_type = var.instance_type
diff --git a/main.tf b/main.tf
index 05255939..ee9405dc 100644
--- a/main.tf
+++ b/main.tf
@@ -1,71 +1,5 @@
-#
-# Security Group Resources
-#
-locals {
- enabled = module.this.enabled
-
- legacy_egress_rule = local.use_legacy_egress ? {
- key = "legacy-egress"
- type = "egress"
- from_port = 0
- to_port = 0
- protocol = "-1"
- cidr_blocks = var.egress_cidr_blocks
- description = "Allow outbound traffic to existing CIDR blocks"
- } : null
-
- legacy_cidr_ingress_rule = length(var.allowed_cidr_blocks) == 0 ? null : {
- key = "legacy-cidr-ingress"
- type = "ingress"
- from_port = var.port
- to_port = var.port
- protocol = "tcp"
- cidr_blocks = var.allowed_cidr_blocks
- description = "Allow inbound traffic from CIDR blocks"
- }
-
- sg_rules = {
- legacy = merge(local.legacy_egress_rule, local.legacy_cidr_ingress_rule),
- extra = var.additional_security_group_rules
- }
-}
-
-module "aws_security_group" {
- source = "cloudposse/security-group/aws"
- version = "1.0.1"
-
- enabled = local.create_security_group
-
- allow_all_egress = local.allow_all_egress
- security_group_name = var.security_group_name
- rules_map = local.sg_rules
- rule_matrix = [{
- key = "in"
- source_security_group_ids = local.allowed_security_group_ids
- cidr_blocks = var.allowed_cidr_blocks
- rules = [{
- key = "in"
- type = "ingress"
- from_port = var.port
- to_port = var.port
- protocol = "tcp"
- description = "Selectively allow inbound traffic"
- }]
- }]
-
- vpc_id = var.vpc_id
-
- security_group_description = local.security_group_description
-
- create_before_destroy = var.security_group_create_before_destroy
-
- security_group_create_timeout = var.security_group_create_timeout
- security_group_delete_timeout = var.security_group_delete_timeout
-
- context = module.this.context
-}
-
locals {
+ enabled = module.this.enabled
elasticache_subnet_group_name = var.elasticache_subnet_group_name != "" ? var.elasticache_subnet_group_name : join("", aws_elasticache_subnet_group.default[*].name)
# if !cluster, then node_count = replica cluster_size, if cluster then node_count = shard*(replica + 1)
@@ -77,11 +11,11 @@ locals {
var.cluster_size
)
- elasticache_member_clusters = module.this.enabled ? tolist(aws_elasticache_replication_group.default[0].member_clusters) : []
+ elasticache_member_clusters = local.enabled ? tolist(aws_elasticache_replication_group.default[0].member_clusters) : []
}
resource "aws_elasticache_subnet_group" "default" {
- count = module.this.enabled && var.elasticache_subnet_group_name == "" && length(var.subnets) > 0 ? 1 : 0
+ count = local.enabled && var.elasticache_subnet_group_name == "" && length(var.subnets) > 0 ? 1 : 0
name = module.this.id
description = "Elasticache subnet group for ${module.this.id}"
subnet_ids = var.subnets
@@ -89,7 +23,7 @@ resource "aws_elasticache_subnet_group" "default" {
}
resource "aws_elasticache_parameter_group" "default" {
- count = module.this.enabled ? 1 : 0
+ count = local.enabled ? 1 : 0
name = module.this.id
description = var.parameter_group_description != null ? var.parameter_group_description : "Elasticache parameter group for ${module.this.id}"
family = var.family
@@ -113,7 +47,7 @@ resource "aws_elasticache_parameter_group" "default" {
}
resource "aws_elasticache_replication_group" "default" {
- count = module.this.enabled ? 1 : 0
+ count = local.enabled ? 1 : 0
auth_token = var.transit_encryption_enabled ? var.auth_token : null
replication_group_id = var.replication_group_id == "" ? module.this.id : var.replication_group_id
@@ -129,7 +63,7 @@ resource "aws_elasticache_replication_group" "default" {
# It would be nice to remove null or duplicate security group IDs, if there are any, using `compact`,
# but that causes problems, and having duplicates does not seem to cause problems.
# See https://github.com/hashicorp/terraform/issues/29799
- security_group_ids = local.create_security_group ? concat(local.associated_security_group_ids, [module.aws_security_group.id]) : local.associated_security_group_ids
+ security_group_ids = [aws_security_group.redis.id]
maintenance_window = var.maintenance_window
notification_topic_arn = var.notification_topic_arn
engine_version = var.engine_version
@@ -167,7 +101,7 @@ resource "aws_elasticache_replication_group" "default" {
# CloudWatch Resources
#
resource "aws_cloudwatch_metric_alarm" "cache_cpu" {
- count = module.this.enabled && var.cloudwatch_metric_alarms_enabled ? local.member_clusters_count : 0
+ count = local.enabled && var.cloudwatch_metric_alarms_enabled ? local.member_clusters_count : 0
alarm_name = "${element(local.elasticache_member_clusters, count.index)}-cpu-utilization"
alarm_description = "Redis cluster CPU utilization"
comparison_operator = "GreaterThanThreshold"
@@ -191,7 +125,7 @@ resource "aws_cloudwatch_metric_alarm" "cache_cpu" {
}
resource "aws_cloudwatch_metric_alarm" "cache_memory" {
- count = module.this.enabled && var.cloudwatch_metric_alarms_enabled ? local.member_clusters_count : 0
+ count = local.enabled && var.cloudwatch_metric_alarms_enabled ? local.member_clusters_count : 0
alarm_name = "${element(local.elasticache_member_clusters, count.index)}-freeable-memory"
alarm_description = "Redis cluster freeable memory"
comparison_operator = "LessThanThreshold"
@@ -218,7 +152,7 @@ module "dns" {
source = "cloudposse/route53-cluster-hostname/aws"
version = "0.12.2"
- enabled = module.this.enabled && length(var.zone_id) > 0 ? true : false
+ enabled = local.enabled && length(var.zone_id) > 0 ? true : false
dns_name = var.dns_subdomain != "" ? var.dns_subdomain : module.this.id
ttl = 60
zone_id = try(var.zone_id[0], tostring(var.zone_id), "")
diff --git a/outputs.tf b/outputs.tf
index 3830fb91..bcba3d87 100644
--- a/outputs.tf
+++ b/outputs.tf
@@ -4,12 +4,12 @@ output "id" {
}
output "security_group_id" {
- value = module.aws_security_group.id
+ value = aws_security_group.redis.id
description = "The ID of the created security group"
}
output "security_group_name" {
- value = module.aws_security_group.name
+ value = aws_security_group.redis.name
description = "The name of the created security group"
}
diff --git a/security_group.tf b/security_group.tf
new file mode 100644
index 00000000..e4c1931d
--- /dev/null
+++ b/security_group.tf
@@ -0,0 +1,57 @@
+
+resource "aws_security_group" "redis" {
+ name = "${module.this.id}-redis-sg"
+ description = "Controls access to the Redis Cluster"
+ vpc_id = var.vpc_id
+
+ tags = merge(
+ module.this.tags,
+ {
+ Name = "${module.this.id}-redis-sg"
+ },
+ )
+}
+
+resource "aws_security_group_rule" "ingress_security_groups" {
+ for_each = toset(var.allowed_security_groups)
+
+ description = "Allow inbound traffic from existing security groups"
+ type = "ingress"
+ from_port = var.port
+ to_port = var.port
+ protocol = "tcp"
+ source_security_group_id = each.value
+ security_group_id = join("", aws_security_group.redis.*.id)
+}
+
+resource "aws_security_group_rule" "traffic_inside_security_group" {
+ count = var.intra_security_group_traffic_enabled ? 1 : 0
+ description = "Allow traffic between members of the Redis security group"
+ type = "ingress"
+ from_port = var.port
+ to_port = var.port
+ protocol = "tcp"
+ self = true
+ security_group_id = join("", aws_security_group.redis.*.id)
+}
+
+resource "aws_security_group_rule" "ingress_cidr_blocks" {
+ count = length(var.ingress_cidr_blocks) > 0 ? 1 : 0
+ description = "Allow inbound traffic from existing CIDR blocks"
+ type = "ingress"
+ from_port = var.port
+ to_port = var.port
+ protocol = "tcp"
+ cidr_blocks = var.ingress_cidr_blocks
+ security_group_id = join("", aws_security_group.redis.*.id)
+}
+
+resource "aws_security_group_rule" "egress" {
+ description = "Allow outbound traffic"
+ type = "egress"
+ from_port = 0
+ to_port = 0
+ protocol = "-1"
+ cidr_blocks = ["0.0.0.0/0"]
+ security_group_id = join("", aws_security_group.redis.*.id)
+}
diff --git a/security_group_inputs.tf b/security_group_inputs.tf
deleted file mode 100644
index 5958bada..00000000
--- a/security_group_inputs.tf
+++ /dev/null
@@ -1,112 +0,0 @@
-# security_group_inputs Version: 1
-##
-
-
-variable "create_security_group" {
- type = bool
- default = true
- description = "Set `true` to create and configure a new security group. If false, `associated_security_group_ids` must be provided."
-}
-
-locals {
- create_security_group = local.enabled && (var.use_existing_security_groups == null ? var.create_security_group : !var.use_existing_security_groups)
-}
-
-variable "associated_security_group_ids" {
- type = list(string)
- default = []
- description = <<-EOT
- A list of IDs of Security Groups to associate the created resource with, in addition to the created security group.
- These security groups will not be modified and, if `create_security_group` is `false`, must provide all the required access.
- EOT
-}
-
-locals {
- associated_security_group_ids = concat(var.existing_security_groups, var.associated_security_group_ids)
-}
-
-variable "allowed_security_group_ids" {
- type = list(string)
- default = []
- description = <<-EOT
- A list of IDs of Security Groups to allow access to the security group created by this module.
- EOT
-}
-
-locals {
- allowed_security_group_ids = concat(var.allowed_security_groups, var.allowed_security_group_ids)
-}
-
-
-variable "security_group_name" {
- type = list(string)
- default = []
- description = <<-EOT
- The name to assign to the created security group. Must be unique within the VPC.
- If not provided, will be derived from the `null-label.context` passed in.
- If `create_before_destroy` is true, will be used as a name prefix.
- EOT
-}
-
-variable "security_group_description" {
- type = string
- default = "Security group for Elasticache Redis"
- description = <<-EOT
- The description to assign to the created Security Group.
- Warning: Changing the description causes the security group to be replaced.
- Set this to `null` to maintain parity with releases <= `0.34.0`.
- EOT
-}
-
-locals {
- security_group_description = var.security_group_description == null ? "Managed by Terraform" : var.security_group_description
-}
-
-variable "security_group_create_before_destroy" {
- type = bool
- default = true
- description = <<-EOT
- Set `true` to enable Terraform `create_before_destroy` behavior on the created security group.
- We only recommend setting this `false` if you are upgrading this module and need to keep
- the existing security group from being replaced.
- Note that changing this value will always cause the security group to be replaced.
- EOT
-}
-
-variable "security_group_create_timeout" {
- type = string
- default = "10m"
- description = "How long to wait for the security group to be created."
-}
-
-variable "security_group_delete_timeout" {
- type = string
- default = "15m"
- description = <<-EOT
- How long to retry on `DependencyViolation` errors during security group deletion.
- EOT
-}
-
-
-variable "allow_all_egress" {
- type = bool
- default = null
- description = <<-EOT
- If `true`, the created security group will allow egress on all ports and protocols to all IP address.
- If this is false and no egress rules are otherwise specified, then no egress will be allowed.
- Defaults to `true` unless the deprecated `egress_cidr_blocks` is provided and is not `["0.0.0.0/0"]`, in which case defaults to `false`.
- EOT
-}
-
-variable "additional_security_group_rules" {
- type = list(any)
- default = []
- description = <<-EOT
- A list of Security Group rule objects to add to the created security group, in addition to the ones
- this module normally creates. (To suppress the module's rules, set `create_security_group` to false
- and supply your own security group via `associated_security_group_ids`.)
- The keys and values of the objects are fully compatible with the `aws_security_group_rule` resource, except
- for `security_group_id` which will be ignored, and the optional "key" which, if provided, must be unique and known at "plan" time.
- To get more info see https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule .
- EOT
-}
diff --git a/variables-deprecated.tf b/variables-deprecated.tf
deleted file mode 100644
index 11c47d51..00000000
--- a/variables-deprecated.tf
+++ /dev/null
@@ -1,60 +0,0 @@
-variable "use_existing_security_groups" {
- type = bool
- description = <<-EOT
- DEPRECATED: Use `create_security_group` instead.
- Historical description: Flag to enable/disable creation of Security Group in the module.
- Set to `true` to disable Security Group creation and provide a list of existing security Group IDs in `existing_security_groups` to place the cluster into.
- Historical default: `false`
- EOT
- default = null
-}
-
-variable "existing_security_groups" {
- type = list(string)
- default = []
- description = <<-EOT
- DEPRECATED: Use `associated_security_group_ids` instead.
- Historical description: List of existing Security Group IDs to place the cluster into.
- Set `use_existing_security_groups` to `true` to enable using `existing_security_groups` as Security Groups for the cluster.
- EOT
-}
-
-variable "allowed_security_groups" {
- type = list(string)
- default = []
- description = <<-EOT
- DEPRECATED: Use `allowed_security_group_ids` instead.
- EOT
-}
-
-variable "allowed_cidr_blocks" {
- type = list(string)
- default = []
- description = <<-EOT
- DEPRECATED: Use `additional_security_group_rules` instead.
- Historical description: List of CIDR blocks that are allowed ingress to the cluster's Security Group created in the module
- EOT
-}
-
-variable "egress_cidr_blocks" {
- type = list(any)
- default = null
- description = <<-EOT
- DEPRECATED: Use `allow_all_egress` and `additional_security_group_rules` instead.
- Historical description: Outbound traffic address.
- Historical default: ["0.0.0.0/0"]
- EOT
-}
-
-locals {
- # Use the legacy egress rule unless:
- # - var.egress_cidr_blocks is null, which means use the default, which is allow all egress
- # - var.allow_all_egress is true, which explicitly means allow all egress
- # - var.egress_cidr_blocks is exactly ["0.0.0.0/0"], which we interpret to mean "allow all egress"
- use_legacy_egress = !(var.egress_cidr_blocks == null || var.allow_all_egress == true || (
- try(length(var.egress_cidr_blocks), 0) == 1 && try(var.egress_cidr_blocks[0], "") == "0.0.0.0/0")
- )
-
- # If var.allow_all_egress is null, default to true unless some alternate legacy rule was provided
- allow_all_egress = var.allow_all_egress == null ? !local.use_legacy_egress : var.allow_all_egress
-}
diff --git a/variables.tf b/variables.tf
index a3731c3e..3a6f5c20 100644
--- a/variables.tf
+++ b/variables.tf
@@ -9,6 +9,24 @@ variable "subnets" {
default = []
}
+variable "ingress_cidr_blocks" {
+ description = "List of IPv4 CIDR ranges to allow in security group ingress."
+ type = list(string)
+ default = []
+}
+
+variable "allowed_security_groups" {
+ description = "List of security group IDs to allow in security group ingress."
+ type = list(string)
+ default = []
+}
+
+variable "intra_security_group_traffic_enabled" {
+ type = bool
+ default = false
+ description = "Whether to allow traffic between resources inside the database's security group."
+}
+
variable "elasticache_subnet_group_name" {
type = string
description = "Subnet group name for the ElastiCache instance"