diff --git a/README.md b/README.md index c781d2d..2402ab2 100644 --- a/README.md +++ b/README.md @@ -76,67 +76,6 @@ module "vote_service_sg" { } ``` -### Note about "value of 'count' cannot be computed" - -Terraform 0.11 has a limitation which does not allow **computed** values inside `count` attribute on resources (issues: [#16712](https://github.com/hashicorp/terraform/issues/16712), [#18015](https://github.com/hashicorp/terraform/issues/18015), ...) - -Computed values are values provided as outputs from `module`. Non-computed values are all others - static values, values referenced as `variable` and from data-sources. - -When you need to specify computed value inside security group rule argument you need to specify it using an argument which starts with `computed_` and provide a number of elements in the argument which starts with `number_of_computed_`. See these examples: - -```hcl -module "http_sg" { - source = "terraform-aws-modules/security-group/aws" - # omitted for brevity -} - -module "db_computed_source_sg" { - # omitted for brevity - - vpc_id = "vpc-12345678" # these are valid values also - `module.vpc.vpc_id` and `local.vpc_id` - - computed_ingress_with_source_security_group_id = [ - { - rule = "mysql-tcp" - source_security_group_id = module.http_sg.security_group_id - } - ] - number_of_computed_ingress_with_source_security_group_id = 1 -} - -module "db_computed_sg" { - # omitted for brevity - - ingress_cidr_blocks = ["10.10.0.0/16", data.aws_security_group.default.id] - - computed_ingress_cidr_blocks = [module.vpc.vpc_cidr_block] - number_of_computed_ingress_cidr_blocks = 1 -} - -module "db_computed_merged_sg" { - # omitted for brevity - - computed_ingress_cidr_blocks = ["10.10.0.0/16", module.vpc.vpc_cidr_block] - number_of_computed_ingress_cidr_blocks = 2 -} -``` - -Note that `db_computed_sg` and `db_computed_merged_sg` are equal, because it is possible to put both computed and non-computed values in arguments starting with `computed_`. - -## Conditional creation - -Sometimes you need a way to conditionally create a security group. If you're using Terraform < 0.13 which lacks module support for [count](https://www.terraform.io/docs/language/meta-arguments/count.html), you can instead specify the argument `create`. - -```hcl -# This security group will not be created -module "vote_service_sg" { - source = "terraform-aws-modules/security-group/aws" - - create = false - # ... omitted -} -``` - ## Examples * [Complete Security Group example](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/examples/complete) shows all available parameters to configure security group. @@ -144,7 +83,6 @@ module "vote_service_sg" { * [HTTP Security Group example](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/examples/http) shows more applicable security groups for common web-servers. * [Disable creation of Security Group example](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/examples/disabled) shows how to disable creation of security group. * [Dynamic values inside Security Group rules example](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/examples/dynamic) shows how to specify values inside security group rules (data-sources and variables are allowed). -* [Computed values inside Security Group rules example](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/examples/computed) shows how to specify computed values inside security group rules (solution for `value of 'count' cannot be computed` problem). ## How to add/update rules/groups? @@ -160,13 +98,13 @@ No issue is creating limit on this module. | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 3.29 | +| [aws](#provider\_aws) | >= 5.63 | ## Modules @@ -177,28 +115,13 @@ No modules. | Name | Type | |------|------| | [aws_security_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource | -| [aws_security_group.this_name_prefix](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource | -| [aws_security_group_rule.computed_egress_rules](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.computed_egress_with_cidr_blocks](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.computed_egress_with_ipv6_cidr_blocks](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.computed_egress_with_prefix_list_ids](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.computed_egress_with_self](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.computed_egress_with_source_security_group_id](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.computed_ingress_rules](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.computed_ingress_with_cidr_blocks](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.computed_ingress_with_ipv6_cidr_blocks](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.computed_ingress_with_prefix_list_ids](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.computed_ingress_with_self](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.computed_ingress_with_source_security_group_id](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | | [aws_security_group_rule.egress_rules](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | | [aws_security_group_rule.egress_with_cidr_blocks](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.egress_with_ipv6_cidr_blocks](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | | [aws_security_group_rule.egress_with_prefix_list_ids](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | | [aws_security_group_rule.egress_with_self](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | | [aws_security_group_rule.egress_with_source_security_group_id](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | | [aws_security_group_rule.ingress_rules](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | | [aws_security_group_rule.ingress_with_cidr_blocks](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.ingress_with_ipv6_cidr_blocks](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | | [aws_security_group_rule.ingress_with_prefix_list_ids](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | | [aws_security_group_rule.ingress_with_self](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | | [aws_security_group_rule.ingress_with_source_security_group_id](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | @@ -208,18 +131,6 @@ No modules. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [auto\_groups](#input\_auto\_groups) | Map of groups of security group rules to use to generate modules (see update\_groups.sh) | `map(map(list(string)))` |
{| no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used only | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [create\_sg](#input\_create\_sg) | Whether to create security group | `bool` | `true` | no | | [create\_timeout](#input\_create\_timeout) | Time to wait for a security group to be created | `string` | `"10m"` | no | @@ -230,7 +141,6 @@ No modules. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used only | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -239,23 +149,10 @@ No modules. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used only | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group - not required if create\_sg is false | `string` | `null` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used only | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [putin\_khuylo](#input\_putin\_khuylo) | Do you agree that Putin doesn't respect Ukrainian sovereignty and territorial integrity? More info: https://en.wikipedia.org/wiki/Putin_khuylo! | `bool` | `true` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [rules](#input\_rules) | Map of known security group rules (define as 'name' = ['from port', 'to port', 'protocol', 'description']) | `map(list(any))` |
"activemq": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"activemq-5671-tcp",
"activemq-8883-tcp",
"activemq-61614-tcp",
"activemq-61617-tcp",
"activemq-61619-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"alertmanager": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"alertmanager-9093-tcp",
"alertmanager-9094-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"carbon-relay-ng": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"carbon-line-in-tcp",
"carbon-line-in-udp",
"carbon-pickle-tcp",
"carbon-pickle-udp",
"carbon-gui-udp"
],
"ingress_with_self": [
"all-all"
]
},
"cassandra": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"cassandra-clients-tcp",
"cassandra-thrift-clients-tcp",
"cassandra-jmx-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"consul": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"consul-tcp",
"consul-grpc-tcp",
"consul-grpc-tcp-tls",
"consul-webui-http-tcp",
"consul-webui-https-tcp",
"consul-dns-tcp",
"consul-dns-udp",
"consul-serf-lan-tcp",
"consul-serf-lan-udp",
"consul-serf-wan-tcp",
"consul-serf-wan-udp"
],
"ingress_with_self": [
"all-all"
]
},
"dax-cluster": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"dax-cluster-unencrypted-tcp",
"dax-cluster-encrypted-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"docker-swarm": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"docker-swarm-mngmt-tcp",
"docker-swarm-node-tcp",
"docker-swarm-node-udp",
"docker-swarm-overlay-udp"
],
"ingress_with_self": [
"all-all"
]
},
"elasticsearch": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"elasticsearch-rest-tcp",
"elasticsearch-java-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"etcd": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"etcd-client-tcp",
"etcd-peer-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"grafana": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"grafana-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"graphite-statsd": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"graphite-webui",
"graphite-2003-tcp",
"graphite-2004-tcp",
"graphite-2023-tcp",
"graphite-2024-tcp",
"graphite-8080-tcp",
"graphite-8125-tcp",
"graphite-8125-udp",
"graphite-8126-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"http-80": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"http-80-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"http-8080": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"http-8080-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"https-443": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"https-443-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"https-8443": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"https-8443-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"ipsec-4500": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"ipsec-4500-udp"
],
"ingress_with_self": [
"all-all"
]
},
"ipsec-500": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"ipsec-500-udp"
],
"ingress_with_self": [
"all-all"
]
},
"kafka": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"kafka-broker-tcp",
"kafka-broker-tls-tcp",
"kafka-broker-tls-public-tcp",
"kafka-broker-sasl-scram-tcp",
"kafka-broker-sasl-scram-tcp",
"kafka-broker-sasl-iam-tcp",
"kafka-broker-sasl-iam-public-tcp",
"kafka-jmx-exporter-tcp",
"kafka-node-exporter-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"kibana": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"kibana-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"kubernetes-api": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"kubernetes-api-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"ldap": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"ldap-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"ldaps": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"ldaps-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"logstash": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"logstash-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"loki": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"loki-grafana",
"loki-grafana-grpc"
],
"ingress_with_self": [
"all-all"
]
},
"memcached": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"memcached-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"minio": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"minio-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"mongodb": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"mongodb-27017-tcp",
"mongodb-27018-tcp",
"mongodb-27019-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"mssql": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"mssql-tcp",
"mssql-udp",
"mssql-analytics-tcp",
"mssql-broker-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"mysql": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"mysql-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"nfs": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"nfs-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"nomad": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"nomad-http-tcp",
"nomad-rpc-tcp",
"nomad-serf-tcp",
"nomad-serf-udp"
],
"ingress_with_self": [
"all-all"
]
},
"ntp": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"ntp-udp"
],
"ingress_with_self": [
"all-all"
]
},
"openvpn": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"openvpn-udp",
"openvpn-tcp",
"openvpn-https-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"oracle-db": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"oracle-db-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"postgresql": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"postgresql-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"prometheus": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"prometheus-http-tcp",
"prometheus-pushgateway-http-tcp",
"prometheus-node-exporter-http-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"promtail": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"promtail-http"
],
"ingress_with_self": [
"all-all"
]
},
"puppet": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"puppet-tcp",
"puppetdb-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"rabbitmq": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"rabbitmq-4369-tcp",
"rabbitmq-5671-tcp",
"rabbitmq-5672-tcp",
"rabbitmq-15672-tcp",
"rabbitmq-25672-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"rdp": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"rdp-tcp",
"rdp-udp"
],
"ingress_with_self": [
"all-all"
]
},
"redis": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"redis-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"redshift": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"redshift-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"smtp": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"smtp-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"smtp-submission": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"smtp-submission-587-tcp",
"smtp-submission-2587-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"smtps": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"smtps-465-tcp",
"smtps-2465-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"solr": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"solr-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"splunk": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"splunk-indexer-tcp",
"splunk-web-tcp",
"splunk-splunkd-tcp",
"splunk-hec-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"squid": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"squid-proxy-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"ssh": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"ssh-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"storm": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"storm-nimbus-tcp",
"storm-ui-tcp",
"storm-supervisor-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"vault": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"vault-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"wazuh": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"wazuh-server-agent-connection-tcp",
"wazuh-server-agent-connection-udp",
"wazuh-server-agent-enrollment",
"wazuh-server-agent-cluster-daemon",
"wazuh-server-syslog-collector-tcp",
"wazuh-server-syslog-collector-udp",
"wazuh-server-restful-api",
"wazuh-indexer-restful-api",
"wazuh-dashboard"
],
"ingress_with_self": [
"all-all"
]
},
"web": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"http-80-tcp",
"http-8080-tcp",
"https-443-tcp",
"web-jmx-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"winrm": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"winrm-http-tcp",
"winrm-https-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"zabbix": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"zabbix-server",
"zabbix-proxy",
"zabbix-agent"
],
"ingress_with_self": [
"all-all"
]
},
"zipkin": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"zipkin-admin-tcp",
"zipkin-admin-query-tcp",
"zipkin-admin-web-tcp",
"zipkin-query-tcp",
"zipkin-web-tcp"
],
"ingress_with_self": [
"all-all"
]
},
"zookeeper": {
"egress_rules": [
"all-all"
],
"ingress_rules": [
"zookeeper-2181-tcp",
"zookeeper-2182-tls-tcp",
"zookeeper-2888-tcp",
"zookeeper-3888-tcp",
"zookeeper-jmx-tcp"
],
"ingress_with_self": [
"all-all"
]
}
}
{| no | diff --git a/examples/complete/README.md b/examples/complete/README.md index 44a2e89..b842a85 100644 --- a/examples/complete/README.md +++ b/examples/complete/README.md @@ -22,13 +22,13 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 3.29 | +| [aws](#provider\_aws) | >= 5.63 | ## Modules diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 5e26fa4..16252d1 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -71,10 +71,6 @@ module "complete_sg" { # Open for all CIDRs defined in ingress_cidr_blocks ingress_rules = ["https-443-tcp"] - # Use computed value here (eg, `${module...}`). Plain string is not a real use-case for this argument. - computed_ingress_rules = ["ssh-tcp"] - number_of_computed_ingress_rules = 1 - # Open to CIDRs blocks (rule or from_port+to_port+protocol+description) ingress_with_cidr_blocks = [ { @@ -94,45 +90,6 @@ module "complete_sg" { }, ] - computed_ingress_with_cidr_blocks = [ - { - rule = "postgresql-tcp" - cidr_blocks = "3.3.3.3/32,${module.vpc.vpc_cidr_block}" - }, - { - from_port = 15 - to_port = 25 - protocol = 6 - description = "Service name with vpc cidr" - cidr_blocks = module.vpc.vpc_cidr_block - }, - ] - - number_of_computed_ingress_with_cidr_blocks = 2 - - # Open to IPV6 CIDR blocks (rule or from_port+to_port+protocol+description) - ingress_with_ipv6_cidr_blocks = [ - { - from_port = 300 - to_port = 400 - protocol = "tcp" - description = "Service ports (ipv6)" - ipv6_cidr_blocks = "2001:db8::/64" - }, - ] - - computed_ingress_with_ipv6_cidr_blocks = [ - { - from_port = 350 - to_port = 450 - protocol = "tcp" - description = "Service ports (ipv6). VPC ID = ${module.vpc.vpc_id}" - ipv6_cidr_blocks = "2001:db8::/64" - }, - ] - - number_of_computed_ingress_with_ipv6_cidr_blocks = 1 - # Open for security group id (rule or from_port+to_port+protocol+description) ingress_with_source_security_group_id = [ { @@ -148,22 +105,6 @@ module "complete_sg" { }, ] - computed_ingress_with_source_security_group_id = [ - { - rule = "postgresql-tcp" - source_security_group_id = module.main_sg.security_group_id - }, - { - from_port = 23 - to_port = 23 - protocol = 6 - description = "Service name" - source_security_group_id = module.main_sg.security_group_id - }, - ] - - number_of_computed_ingress_with_source_security_group_id = 2 - # Open for self (rule or from_port+to_port+protocol+description) ingress_with_self = [ { @@ -184,18 +125,6 @@ module "complete_sg" { }, ] - computed_ingress_with_self = [ - { - from_port = 32 - to_port = 43 - protocol = 6 - description = "Service name. VPC ID: ${module.vpc.vpc_id}" - self = true - }, - ] - - number_of_computed_ingress_with_self = 1 - # Default CIDR blocks, which will be used for all egress rules in this module. Typically these are CIDR blocks of the VPC. # If this is not specified then no CIDR blocks will be used. egress_cidr_blocks = ["10.10.0.0/16"] @@ -207,9 +136,6 @@ module "complete_sg" { # Open for all CIDRs defined in egress_cidr_blocks egress_rules = ["http-80-tcp"] - computed_egress_rules = ["ssh-tcp"] - number_of_computed_egress_rules = 1 - # Open to CIDRs blocks (rule or from_port+to_port+protocol+description) egress_with_cidr_blocks = [ { @@ -229,38 +155,6 @@ module "complete_sg" { }, ] - computed_egress_with_cidr_blocks = [ - { - rule = "https-443-tcp" - cidr_blocks = module.vpc.vpc_cidr_block - }, - ] - - number_of_computed_egress_with_cidr_blocks = 1 - - # Open to IPV6 CIDR blocks (rule or from_port+to_port+protocol+description) - egress_with_ipv6_cidr_blocks = [ - { - from_port = 300 - to_port = 400 - protocol = "tcp" - description = "Service ports (ipv6)" - ipv6_cidr_blocks = "2001:db8::/64" - }, - ] - - computed_egress_with_ipv6_cidr_blocks = [ - { - from_port = 55 - to_port = 66 - protocol = "tcp" - description = "Service ports (ipv6). VPC ID: ${module.vpc.vpc_id}" - ipv6_cidr_blocks = "2001:db8::/64" - }, - ] - - number_of_computed_egress_with_ipv6_cidr_blocks = 1 - # Open for security group id (rule or from_port+to_port+protocol+description) egress_with_source_security_group_id = [ { @@ -276,15 +170,6 @@ module "complete_sg" { }, ] - computed_egress_with_source_security_group_id = [ - { - rule = "postgresql-tcp" - source_security_group_id = module.main_sg.security_group_id - }, - ] - - number_of_computed_egress_with_source_security_group_id = 1 - # Open for self (rule or from_port+to_port+protocol+description) egress_with_self = [ { @@ -305,14 +190,6 @@ module "complete_sg" { }, ] - computed_egress_with_self = [ - { - rule = "https-443-tcp" - }, - ] - - number_of_computed_egress_with_self = 1 - create_timeout = "15m" delete_timeout = "45m" } @@ -328,41 +205,23 @@ module "ipv4_ipv6_example" { vpc_id = data.aws_vpc.default.id ingress_with_cidr_blocks = [ - { - from_port = 8080 - to_port = 8090 - protocol = "tcp" - description = "User-service ports (ipv4)" - cidr_blocks = "0.0.0.0/0" - }, - ] - - ingress_with_ipv6_cidr_blocks = [ { from_port = 8080 to_port = 8090 protocol = "tcp" - description = "User-service ports (ipv6)" + description = "User-service ports" + cidr_blocks = "0.0.0.0/0" ipv6_cidr_blocks = "2001:db8::/64" }, ] egress_with_cidr_blocks = [ - { - from_port = 8090 - to_port = 8100 - protocol = "tcp" - description = "User-service ports (ipv4)" - cidr_blocks = "0.0.0.0/0" - }, - ] - - egress_with_ipv6_cidr_blocks = [ { from_port = 8090 to_port = 8100 protocol = "tcp" - description = "User-service ports (ipv6)" + description = "User-service ports" + cidr_blocks = "0.0.0.0/0" ipv6_cidr_blocks = "2001:db8::/64" }, ] diff --git a/examples/complete/versions.tf b/examples/complete/versions.tf index c4f23b0..6edb421 100644 --- a/examples/complete/versions.tf +++ b/examples/complete/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/examples/computed/README.md b/examples/computed/README.md deleted file mode 100644 index 6ef2158..0000000 --- a/examples/computed/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# Computed Security Group rules example - -Configuration in this directory creates set of Security Group and Security Group Rules resources in various combination. - -## Usage - -To run this example you need to execute: - -```bash -$ terraform init -$ terraform plan -$ terraform apply -``` - -Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources. - - -## Requirements - -| Name | Version | -|------|---------| -| [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | - -## Providers - -| Name | Version | -|------|---------| -| [aws](#provider\_aws) | >= 3.29 | - -## Modules - -| Name | Source | Version | -|------|--------|---------| -| [http\_sg](#module\_http\_sg) | ../../modules/https-443 | n/a | -| [mysql\_sg](#module\_mysql\_sg) | ../../modules/mysql | n/a | - -## Resources - -| Name | Type | -|------|------| -| [aws_security_group.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/security_group) | data source | -| [aws_vpc.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc) | data source | - -## Inputs - -No inputs. - -## Outputs - -| Name | Description | -|------|-------------| -| [security\_group\_arn](#output\_security\_group\_arn) | The ARN of the security group | -| [security\_group\_description](#output\_security\_group\_description) | The description of the security group | -| [security\_group\_id](#output\_security\_group\_id) | The ID of the security group | -| [security\_group\_name](#output\_security\_group\_name) | The name of the security group | -| [security\_group\_owner\_id](#output\_security\_group\_owner\_id) | The owner ID | -| [security\_group\_vpc\_id](#output\_security\_group\_vpc\_id) | The VPC ID | - diff --git a/examples/computed/main.tf b/examples/computed/main.tf deleted file mode 100644 index 9e4f66c..0000000 --- a/examples/computed/main.tf +++ /dev/null @@ -1,54 +0,0 @@ -provider "aws" { - region = "eu-west-1" -} - -############################################################# -# Data sources to get VPC and default security group details -############################################################# -data "aws_vpc" "default" { - default = true -} - -data "aws_security_group" "default" { - name = "default" - vpc_id = data.aws_vpc.default.id -} - -########################### -# Security groups examples -########################### -module "http_sg" { - source = "../../modules/https-443" - - name = "computed-http-sg" - description = "Security group with HTTP port open for everyone, and HTTPS open just for the default security group" - vpc_id = data.aws_vpc.default.id - - ingress_cidr_blocks = ["0.0.0.0/0"] - - ingress_with_source_security_group_id = [ - { - rule = "https-443-tcp" - source_security_group_id = data.aws_security_group.default.id - }, - ] -} - -module "mysql_sg" { - source = "../../modules/mysql" - - name = "computed-mysql-sg" - description = "Security group with MySQL/Aurora port open for HTTP security group created above (computed)" - vpc_id = data.aws_vpc.default.id - - ingress_cidr_blocks = ["0.0.0.0/0"] - - computed_ingress_with_source_security_group_id = [ - { - rule = "mysql-tcp" - source_security_group_id = module.http_sg.security_group_id - }, - ] - - number_of_computed_ingress_with_source_security_group_id = 1 -} diff --git a/examples/computed/outputs.tf b/examples/computed/outputs.tf deleted file mode 100644 index a0e1853..0000000 --- a/examples/computed/outputs.tf +++ /dev/null @@ -1,29 +0,0 @@ -output "security_group_arn" { - description = "The ARN of the security group" - value = module.mysql_sg.security_group_arn -} - -output "security_group_id" { - description = "The ID of the security group" - value = module.mysql_sg.security_group_id -} - -output "security_group_vpc_id" { - description = "The VPC ID" - value = module.mysql_sg.security_group_vpc_id -} - -output "security_group_owner_id" { - description = "The owner ID" - value = module.mysql_sg.security_group_owner_id -} - -output "security_group_name" { - description = "The name of the security group" - value = module.mysql_sg.security_group_name -} - -output "security_group_description" { - description = "The description of the security group" - value = module.mysql_sg.security_group_description -} diff --git a/examples/computed/versions.tf b/examples/computed/versions.tf deleted file mode 100644 index c4f23b0..0000000 --- a/examples/computed/versions.tf +++ /dev/null @@ -1,10 +0,0 @@ -terraform { - required_version = ">= 1.0" - - required_providers { - aws = { - source = "hashicorp/aws" - version = ">= 3.29" - } - } -} diff --git a/examples/disabled/README.md b/examples/disabled/README.md index 7dc6bcf..d9f4605 100644 --- a/examples/disabled/README.md +++ b/examples/disabled/README.md @@ -22,13 +22,13 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 3.29 | +| [aws](#provider\_aws) | >= 5.63 | ## Modules diff --git a/examples/disabled/versions.tf b/examples/disabled/versions.tf index c4f23b0..6edb421 100644 --- a/examples/disabled/versions.tf +++ b/examples/disabled/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/examples/dynamic/README.md b/examples/dynamic/README.md index ef36748..958c0a4 100644 --- a/examples/dynamic/README.md +++ b/examples/dynamic/README.md @@ -22,13 +22,13 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 3.29 | +| [aws](#provider\_aws) | >= 5.63 | ## Modules diff --git a/examples/dynamic/versions.tf b/examples/dynamic/versions.tf index c4f23b0..6edb421 100644 --- a/examples/dynamic/versions.tf +++ b/examples/dynamic/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/examples/http/README.md b/examples/http/README.md index 54281f3..7e9028f 100644 --- a/examples/http/README.md +++ b/examples/http/README.md @@ -22,13 +22,13 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 3.29 | +| [aws](#provider\_aws) | >= 5.63 | ## Modules diff --git a/examples/http/versions.tf b/examples/http/versions.tf index c4f23b0..6edb421 100644 --- a/examples/http/versions.tf +++ b/examples/http/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/examples/rules-only/README.md b/examples/rules-only/README.md index 44e57d1..ab44300 100644 --- a/examples/rules-only/README.md +++ b/examples/rules-only/README.md @@ -22,13 +22,13 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 3.29 | +| [aws](#provider\_aws) | >= 5.63 | ## Modules diff --git a/examples/rules-only/versions.tf b/examples/rules-only/versions.tf index c4f23b0..6edb421 100644 --- a/examples/rules-only/versions.tf +++ b/examples/rules-only/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/main.tf b/main.tf index 6e9eede..84fa08f 100644 --- a/main.tf +++ b/main.tf @@ -4,40 +4,17 @@ locals { create = var.create && var.putin_khuylo - this_sg_id = var.create_sg ? concat(aws_security_group.this.*.id, aws_security_group.this_name_prefix.*.id, [""])[0] : var.security_group_id + this_sg_id = var.create_sg ? aws_security_group.this[0].id : var.security_group_id } ########################## -# Security group with name +# Security group ########################## resource "aws_security_group" "this" { - count = local.create && var.create_sg && !var.use_name_prefix ? 1 : 0 + count = local.create && var.create_sg ? 1 : 0 - name = var.name - description = var.description - vpc_id = var.vpc_id - revoke_rules_on_delete = var.revoke_rules_on_delete - - tags = merge( - { - "Name" = format("%s", var.name) - }, - var.tags, - ) - - timeouts { - create = var.create_timeout - delete = var.delete_timeout - } -} - -################################# -# Security group with name_prefix -################################# -resource "aws_security_group" "this_name_prefix" { - count = local.create && var.create_sg && var.use_name_prefix ? 1 : 0 - - name_prefix = "${var.name}-" + name = var.use_name_prefix ? null : var.name + name_prefix = var.use_name_prefix ? "${var.name}-" : null description = var.description vpc_id = var.vpc_id revoke_rules_on_delete = var.revoke_rules_on_delete @@ -64,24 +41,7 @@ resource "aws_security_group" "this_name_prefix" { ################################### # Security group rules with "cidr_blocks" and it uses list of rules names resource "aws_security_group_rule" "ingress_rules" { - count = local.create ? length(var.ingress_rules) : 0 - - security_group_id = local.this_sg_id - type = "ingress" - - cidr_blocks = var.ingress_cidr_blocks - ipv6_cidr_blocks = var.ingress_ipv6_cidr_blocks - prefix_list_ids = var.ingress_prefix_list_ids - description = var.rules[var.ingress_rules[count.index]][3] - - from_port = var.rules[var.ingress_rules[count.index]][0] - to_port = var.rules[var.ingress_rules[count.index]][1] - protocol = var.rules[var.ingress_rules[count.index]][2] -} - -# Computed - Security group rules with "cidr_blocks" and it uses list of rules names -resource "aws_security_group_rule" "computed_ingress_rules" { - count = local.create ? var.number_of_computed_ingress_rules : 0 + for_each = local.create ? toset(var.ingress_rules) : toset([]) security_group_id = local.this_sg_id type = "ingress" @@ -89,11 +49,11 @@ resource "aws_security_group_rule" "computed_ingress_rules" { cidr_blocks = var.ingress_cidr_blocks ipv6_cidr_blocks = var.ingress_ipv6_cidr_blocks prefix_list_ids = var.ingress_prefix_list_ids - description = var.rules[var.computed_ingress_rules[count.index]][3] + description = var.rules[each.value][3] - from_port = var.rules[var.computed_ingress_rules[count.index]][0] - to_port = var.rules[var.computed_ingress_rules[count.index]][1] - protocol = var.rules[var.computed_ingress_rules[count.index]][2] + from_port = var.rules[each.value][0] + to_port = var.rules[each.value][1] + protocol = var.rules[each.value][2] } ########################## @@ -101,86 +61,50 @@ resource "aws_security_group_rule" "computed_ingress_rules" { ########################## # Security group rules with "source_security_group_id", but without "cidr_blocks" and "self" resource "aws_security_group_rule" "ingress_with_source_security_group_id" { - count = local.create ? length(var.ingress_with_source_security_group_id) : 0 + for_each = { + for ingress in var.ingress_with_source_security_group_id : + "${lookup(ingress, "from_port", var.rules[lookup(ingress, "rule", "_")][0])}-${lookup(ingress, "to_port", var.rules[lookup(ingress, "rule", "_")][1])}-${lookup(ingress, "protocol", var.rules[lookup(ingress, "rule", "_")][2])}" => ingress + if local.create + } security_group_id = local.this_sg_id type = "ingress" - source_security_group_id = var.ingress_with_source_security_group_id[count.index]["source_security_group_id"] - prefix_list_ids = var.ingress_prefix_list_ids - description = lookup( - var.ingress_with_source_security_group_id[count.index], - "description", - "Ingress Rule", - ) - - from_port = lookup( - var.ingress_with_source_security_group_id[count.index], - "from_port", - var.rules[lookup( - var.ingress_with_source_security_group_id[count.index], - "rule", - "_", - )][0], + source_security_group_id = lookup( + each.value, + "source_security_group_id" ) - to_port = lookup( - var.ingress_with_source_security_group_id[count.index], - "to_port", - var.rules[lookup( - var.ingress_with_source_security_group_id[count.index], - "rule", - "_", - )][1], - ) - protocol = lookup( - var.ingress_with_source_security_group_id[count.index], - "protocol", - var.rules[lookup( - var.ingress_with_source_security_group_id[count.index], - "rule", - "_", - )][2], - ) -} -# Computed - Security group rules with "source_security_group_id", but without "cidr_blocks" and "self" -resource "aws_security_group_rule" "computed_ingress_with_source_security_group_id" { - count = local.create ? var.number_of_computed_ingress_with_source_security_group_id : 0 - - security_group_id = local.this_sg_id - type = "ingress" - - source_security_group_id = var.computed_ingress_with_source_security_group_id[count.index]["source_security_group_id"] - prefix_list_ids = var.ingress_prefix_list_ids + prefix_list_ids = var.ingress_prefix_list_ids description = lookup( - var.computed_ingress_with_source_security_group_id[count.index], + each.value, "description", "Ingress Rule", ) from_port = lookup( - var.computed_ingress_with_source_security_group_id[count.index], + each.value, "from_port", var.rules[lookup( - var.computed_ingress_with_source_security_group_id[count.index], + each.value, "rule", "_", )][0], ) to_port = lookup( - var.computed_ingress_with_source_security_group_id[count.index], + each.value, "to_port", var.rules[lookup( - var.computed_ingress_with_source_security_group_id[count.index], + each.value, "rule", "_", )][1], ) protocol = lookup( - var.computed_ingress_with_source_security_group_id[count.index], + each.value, "protocol", var.rules[lookup( - var.computed_ingress_with_source_security_group_id[count.index], + each.value, "rule", "_", )][2], @@ -189,48 +113,11 @@ resource "aws_security_group_rule" "computed_ingress_with_source_security_group_ # Security group rules with "cidr_blocks", but without "ipv6_cidr_blocks", "source_security_group_id" and "self" resource "aws_security_group_rule" "ingress_with_cidr_blocks" { - count = local.create ? length(var.ingress_with_cidr_blocks) : 0 - - security_group_id = local.this_sg_id - type = "ingress" - - cidr_blocks = compact(split( - ",", - lookup( - var.ingress_with_cidr_blocks[count.index], - "cidr_blocks", - join(",", var.ingress_cidr_blocks), - ), - )) - - description = lookup( - var.ingress_with_cidr_blocks[count.index], - "description", - "Ingress Rule", - ) - - from_port = lookup( - var.ingress_with_cidr_blocks[count.index], - "from_port", - var.rules[lookup(var.ingress_with_cidr_blocks[count.index], "rule", "_")][0], - ) - - to_port = lookup( - var.ingress_with_cidr_blocks[count.index], - "to_port", - var.rules[lookup(var.ingress_with_cidr_blocks[count.index], "rule", "_")][1], - ) - - protocol = lookup( - var.ingress_with_cidr_blocks[count.index], - "protocol", - var.rules[lookup(var.ingress_with_cidr_blocks[count.index], "rule", "_")][2], - ) -} - -# Computed - Security group rules with "cidr_blocks", but without "ipv6_cidr_blocks", "source_security_group_id" and "self" -resource "aws_security_group_rule" "computed_ingress_with_cidr_blocks" { - count = local.create ? var.number_of_computed_ingress_with_cidr_blocks : 0 + for_each = { + for ingress in var.ingress_with_cidr_blocks : + "${lookup(ingress, "from_port", var.rules[lookup(ingress, "rule", "_")][0])}-${lookup(ingress, "to_port", var.rules[lookup(ingress, "rule", "_")][1])}-${lookup(ingress, "protocol", var.rules[lookup(ingress, "rule", "_")][2])}" => ingress + if local.create + } security_group_id = local.this_sg_id type = "ingress" @@ -238,246 +125,86 @@ resource "aws_security_group_rule" "computed_ingress_with_cidr_blocks" { cidr_blocks = compact(split( ",", lookup( - var.computed_ingress_with_cidr_blocks[count.index], + each.value, "cidr_blocks", join(",", var.ingress_cidr_blocks), ), )) - - description = lookup( - var.computed_ingress_with_cidr_blocks[count.index], - "description", - "Ingress Rule", - ) - - from_port = lookup( - var.computed_ingress_with_cidr_blocks[count.index], - "from_port", - var.rules[lookup( - var.computed_ingress_with_cidr_blocks[count.index], - "rule", - "_", - )][0], - ) - - to_port = lookup( - var.computed_ingress_with_cidr_blocks[count.index], - "to_port", - var.rules[lookup( - var.computed_ingress_with_cidr_blocks[count.index], - "rule", - "_", - )][1], - ) - - protocol = lookup( - var.computed_ingress_with_cidr_blocks[count.index], - "protocol", - var.rules[lookup( - var.computed_ingress_with_cidr_blocks[count.index], - "rule", - "_", - )][2], - ) -} - -# Security group rules with "ipv6_cidr_blocks", but without "cidr_blocks", "source_security_group_id" and "self" -resource "aws_security_group_rule" "ingress_with_ipv6_cidr_blocks" { - count = local.create ? length(var.ingress_with_ipv6_cidr_blocks) : 0 - - security_group_id = local.this_sg_id - type = "ingress" - ipv6_cidr_blocks = compact(split( ",", lookup( - var.ingress_with_ipv6_cidr_blocks[count.index], + each.value, "ipv6_cidr_blocks", join(",", var.ingress_ipv6_cidr_blocks), ), )) prefix_list_ids = var.ingress_prefix_list_ids description = lookup( - var.ingress_with_ipv6_cidr_blocks[count.index], + each.value, "description", "Ingress Rule", ) from_port = lookup( - var.ingress_with_ipv6_cidr_blocks[count.index], + each.value, "from_port", - var.rules[lookup(var.ingress_with_ipv6_cidr_blocks[count.index], "rule", "_")][0], + var.rules[lookup(each.value, "rule", "_")][0], ) to_port = lookup( - var.ingress_with_ipv6_cidr_blocks[count.index], + each.value, "to_port", - var.rules[lookup(var.ingress_with_ipv6_cidr_blocks[count.index], "rule", "_")][1], + var.rules[lookup(each.value, "rule", "_")][1], ) protocol = lookup( - var.ingress_with_ipv6_cidr_blocks[count.index], + each.value, "protocol", - var.rules[lookup(var.ingress_with_ipv6_cidr_blocks[count.index], "rule", "_")][2], - ) -} - -# Computed - Security group rules with "ipv6_cidr_blocks", but without "cidr_blocks", "source_security_group_id" and "self" -resource "aws_security_group_rule" "computed_ingress_with_ipv6_cidr_blocks" { - count = local.create ? var.number_of_computed_ingress_with_ipv6_cidr_blocks : 0 - - security_group_id = local.this_sg_id - type = "ingress" - - ipv6_cidr_blocks = compact(split( - ",", - lookup( - var.computed_ingress_with_ipv6_cidr_blocks[count.index], - "ipv6_cidr_blocks", - join(",", var.ingress_ipv6_cidr_blocks), - ), - )) - prefix_list_ids = var.ingress_prefix_list_ids - description = lookup( - var.computed_ingress_with_ipv6_cidr_blocks[count.index], - "description", - "Ingress Rule", - ) - - from_port = lookup( - var.computed_ingress_with_ipv6_cidr_blocks[count.index], - "from_port", - var.rules[lookup( - var.computed_ingress_with_ipv6_cidr_blocks[count.index], - "rule", - "_", - )][0], - ) - to_port = lookup( - var.computed_ingress_with_ipv6_cidr_blocks[count.index], - "to_port", - var.rules[lookup( - var.computed_ingress_with_ipv6_cidr_blocks[count.index], - "rule", - "_", - )][1], - ) - protocol = lookup( - var.computed_ingress_with_ipv6_cidr_blocks[count.index], - "protocol", - var.rules[lookup( - var.computed_ingress_with_ipv6_cidr_blocks[count.index], - "rule", - "_", - )][2], + var.rules[lookup(each.value, "rule", "_")][2], ) } # Security group rules with "self", but without "cidr_blocks" and "source_security_group_id" resource "aws_security_group_rule" "ingress_with_self" { - count = local.create ? length(var.ingress_with_self) : 0 + for_each = { + for ingress in var.ingress_with_self : + "${lookup(ingress, "from_port", var.rules[lookup(ingress, "rule", "_")][0])}-${lookup(ingress, "to_port", var.rules[lookup(ingress, "rule", "_")][1])}-${lookup(ingress, "protocol", var.rules[lookup(ingress, "rule", "_")][2])}" => ingress + if local.create + } security_group_id = local.this_sg_id type = "ingress" - self = lookup(var.ingress_with_self[count.index], "self", true) + self = lookup(each.value, "self", true) prefix_list_ids = var.ingress_prefix_list_ids description = lookup( - var.ingress_with_self[count.index], + each.value, "description", "Ingress Rule", ) from_port = lookup( - var.ingress_with_self[count.index], + each.value, "from_port", - var.rules[lookup(var.ingress_with_self[count.index], "rule", "_")][0], + var.rules[lookup(each.value, "rule", "_")][0], ) to_port = lookup( - var.ingress_with_self[count.index], + each.value, "to_port", - var.rules[lookup(var.ingress_with_self[count.index], "rule", "_")][1], + var.rules[lookup(each.value, "rule", "_")][1], ) protocol = lookup( - var.ingress_with_self[count.index], + each.value, "protocol", - var.rules[lookup(var.ingress_with_self[count.index], "rule", "_")][2], + var.rules[lookup(each.value, "rule", "_")][2], ) } -# Computed - Security group rules with "self", but without "cidr_blocks" and "source_security_group_id" -resource "aws_security_group_rule" "computed_ingress_with_self" { - count = local.create ? var.number_of_computed_ingress_with_self : 0 - - security_group_id = local.this_sg_id - type = "ingress" - - self = lookup(var.computed_ingress_with_self[count.index], "self", true) - prefix_list_ids = var.ingress_prefix_list_ids - description = lookup( - var.computed_ingress_with_self[count.index], - "description", - "Ingress Rule", - ) - - from_port = lookup( - var.computed_ingress_with_self[count.index], - "from_port", - var.rules[lookup(var.computed_ingress_with_self[count.index], "rule", "_")][0], - ) - to_port = lookup( - var.computed_ingress_with_self[count.index], - "to_port", - var.rules[lookup(var.computed_ingress_with_self[count.index], "rule", "_")][1], - ) - protocol = lookup( - var.computed_ingress_with_self[count.index], - "protocol", - var.rules[lookup(var.computed_ingress_with_self[count.index], "rule", "_")][2], - ) -} # Security group rules with "prefix_list_ids", but without "cidr_blocks", "self" or "source_security_group_id" resource "aws_security_group_rule" "ingress_with_prefix_list_ids" { - count = var.create ? length(var.ingress_with_prefix_list_ids) : 0 - - security_group_id = local.this_sg_id - type = "ingress" - - prefix_list_ids = compact(split( - ",", - lookup( - var.ingress_with_prefix_list_ids[count.index], - "prefix_list_ids", - join(",", var.ingress_prefix_list_ids) - ) - )) - - description = lookup( - var.ingress_with_prefix_list_ids[count.index], - "description", - "Ingress Rule", - ) - - from_port = lookup( - var.ingress_with_prefix_list_ids[count.index], - "from_port", - var.rules[lookup(var.ingress_with_prefix_list_ids[count.index], "rule", "_")][0], - ) - - to_port = lookup( - var.ingress_with_prefix_list_ids[count.index], - "to_port", - var.rules[lookup(var.ingress_with_prefix_list_ids[count.index], "rule", "_")][1], - ) - - protocol = lookup( - var.ingress_with_prefix_list_ids[count.index], - "protocol", - var.rules[lookup(var.ingress_with_prefix_list_ids[count.index], "rule", "_")][2], - ) -} - -# Computed - Security group rules with "prefix_list_ids", but without "cidr_blocks", "self" or "source_security_group_id" -resource "aws_security_group_rule" "computed_ingress_with_prefix_list_ids" { - count = var.create ? var.number_of_computed_ingress_with_prefix_list_ids : 0 + for_each = { + for ingress in var.ingress_with_prefix_list_ids : + "${lookup(ingress, "from_port", var.rules[lookup(ingress, "rule", "_")][0])}-${lookup(ingress, "to_port", var.rules[lookup(ingress, "rule", "_")][1])}-${lookup(ingress, "protocol", var.rules[lookup(ingress, "rule", "_")][2])}" => ingress + if local.create + } security_group_id = local.this_sg_id type = "ingress" @@ -492,27 +219,27 @@ resource "aws_security_group_rule" "computed_ingress_with_prefix_list_ids" { )) description = lookup( - var.ingress_with_prefix_list_ids[count.index], + each.value, "description", "Ingress Rule", ) from_port = lookup( - var.ingress_with_prefix_list_ids[count.index], + each.value, "from_port", - var.rules[lookup(var.ingress_with_prefix_list_ids[count.index], "rule", "_")][0], + var.rules[lookup(each.value, "rule", "_")][0], ) to_port = lookup( - var.ingress_with_prefix_list_ids[count.index], + each.value, "to_port", - var.rules[lookup(var.ingress_with_prefix_list_ids[count.index], "rule", "_")][1], + var.rules[lookup(each.value, "rule", "_")][1], ) protocol = lookup( - var.ingress_with_prefix_list_ids[count.index], + each.value, "protocol", - var.rules[lookup(var.ingress_with_prefix_list_ids[count.index], "rule", "_")][2], + var.rules[lookup(each.value, "rule", "_")][2], ) } @@ -525,7 +252,7 @@ resource "aws_security_group_rule" "computed_ingress_with_prefix_list_ids" { ################################## # Security group rules with "cidr_blocks" and it uses list of rules names resource "aws_security_group_rule" "egress_rules" { - count = local.create ? length(var.egress_rules) : 0 + for_each = local.create ? toset(var.ingress_rules) : toset([]) security_group_id = local.this_sg_id type = "egress" @@ -533,28 +260,11 @@ resource "aws_security_group_rule" "egress_rules" { cidr_blocks = var.egress_cidr_blocks ipv6_cidr_blocks = var.egress_ipv6_cidr_blocks prefix_list_ids = var.egress_prefix_list_ids - description = var.rules[var.egress_rules[count.index]][3] + description = var.rules[each.value][3] - from_port = var.rules[var.egress_rules[count.index]][0] - to_port = var.rules[var.egress_rules[count.index]][1] - protocol = var.rules[var.egress_rules[count.index]][2] -} - -# Computed - Security group rules with "cidr_blocks" and it uses list of rules names -resource "aws_security_group_rule" "computed_egress_rules" { - count = local.create ? var.number_of_computed_egress_rules : 0 - - security_group_id = local.this_sg_id - type = "egress" - - cidr_blocks = var.egress_cidr_blocks - ipv6_cidr_blocks = var.egress_ipv6_cidr_blocks - prefix_list_ids = var.egress_prefix_list_ids - description = var.rules[var.computed_egress_rules[count.index]][3] - - from_port = var.rules[var.computed_egress_rules[count.index]][0] - to_port = var.rules[var.computed_egress_rules[count.index]][1] - protocol = var.rules[var.computed_egress_rules[count.index]][2] + from_port = var.rules[each.value][0] + to_port = var.rules[each.value][1] + protocol = var.rules[each.value][2] } ######################### @@ -562,86 +272,49 @@ resource "aws_security_group_rule" "computed_egress_rules" { ######################### # Security group rules with "source_security_group_id", but without "cidr_blocks" and "self" resource "aws_security_group_rule" "egress_with_source_security_group_id" { - count = local.create ? length(var.egress_with_source_security_group_id) : 0 + for_each = { + for egress in var.egress_with_source_security_group_id : + "${lookup(egress, "from_port", var.rules[lookup(egress, "rule", "_")][0])}-${lookup(egress, "to_port", var.rules[lookup(egress, "rule", "_")][1])}-${lookup(egress, "protocol", var.rules[lookup(egress, "rule", "_")][2])}" => egress + if local.create + } security_group_id = local.this_sg_id type = "egress" - source_security_group_id = var.egress_with_source_security_group_id[count.index]["source_security_group_id"] - prefix_list_ids = var.egress_prefix_list_ids - description = lookup( - var.egress_with_source_security_group_id[count.index], - "description", - "Egress Rule", - ) - - from_port = lookup( - var.egress_with_source_security_group_id[count.index], - "from_port", - var.rules[lookup( - var.egress_with_source_security_group_id[count.index], - "rule", - "_", - )][0], + source_security_group_id = lookup( + each.value, + "source_security_group_id" ) - to_port = lookup( - var.egress_with_source_security_group_id[count.index], - "to_port", - var.rules[lookup( - var.egress_with_source_security_group_id[count.index], - "rule", - "_", - )][1], - ) - protocol = lookup( - var.egress_with_source_security_group_id[count.index], - "protocol", - var.rules[lookup( - var.egress_with_source_security_group_id[count.index], - "rule", - "_", - )][2], - ) -} - -# Computed - Security group rules with "source_security_group_id", but without "cidr_blocks" and "self" -resource "aws_security_group_rule" "computed_egress_with_source_security_group_id" { - count = local.create ? var.number_of_computed_egress_with_source_security_group_id : 0 - - security_group_id = local.this_sg_id - type = "egress" - - source_security_group_id = var.computed_egress_with_source_security_group_id[count.index]["source_security_group_id"] - prefix_list_ids = var.egress_prefix_list_ids + prefix_list_ids = var.egress_prefix_list_ids description = lookup( - var.computed_egress_with_source_security_group_id[count.index], + each.value, "description", "Egress Rule", ) from_port = lookup( - var.computed_egress_with_source_security_group_id[count.index], + each.value, "from_port", var.rules[lookup( - var.computed_egress_with_source_security_group_id[count.index], + each.value, "rule", "_", )][0], ) to_port = lookup( - var.computed_egress_with_source_security_group_id[count.index], + each.value, "to_port", var.rules[lookup( - var.computed_egress_with_source_security_group_id[count.index], + each.value, "rule", "_", )][1], ) protocol = lookup( - var.computed_egress_with_source_security_group_id[count.index], + each.value, "protocol", var.rules[lookup( - var.computed_egress_with_source_security_group_id[count.index], + each.value, "rule", "_", )][2], @@ -650,48 +323,11 @@ resource "aws_security_group_rule" "computed_egress_with_source_security_group_i # Security group rules with "cidr_blocks", but without "ipv6_cidr_blocks", "source_security_group_id" and "self" resource "aws_security_group_rule" "egress_with_cidr_blocks" { - count = local.create ? length(var.egress_with_cidr_blocks) : 0 - - security_group_id = local.this_sg_id - type = "egress" - - cidr_blocks = compact(split( - ",", - lookup( - var.egress_with_cidr_blocks[count.index], - "cidr_blocks", - join(",", var.egress_cidr_blocks), - ), - )) - - description = lookup( - var.egress_with_cidr_blocks[count.index], - "description", - "Egress Rule", - ) - - from_port = lookup( - var.egress_with_cidr_blocks[count.index], - "from_port", - var.rules[lookup(var.egress_with_cidr_blocks[count.index], "rule", "_")][0], - ) - - to_port = lookup( - var.egress_with_cidr_blocks[count.index], - "to_port", - var.rules[lookup(var.egress_with_cidr_blocks[count.index], "rule", "_")][1], - ) - - protocol = lookup( - var.egress_with_cidr_blocks[count.index], - "protocol", - var.rules[lookup(var.egress_with_cidr_blocks[count.index], "rule", "_")][2], - ) -} - -# Computed - Security group rules with "cidr_blocks", but without "ipv6_cidr_blocks", "source_security_group_id" and "self" -resource "aws_security_group_rule" "computed_egress_with_cidr_blocks" { - count = local.create ? var.number_of_computed_egress_with_cidr_blocks : 0 + for_each = { + for egress in var.egress_with_cidr_blocks : + "${lookup(egress, "from_port", var.rules[lookup(egress, "rule", "_")][0])}-${lookup(egress, "to_port", var.rules[lookup(egress, "rule", "_")][1])}-${lookup(egress, "protocol", var.rules[lookup(egress, "rule", "_")][2])}" => egress + if local.create + } security_group_id = local.this_sg_id type = "egress" @@ -699,206 +335,86 @@ resource "aws_security_group_rule" "computed_egress_with_cidr_blocks" { cidr_blocks = compact(split( ",", lookup( - var.computed_egress_with_cidr_blocks[count.index], + each.value, "cidr_blocks", join(",", var.egress_cidr_blocks), ), )) - - description = lookup( - var.computed_egress_with_cidr_blocks[count.index], - "description", - "Egress Rule", - ) - - from_port = lookup( - var.computed_egress_with_cidr_blocks[count.index], - "from_port", - var.rules[lookup( - var.computed_egress_with_cidr_blocks[count.index], - "rule", - "_", - )][0], - ) - - to_port = lookup( - var.computed_egress_with_cidr_blocks[count.index], - "to_port", - var.rules[lookup( - var.computed_egress_with_cidr_blocks[count.index], - "rule", - "_", - )][1], - ) - - protocol = lookup( - var.computed_egress_with_cidr_blocks[count.index], - "protocol", - var.rules[lookup( - var.computed_egress_with_cidr_blocks[count.index], - "rule", - "_", - )][2], - ) -} - -# Security group rules with "ipv6_cidr_blocks", but without "cidr_blocks", "source_security_group_id" and "self" -resource "aws_security_group_rule" "egress_with_ipv6_cidr_blocks" { - count = local.create ? length(var.egress_with_ipv6_cidr_blocks) : 0 - - security_group_id = local.this_sg_id - type = "egress" - - ipv6_cidr_blocks = compact(split( - ",", - lookup( - var.egress_with_ipv6_cidr_blocks[count.index], - "ipv6_cidr_blocks", - join(",", var.egress_ipv6_cidr_blocks), - ), - )) - prefix_list_ids = var.egress_prefix_list_ids - description = lookup( - var.egress_with_ipv6_cidr_blocks[count.index], - "description", - "Egress Rule", - ) - - from_port = lookup( - var.egress_with_ipv6_cidr_blocks[count.index], - "from_port", - var.rules[lookup(var.egress_with_ipv6_cidr_blocks[count.index], "rule", "_")][0], - ) - to_port = lookup( - var.egress_with_ipv6_cidr_blocks[count.index], - "to_port", - var.rules[lookup(var.egress_with_ipv6_cidr_blocks[count.index], "rule", "_")][1], - ) - protocol = lookup( - var.egress_with_ipv6_cidr_blocks[count.index], - "protocol", - var.rules[lookup(var.egress_with_ipv6_cidr_blocks[count.index], "rule", "_")][2], - ) -} - -# Computed - Security group rules with "ipv6_cidr_blocks", but without "cidr_blocks", "source_security_group_id" and "self" -resource "aws_security_group_rule" "computed_egress_with_ipv6_cidr_blocks" { - count = local.create ? var.number_of_computed_egress_with_ipv6_cidr_blocks : 0 - - security_group_id = local.this_sg_id - type = "egress" - ipv6_cidr_blocks = compact(split( ",", lookup( - var.computed_egress_with_ipv6_cidr_blocks[count.index], + each.value, "ipv6_cidr_blocks", join(",", var.egress_ipv6_cidr_blocks), ), )) prefix_list_ids = var.egress_prefix_list_ids description = lookup( - var.computed_egress_with_ipv6_cidr_blocks[count.index], + each.value, "description", "Egress Rule", ) from_port = lookup( - var.computed_egress_with_ipv6_cidr_blocks[count.index], + each.value, "from_port", - var.rules[lookup( - var.computed_egress_with_ipv6_cidr_blocks[count.index], - "rule", - "_", - )][0], + var.rules[lookup(each.value, "rule", "_")][0], ) to_port = lookup( - var.computed_egress_with_ipv6_cidr_blocks[count.index], + each.value, "to_port", - var.rules[lookup( - var.computed_egress_with_ipv6_cidr_blocks[count.index], - "rule", - "_", - )][1], + var.rules[lookup(each.value, "rule", "_")][1], ) protocol = lookup( - var.computed_egress_with_ipv6_cidr_blocks[count.index], + each.value, "protocol", - var.rules[lookup( - var.computed_egress_with_ipv6_cidr_blocks[count.index], - "rule", - "_", - )][2], + var.rules[lookup(each.value, "rule", "_")][2], ) } # Security group rules with "self", but without "cidr_blocks" and "source_security_group_id" resource "aws_security_group_rule" "egress_with_self" { - count = local.create ? length(var.egress_with_self) : 0 - - security_group_id = local.this_sg_id - type = "egress" - - self = lookup(var.egress_with_self[count.index], "self", true) - prefix_list_ids = var.egress_prefix_list_ids - description = lookup( - var.egress_with_self[count.index], - "description", - "Egress Rule", - ) - - from_port = lookup( - var.egress_with_self[count.index], - "from_port", - var.rules[lookup(var.egress_with_self[count.index], "rule", "_")][0], - ) - to_port = lookup( - var.egress_with_self[count.index], - "to_port", - var.rules[lookup(var.egress_with_self[count.index], "rule", "_")][1], - ) - protocol = lookup( - var.egress_with_self[count.index], - "protocol", - var.rules[lookup(var.egress_with_self[count.index], "rule", "_")][2], - ) -} - -# Computed - Security group rules with "self", but without "cidr_blocks" and "source_security_group_id" -resource "aws_security_group_rule" "computed_egress_with_self" { - count = local.create ? var.number_of_computed_egress_with_self : 0 + for_each = { + for egress in var.egress_with_self : + "${lookup(egress, "from_port", var.rules[lookup(egress, "rule", "_")][0])}-${lookup(egress, "to_port", var.rules[lookup(egress, "rule", "_")][1])}-${lookup(egress, "protocol", var.rules[lookup(egress, "rule", "_")][2])}" => egress + if local.create + } security_group_id = local.this_sg_id type = "egress" - self = lookup(var.computed_egress_with_self[count.index], "self", true) + self = lookup(each.value, "self", true) prefix_list_ids = var.egress_prefix_list_ids description = lookup( - var.computed_egress_with_self[count.index], + each.value, "description", "Egress Rule", ) from_port = lookup( - var.computed_egress_with_self[count.index], + each.value, "from_port", - var.rules[lookup(var.computed_egress_with_self[count.index], "rule", "_")][0], + var.rules[lookup(each.value, "rule", "_")][0], ) to_port = lookup( - var.computed_egress_with_self[count.index], + each.value, "to_port", - var.rules[lookup(var.computed_egress_with_self[count.index], "rule", "_")][1], + var.rules[lookup(each.value, "rule", "_")][1], ) protocol = lookup( - var.computed_egress_with_self[count.index], + each.value, "protocol", - var.rules[lookup(var.computed_egress_with_self[count.index], "rule", "_")][2], + var.rules[lookup(each.value, "rule", "_")][2], ) } # Security group rules with "egress_prefix_list_ids", but without "cidr_blocks", "self" or "source_security_group_id" resource "aws_security_group_rule" "egress_with_prefix_list_ids" { - count = var.create ? length(var.egress_with_prefix_list_ids) : 0 + for_each = { + for egress in var.egress_with_prefix_list_ids : + "${lookup(egress, "from_port", var.rules[lookup(egress, "rule", "_")][0])}-${lookup(egress, "to_port", var.rules[lookup(egress, "rule", "_")][1])}-${lookup(egress, "protocol", var.rules[lookup(egress, "rule", "_")][2])}" => egress + if local.create + } security_group_id = local.this_sg_id type = "egress" @@ -913,91 +429,36 @@ resource "aws_security_group_rule" "egress_with_prefix_list_ids" { ) description = lookup( - var.egress_with_prefix_list_ids[count.index], - "description", - "Egress Rule", - ) - - from_port = lookup( - var.egress_with_prefix_list_ids[count.index], - "from_port", - var.rules[lookup( - var.egress_with_prefix_list_ids[count.index], - "rule", - "_", - )][0], - ) - - to_port = lookup( - var.egress_with_prefix_list_ids[count.index], - "to_port", - var.rules[lookup( - var.egress_with_prefix_list_ids[count.index], - "rule", - "_", - )][1], - ) - - protocol = lookup( - var.egress_with_prefix_list_ids[count.index], - "protocol", - var.rules[lookup( - var.egress_with_prefix_list_ids[count.index], - "rule", - "_", - )][2], - ) -} - -# Computed - Security group rules with "source_security_group_id", but without "cidr_blocks", "self" or "source_security_group_id" -resource "aws_security_group_rule" "computed_egress_with_prefix_list_ids" { - count = var.create ? var.number_of_computed_egress_with_prefix_list_ids : 0 - - security_group_id = local.this_sg_id - type = "egress" - - source_security_group_id = var.computed_egress_with_prefix_list_ids[count.index]["source_security_group_id"] - - prefix_list_ids = compact(split( - ",", - lookup( - var.computed_egress_with_prefix_list_ids[count.index], - "prefix_list_ids", - join(",", var.egress_prefix_list_ids) - ) - )) - - description = lookup( - var.computed_egress_with_prefix_list_ids[count.index], + each.value, "description", "Egress Rule", ) from_port = lookup( - var.computed_egress_with_prefix_list_ids[count.index], + each.value, "from_port", var.rules[lookup( - var.computed_egress_with_prefix_list_ids[count.index], + each.value, "rule", "_", )][0], ) to_port = lookup( - var.computed_egress_with_prefix_list_ids[count.index], + each.value, "to_port", var.rules[lookup( - var.computed_egress_with_prefix_list_ids[count.index], + each.value, "rule", "_", )][1], ) protocol = lookup( - var.computed_egress_with_prefix_list_ids[count.index], + each.value, "protocol", var.rules[lookup( - var.computed_egress_with_prefix_list_ids[count.index], + each.value, "rule", "_", )][2], diff --git a/modules/_templates/main.tf b/modules/_templates/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/_templates/main.tf +++ b/modules/_templates/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/_templates/variables.tf b/modules/_templates/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/_templates/variables.tf +++ b/modules/_templates/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/_templates/versions.tf b/modules/_templates/versions.tf index c4f23b0..6edb421 100644 --- a/modules/_templates/versions.tf +++ b/modules/_templates/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/activemq/README.md b/modules/activemq/README.md index f82c302..934a3e6 100644 --- a/modules/activemq/README.md +++ b/modules/activemq/README.md @@ -5,7 +5,7 @@ ```hcl module "activemq_security_group" { source = "terraform-aws-modules/security-group/aws//modules/activemq" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **activemq module** is using are available [here](https://g | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"_": [
"",
"",
""
],
"activemq-5671-tcp": [
5671,
5671,
"tcp",
"ActiveMQ AMQP"
],
"activemq-61614-tcp": [
61614,
61614,
"tcp",
"ActiveMQ STOMP"
],
"activemq-61617-tcp": [
61617,
61617,
"tcp",
"ActiveMQ OpenWire"
],
"activemq-61619-tcp": [
61619,
61619,
"tcp",
"ActiveMQ WebSocket"
],
"activemq-8883-tcp": [
8883,
8883,
"tcp",
"ActiveMQ MQTT"
],
"alertmanager-9093-tcp": [
9093,
9093,
"tcp",
"Alert Manager"
],
"alertmanager-9094-tcp": [
9094,
9094,
"tcp",
"Alert Manager Cluster"
],
"all-all": [
-1,
-1,
"-1",
"All protocols"
],
"all-icmp": [
-1,
-1,
"icmp",
"All IPV4 ICMP"
],
"all-ipv6-icmp": [
-1,
-1,
58,
"All IPV6 ICMP"
],
"all-tcp": [
0,
65535,
"tcp",
"All TCP ports"
],
"all-udp": [
0,
65535,
"udp",
"All UDP ports"
],
"carbon-admin-tcp": [
2004,
2004,
"tcp",
"Carbon admin"
],
"carbon-gui-udp": [
8081,
8081,
"tcp",
"Carbon GUI"
],
"carbon-line-in-tcp": [
2003,
2003,
"tcp",
"Carbon line-in"
],
"carbon-line-in-udp": [
2003,
2003,
"udp",
"Carbon line-in"
],
"carbon-pickle-tcp": [
2013,
2013,
"tcp",
"Carbon pickle"
],
"carbon-pickle-udp": [
2013,
2013,
"udp",
"Carbon pickle"
],
"cassandra-clients-tcp": [
9042,
9042,
"tcp",
"Cassandra clients"
],
"cassandra-jmx-tcp": [
7199,
7199,
"tcp",
"JMX"
],
"cassandra-thrift-clients-tcp": [
9160,
9160,
"tcp",
"Cassandra Thrift clients"
],
"consul-dns-tcp": [
8600,
8600,
"tcp",
"Consul DNS"
],
"consul-dns-udp": [
8600,
8600,
"udp",
"Consul DNS"
],
"consul-grpc-tcp": [
8502,
8502,
"tcp",
"Consul gRPC"
],
"consul-grpc-tcp-tls": [
8503,
8503,
"tcp",
"Consul gRPC TLS"
],
"consul-serf-lan-tcp": [
8301,
8301,
"tcp",
"Serf LAN"
],
"consul-serf-lan-udp": [
8301,
8301,
"udp",
"Serf LAN"
],
"consul-serf-wan-tcp": [
8302,
8302,
"tcp",
"Serf WAN"
],
"consul-serf-wan-udp": [
8302,
8302,
"udp",
"Serf WAN"
],
"consul-tcp": [
8300,
8300,
"tcp",
"Consul server"
],
"consul-webui-http-tcp": [
8500,
8500,
"tcp",
"Consul web UI HTTP"
],
"consul-webui-https-tcp": [
8501,
8501,
"tcp",
"Consul web UI HTTPS"
],
"dax-cluster-encrypted-tcp": [
9111,
9111,
"tcp",
"DAX Cluster encrypted"
],
"dax-cluster-unencrypted-tcp": [
8111,
8111,
"tcp",
"DAX Cluster unencrypted"
],
"dns-tcp": [
53,
53,
"tcp",
"DNS"
],
"dns-udp": [
53,
53,
"udp",
"DNS"
],
"docker-swarm-mngmt-tcp": [
2377,
2377,
"tcp",
"Docker Swarm cluster management"
],
"docker-swarm-node-tcp": [
7946,
7946,
"tcp",
"Docker Swarm node"
],
"docker-swarm-node-udp": [
7946,
7946,
"udp",
"Docker Swarm node"
],
"docker-swarm-overlay-udp": [
4789,
4789,
"udp",
"Docker Swarm Overlay Network Traffic"
],
"elasticsearch-java-tcp": [
9300,
9300,
"tcp",
"Elasticsearch Java interface"
],
"elasticsearch-rest-tcp": [
9200,
9200,
"tcp",
"Elasticsearch REST interface"
],
"etcd-client-tcp": [
2379,
2379,
"tcp",
"Etcd Client"
],
"etcd-peer-tcp": [
2380,
2380,
"tcp",
"Etcd Peer"
],
"grafana-tcp": [
3000,
3000,
"tcp",
"Grafana Dashboard"
],
"graphite-2003-tcp": [
2003,
2003,
"tcp",
"Carbon receiver plain text"
],
"graphite-2004-tcp": [
2004,
2004,
"tcp",
"Carbon receiver pickle"
],
"graphite-2023-tcp": [
2023,
2023,
"tcp",
"Carbon aggregator plaintext"
],
"graphite-2024-tcp": [
2024,
2024,
"tcp",
"Carbon aggregator pickle"
],
"graphite-8080-tcp": [
8080,
8080,
"tcp",
"Graphite gunicorn port"
],
"graphite-8125-tcp": [
8125,
8125,
"tcp",
"Statsd TCP"
],
"graphite-8125-udp": [
8125,
8125,
"udp",
"Statsd UDP default"
],
"graphite-8126-tcp": [
8126,
8126,
"tcp",
"Statsd admin"
],
"graphite-webui": [
80,
80,
"tcp",
"Graphite admin interface"
],
"http-80-tcp": [
80,
80,
"tcp",
"HTTP"
],
"http-8080-tcp": [
8080,
8080,
"tcp",
"HTTP"
],
"https-443-tcp": [
443,
443,
"tcp",
"HTTPS"
],
"https-8443-tcp": [
8443,
8443,
"tcp",
"HTTPS"
],
"ipsec-4500-udp": [
4500,
4500,
"udp",
"IPSEC NAT-T"
],
"ipsec-500-udp": [
500,
500,
"udp",
"IPSEC ISAKMP"
],
"kafka-broker-sasl-iam-public-tcp": [
9198,
9198,
"tcp",
"Kafka SASL/IAM Public access control enabled (MSK specific)"
],
"kafka-broker-sasl-iam-tcp": [
9098,
9098,
"tcp",
"Kafka SASL/IAM access control enabled (MSK specific)"
],
"kafka-broker-sasl-scram-public-tcp": [
9196,
9196,
"tcp",
"Kafka SASL/SCRAM Public enabled broker (MSK specific)"
],
"kafka-broker-sasl-scram-tcp": [
9096,
9096,
"tcp",
"Kafka SASL/SCRAM enabled broker (MSK specific)"
],
"kafka-broker-tcp": [
9092,
9092,
"tcp",
"Kafka PLAINTEXT enable broker 0.8.2+"
],
"kafka-broker-tls-public-tcp": [
9194,
9194,
"tcp",
"Kafka TLS Public enabled broker 0.8.2+ (MSK specific)"
],
"kafka-broker-tls-tcp": [
9094,
9094,
"tcp",
"Kafka TLS enabled broker 0.8.2+"
],
"kafka-jmx-exporter-tcp": [
11001,
11001,
"tcp",
"Kafka JMX Exporter"
],
"kafka-node-exporter-tcp": [
11002,
11002,
"tcp",
"Kafka Node Exporter"
],
"kibana-tcp": [
5601,
5601,
"tcp",
"Kibana Web Interface"
],
"kubernetes-api-tcp": [
6443,
6443,
"tcp",
"Kubernetes API Server"
],
"ldap-tcp": [
389,
389,
"tcp",
"LDAP"
],
"ldaps-tcp": [
636,
636,
"tcp",
"LDAPS"
],
"logstash-tcp": [
5044,
5044,
"tcp",
"Logstash"
],
"loki-grafana": [
3100,
3100,
"tcp",
"Grafana Loki endpoint"
],
"loki-grafana-grpc": [
9095,
9095,
"tcp",
"Grafana Loki GRPC"
],
"memcached-tcp": [
11211,
11211,
"tcp",
"Memcached"
],
"minio-tcp": [
9000,
9000,
"tcp",
"MinIO"
],
"mongodb-27017-tcp": [
27017,
27017,
"tcp",
"MongoDB"
],
"mongodb-27018-tcp": [
27018,
27018,
"tcp",
"MongoDB shard"
],
"mongodb-27019-tcp": [
27019,
27019,
"tcp",
"MongoDB config server"
],
"mssql-analytics-tcp": [
2383,
2383,
"tcp",
"MSSQL Analytics"
],
"mssql-broker-tcp": [
4022,
4022,
"tcp",
"MSSQL Broker"
],
"mssql-tcp": [
1433,
1433,
"tcp",
"MSSQL Server"
],
"mssql-udp": [
1434,
1434,
"udp",
"MSSQL Browser"
],
"mysql-tcp": [
3306,
3306,
"tcp",
"MySQL/Aurora"
],
"nfs-tcp": [
2049,
2049,
"tcp",
"NFS/EFS"
],
"nomad-http-tcp": [
4646,
4646,
"tcp",
"Nomad HTTP"
],
"nomad-rpc-tcp": [
4647,
4647,
"tcp",
"Nomad RPC"
],
"nomad-serf-tcp": [
4648,
4648,
"tcp",
"Serf"
],
"nomad-serf-udp": [
4648,
4648,
"udp",
"Serf"
],
"ntp-udp": [
123,
123,
"udp",
"NTP"
],
"octopus-tentacle-tcp": [
10933,
10933,
"tcp",
"Octopus Tentacle"
],
"openvpn-https-tcp": [
443,
443,
"tcp",
"OpenVPN"
],
"openvpn-tcp": [
943,
943,
"tcp",
"OpenVPN"
],
"openvpn-udp": [
1194,
1194,
"udp",
"OpenVPN"
],
"oracle-db-tcp": [
1521,
1521,
"tcp",
"Oracle"
],
"postgresql-tcp": [
5432,
5432,
"tcp",
"PostgreSQL"
],
"prometheus-http-tcp": [
9090,
9090,
"tcp",
"Prometheus"
],
"prometheus-node-exporter-http-tcp": [
9100,
9100,
"tcp",
"Prometheus Node Exporter"
],
"prometheus-pushgateway-http-tcp": [
9091,
9091,
"tcp",
"Prometheus Pushgateway"
],
"promtail-http": [
9080,
9080,
"tcp",
"Promtail endpoint"
],
"puppet-tcp": [
8140,
8140,
"tcp",
"Puppet"
],
"puppetdb-tcp": [
8081,
8081,
"tcp",
"PuppetDB"
],
"rabbitmq-15672-tcp": [
15672,
15672,
"tcp",
"RabbitMQ"
],
"rabbitmq-25672-tcp": [
25672,
25672,
"tcp",
"RabbitMQ"
],
"rabbitmq-4369-tcp": [
4369,
4369,
"tcp",
"RabbitMQ epmd"
],
"rabbitmq-5671-tcp": [
5671,
5671,
"tcp",
"RabbitMQ"
],
"rabbitmq-5672-tcp": [
5672,
5672,
"tcp",
"RabbitMQ"
],
"rdp-tcp": [
3389,
3389,
"tcp",
"Remote Desktop"
],
"rdp-udp": [
3389,
3389,
"udp",
"Remote Desktop"
],
"redis-tcp": [
6379,
6379,
"tcp",
"Redis"
],
"redshift-tcp": [
5439,
5439,
"tcp",
"Redshift"
],
"saltstack-tcp": [
4505,
4506,
"tcp",
"SaltStack"
],
"smtp-submission-2587-tcp": [
2587,
2587,
"tcp",
"SMTP Submission"
],
"smtp-submission-587-tcp": [
587,
587,
"tcp",
"SMTP Submission"
],
"smtp-tcp": [
25,
25,
"tcp",
"SMTP"
],
"smtps-2456-tcp": [
2465,
2465,
"tcp",
"SMTPS"
],
"smtps-465-tcp": [
465,
465,
"tcp",
"SMTPS"
],
"solr-tcp": [
8983,
8987,
"tcp",
"Solr"
],
"splunk-hec-tcp": [
8088,
8088,
"tcp",
"Splunk HEC"
],
"splunk-indexer-tcp": [
9997,
9997,
"tcp",
"Splunk indexer"
],
"splunk-splunkd-tcp": [
8089,
8089,
"tcp",
"Splunkd"
],
"splunk-web-tcp": [
8000,
8000,
"tcp",
"Splunk Web"
],
"squid-proxy-tcp": [
3128,
3128,
"tcp",
"Squid default proxy"
],
"ssh-tcp": [
22,
22,
"tcp",
"SSH"
],
"storm-nimbus-tcp": [
6627,
6627,
"tcp",
"Nimbus"
],
"storm-supervisor-tcp": [
6700,
6703,
"tcp",
"Supervisor"
],
"storm-ui-tcp": [
8080,
8080,
"tcp",
"Storm UI"
],
"vault-tcp": [
8200,
8200,
"tcp",
"Vault"
],
"wazuh-dashboard": [
443,
443,
"tcp",
"Wazuh web user interface"
],
"wazuh-indexer-restful-api": [
9200,
9200,
"tcp",
"Wazuh indexer RESTful API"
],
"wazuh-server-agent-cluster-daemon": [
1516,
1516,
"tcp",
"Wazuh cluster daemon"
],
"wazuh-server-agent-connection-tcp": [
1514,
1514,
"tcp",
"Agent connection service(TCP)"
],
"wazuh-server-agent-connection-udp": [
1514,
1514,
"udp",
"Agent connection service(UDP)"
],
"wazuh-server-agent-enrollment": [
1515,
1515,
"tcp",
"Agent enrollment service"
],
"wazuh-server-restful-api": [
55000,
55000,
"tcp",
"Wazuh server RESTful API"
],
"wazuh-server-syslog-collector-tcp": [
514,
514,
"tcp",
"Wazuh Syslog collector(TCP)"
],
"wazuh-server-syslog-collector-udp": [
514,
514,
"udp",
"Wazuh Syslog collector(UDP)"
],
"web-jmx-tcp": [
1099,
1099,
"tcp",
"JMX"
],
"winrm-http-tcp": [
5985,
5985,
"tcp",
"WinRM HTTP"
],
"winrm-https-tcp": [
5986,
5986,
"tcp",
"WinRM HTTPS"
],
"zabbix-agent": [
10050,
10050,
"tcp",
"Zabbix Agent"
],
"zabbix-proxy": [
10051,
10051,
"tcp",
"Zabbix Proxy"
],
"zabbix-server": [
10051,
10051,
"tcp",
"Zabbix Server"
],
"zipkin-admin-query-tcp": [
9901,
9901,
"tcp",
"Zipkin Admin port query"
],
"zipkin-admin-tcp": [
9990,
9990,
"tcp",
"Zipkin Admin port collector"
],
"zipkin-admin-web-tcp": [
9991,
9991,
"tcp",
"Zipkin Admin port web"
],
"zipkin-query-tcp": [
9411,
9411,
"tcp",
"Zipkin query port"
],
"zipkin-web-tcp": [
8080,
8080,
"tcp",
"Zipkin web port"
],
"zookeeper-2181-tcp": [
2181,
2181,
"tcp",
"Zookeeper"
],
"zookeeper-2182-tls-tcp": [
2182,
2182,
"tcp",
"Zookeeper TLS (MSK specific)"
],
"zookeeper-2888-tcp": [
2888,
2888,
"tcp",
"Zookeeper"
],
"zookeeper-3888-tcp": [
3888,
3888,
"tcp",
"Zookeeper"
],
"zookeeper-jmx-tcp": [
7199,
7199,
"tcp",
"JMX"
]
}
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"activemq-5671-tcp",
"activemq-8883-tcp",
"activemq-61614-tcp",
"activemq-61617-tcp",
"activemq-61619-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/activemq/auto_values.tf b/modules/activemq/auto_values.tf index f125c23..d986f87 100644 --- a/modules/activemq/auto_values.tf +++ b/modules/activemq/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/activemq/main.tf b/modules/activemq/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/activemq/main.tf +++ b/modules/activemq/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/activemq/variables.tf b/modules/activemq/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/activemq/variables.tf +++ b/modules/activemq/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/activemq/versions.tf b/modules/activemq/versions.tf index c4f23b0..6edb421 100644 --- a/modules/activemq/versions.tf +++ b/modules/activemq/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/alertmanager/README.md b/modules/alertmanager/README.md index 4a37c34..0e9c444 100644 --- a/modules/alertmanager/README.md +++ b/modules/alertmanager/README.md @@ -5,7 +5,7 @@ ```hcl module "alertmanager_security_group" { source = "terraform-aws-modules/security-group/aws//modules/alertmanager" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **alertmanager module** is using are available [here](https | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"alertmanager-9093-tcp",
"alertmanager-9094-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/alertmanager/auto_values.tf b/modules/alertmanager/auto_values.tf index f73768c..cdf95f9 100644 --- a/modules/alertmanager/auto_values.tf +++ b/modules/alertmanager/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/alertmanager/main.tf b/modules/alertmanager/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/alertmanager/main.tf +++ b/modules/alertmanager/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/alertmanager/variables.tf b/modules/alertmanager/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/alertmanager/variables.tf +++ b/modules/alertmanager/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/alertmanager/versions.tf b/modules/alertmanager/versions.tf index c4f23b0..6edb421 100644 --- a/modules/alertmanager/versions.tf +++ b/modules/alertmanager/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/carbon-relay-ng/README.md b/modules/carbon-relay-ng/README.md index 6e6fb9f..3edad03 100644 --- a/modules/carbon-relay-ng/README.md +++ b/modules/carbon-relay-ng/README.md @@ -5,7 +5,7 @@ ```hcl module "carbon_relay-ng_security_group" { source = "terraform-aws-modules/security-group/aws//modules/carbon-relay-ng" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **carbon-relay-ng module** is using are available [here](ht | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"carbon-line-in-tcp",
"carbon-line-in-udp",
"carbon-pickle-tcp",
"carbon-pickle-udp",
"carbon-gui-udp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/carbon-relay-ng/auto_values.tf b/modules/carbon-relay-ng/auto_values.tf index 6d04463..6cc98b7 100644 --- a/modules/carbon-relay-ng/auto_values.tf +++ b/modules/carbon-relay-ng/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/carbon-relay-ng/main.tf b/modules/carbon-relay-ng/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/carbon-relay-ng/main.tf +++ b/modules/carbon-relay-ng/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/carbon-relay-ng/variables.tf b/modules/carbon-relay-ng/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/carbon-relay-ng/variables.tf +++ b/modules/carbon-relay-ng/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/carbon-relay-ng/versions.tf b/modules/carbon-relay-ng/versions.tf index c4f23b0..6edb421 100644 --- a/modules/carbon-relay-ng/versions.tf +++ b/modules/carbon-relay-ng/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/cassandra/README.md b/modules/cassandra/README.md index dfdd4a0..b91aaac 100644 --- a/modules/cassandra/README.md +++ b/modules/cassandra/README.md @@ -5,7 +5,7 @@ ```hcl module "cassandra_security_group" { source = "terraform-aws-modules/security-group/aws//modules/cassandra" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **cassandra module** is using are available [here](https:// | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"cassandra-clients-tcp",
"cassandra-thrift-clients-tcp",
"cassandra-jmx-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/cassandra/auto_values.tf b/modules/cassandra/auto_values.tf index cf41218..2d9e348 100644 --- a/modules/cassandra/auto_values.tf +++ b/modules/cassandra/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/cassandra/main.tf b/modules/cassandra/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/cassandra/main.tf +++ b/modules/cassandra/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/cassandra/variables.tf b/modules/cassandra/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/cassandra/variables.tf +++ b/modules/cassandra/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/cassandra/versions.tf b/modules/cassandra/versions.tf index c4f23b0..6edb421 100644 --- a/modules/cassandra/versions.tf +++ b/modules/cassandra/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/consul/README.md b/modules/consul/README.md index 1368f76..36153ea 100644 --- a/modules/consul/README.md +++ b/modules/consul/README.md @@ -5,7 +5,7 @@ ```hcl module "consul_security_group" { source = "terraform-aws-modules/security-group/aws//modules/consul" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **consul module** is using are available [here](https://git | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"consul-tcp",
"consul-grpc-tcp",
"consul-grpc-tcp-tls",
"consul-webui-http-tcp",
"consul-webui-https-tcp",
"consul-dns-tcp",
"consul-dns-udp",
"consul-serf-lan-tcp",
"consul-serf-lan-udp",
"consul-serf-wan-tcp",
"consul-serf-wan-udp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/consul/auto_values.tf b/modules/consul/auto_values.tf index 80a1cbe..158c038 100644 --- a/modules/consul/auto_values.tf +++ b/modules/consul/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/consul/main.tf b/modules/consul/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/consul/main.tf +++ b/modules/consul/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/consul/variables.tf b/modules/consul/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/consul/variables.tf +++ b/modules/consul/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/consul/versions.tf b/modules/consul/versions.tf index c4f23b0..6edb421 100644 --- a/modules/consul/versions.tf +++ b/modules/consul/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/dax-cluster/README.md b/modules/dax-cluster/README.md index 6ead1ce..9275e7a 100644 --- a/modules/dax-cluster/README.md +++ b/modules/dax-cluster/README.md @@ -5,7 +5,7 @@ ```hcl module "dax_cluster_security_group" { source = "terraform-aws-modules/security-group/aws//modules/dax-cluster" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **dax-cluster module** is using are available [here](https: | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"dax-cluster-unencrypted-tcp",
"dax-cluster-encrypted-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/dax-cluster/auto_values.tf b/modules/dax-cluster/auto_values.tf index 06b918c..3e8cc9f 100644 --- a/modules/dax-cluster/auto_values.tf +++ b/modules/dax-cluster/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/dax-cluster/main.tf b/modules/dax-cluster/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/dax-cluster/main.tf +++ b/modules/dax-cluster/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/dax-cluster/variables.tf b/modules/dax-cluster/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/dax-cluster/variables.tf +++ b/modules/dax-cluster/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/dax-cluster/versions.tf b/modules/dax-cluster/versions.tf index c4f23b0..6edb421 100644 --- a/modules/dax-cluster/versions.tf +++ b/modules/dax-cluster/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/docker-swarm/README.md b/modules/docker-swarm/README.md index 9a68ac7..5834e2d 100644 --- a/modules/docker-swarm/README.md +++ b/modules/docker-swarm/README.md @@ -5,7 +5,7 @@ ```hcl module "docker_swarm_security_group" { source = "terraform-aws-modules/security-group/aws//modules/docker-swarm" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **docker-swarm module** is using are available [here](https | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"docker-swarm-mngmt-tcp",
"docker-swarm-node-tcp",
"docker-swarm-node-udp",
"docker-swarm-overlay-udp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/docker-swarm/auto_values.tf b/modules/docker-swarm/auto_values.tf index eedae24..4fe8a2f 100644 --- a/modules/docker-swarm/auto_values.tf +++ b/modules/docker-swarm/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/docker-swarm/main.tf b/modules/docker-swarm/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/docker-swarm/main.tf +++ b/modules/docker-swarm/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/docker-swarm/variables.tf b/modules/docker-swarm/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/docker-swarm/variables.tf +++ b/modules/docker-swarm/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/docker-swarm/versions.tf b/modules/docker-swarm/versions.tf index c4f23b0..6edb421 100644 --- a/modules/docker-swarm/versions.tf +++ b/modules/docker-swarm/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/elasticsearch/README.md b/modules/elasticsearch/README.md index 4a40cd6..e97c677 100644 --- a/modules/elasticsearch/README.md +++ b/modules/elasticsearch/README.md @@ -5,7 +5,7 @@ ```hcl module "elasticsearch_security_group" { source = "terraform-aws-modules/security-group/aws//modules/elasticsearch" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **elasticsearch module** is using are available [here](http | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"elasticsearch-rest-tcp",
"elasticsearch-java-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/elasticsearch/auto_values.tf b/modules/elasticsearch/auto_values.tf index e8c9275..b5f1c9c 100644 --- a/modules/elasticsearch/auto_values.tf +++ b/modules/elasticsearch/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/elasticsearch/main.tf b/modules/elasticsearch/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/elasticsearch/main.tf +++ b/modules/elasticsearch/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/elasticsearch/variables.tf b/modules/elasticsearch/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/elasticsearch/variables.tf +++ b/modules/elasticsearch/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/elasticsearch/versions.tf b/modules/elasticsearch/versions.tf index c4f23b0..6edb421 100644 --- a/modules/elasticsearch/versions.tf +++ b/modules/elasticsearch/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/etcd/README.md b/modules/etcd/README.md index 6a3195a..cfe2ad2 100644 --- a/modules/etcd/README.md +++ b/modules/etcd/README.md @@ -5,7 +5,7 @@ ```hcl module "etcd_security_group" { source = "terraform-aws-modules/security-group/aws//modules/etcd" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **etcd module** is using are available [here](https://githu | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"etcd-client-tcp",
"etcd-peer-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/etcd/auto_values.tf b/modules/etcd/auto_values.tf index e8c0412..4fa364a 100644 --- a/modules/etcd/auto_values.tf +++ b/modules/etcd/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/etcd/main.tf b/modules/etcd/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/etcd/main.tf +++ b/modules/etcd/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/etcd/variables.tf b/modules/etcd/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/etcd/variables.tf +++ b/modules/etcd/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/etcd/versions.tf b/modules/etcd/versions.tf index c4f23b0..6edb421 100644 --- a/modules/etcd/versions.tf +++ b/modules/etcd/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/grafana/README.md b/modules/grafana/README.md index 80bbb70..ee2fea7 100644 --- a/modules/grafana/README.md +++ b/modules/grafana/README.md @@ -5,7 +5,7 @@ ```hcl module "grafana_security_group" { source = "terraform-aws-modules/security-group/aws//modules/grafana" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **grafana module** is using are available [here](https://gi | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"grafana-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/grafana/auto_values.tf b/modules/grafana/auto_values.tf index ee39b60..9e887b4 100644 --- a/modules/grafana/auto_values.tf +++ b/modules/grafana/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/grafana/main.tf b/modules/grafana/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/grafana/main.tf +++ b/modules/grafana/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/grafana/variables.tf b/modules/grafana/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/grafana/variables.tf +++ b/modules/grafana/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/grafana/versions.tf b/modules/grafana/versions.tf index c4f23b0..6edb421 100644 --- a/modules/grafana/versions.tf +++ b/modules/grafana/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/graphite-statsd/README.md b/modules/graphite-statsd/README.md index 938693e..4a812de 100644 --- a/modules/graphite-statsd/README.md +++ b/modules/graphite-statsd/README.md @@ -5,7 +5,7 @@ ```hcl module "graphite_statsd_security_group" { source = "terraform-aws-modules/security-group/aws//modules/graphite-statsd" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **graphite-statsd module** is using are available [here](ht | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"graphite-webui",
"graphite-2003-tcp",
"graphite-2004-tcp",
"graphite-2023-tcp",
"graphite-2024-tcp",
"graphite-8080-tcp",
"graphite-8125-tcp",
"graphite-8125-udp",
"graphite-8126-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/graphite-statsd/auto_values.tf b/modules/graphite-statsd/auto_values.tf index 04167ba..0ab45ff 100644 --- a/modules/graphite-statsd/auto_values.tf +++ b/modules/graphite-statsd/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/graphite-statsd/main.tf b/modules/graphite-statsd/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/graphite-statsd/main.tf +++ b/modules/graphite-statsd/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/graphite-statsd/variables.tf b/modules/graphite-statsd/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/graphite-statsd/variables.tf +++ b/modules/graphite-statsd/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/graphite-statsd/versions.tf b/modules/graphite-statsd/versions.tf index c4f23b0..6edb421 100644 --- a/modules/graphite-statsd/versions.tf +++ b/modules/graphite-statsd/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/http-80/README.md b/modules/http-80/README.md index 5102ff9..5a2edb2 100644 --- a/modules/http-80/README.md +++ b/modules/http-80/README.md @@ -5,7 +5,7 @@ ```hcl module "http_80_security_group" { source = "terraform-aws-modules/security-group/aws//modules/http-80" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **http-80 module** is using are available [here](https://gi | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"http-80-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/http-80/auto_values.tf b/modules/http-80/auto_values.tf index 0fee81d..70ae9c1 100644 --- a/modules/http-80/auto_values.tf +++ b/modules/http-80/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/http-80/main.tf b/modules/http-80/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/http-80/main.tf +++ b/modules/http-80/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/http-80/variables.tf b/modules/http-80/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/http-80/variables.tf +++ b/modules/http-80/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/http-80/versions.tf b/modules/http-80/versions.tf index c4f23b0..6edb421 100644 --- a/modules/http-80/versions.tf +++ b/modules/http-80/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/http-8080/README.md b/modules/http-8080/README.md index 4f8fbb7..17b96aa 100644 --- a/modules/http-8080/README.md +++ b/modules/http-8080/README.md @@ -5,7 +5,7 @@ ```hcl module "http_8080_security_group" { source = "terraform-aws-modules/security-group/aws//modules/http-8080" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **http-8080 module** is using are available [here](https:// | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"http-8080-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/http-8080/auto_values.tf b/modules/http-8080/auto_values.tf index 9577559..9f9769b 100644 --- a/modules/http-8080/auto_values.tf +++ b/modules/http-8080/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/http-8080/main.tf b/modules/http-8080/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/http-8080/main.tf +++ b/modules/http-8080/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/http-8080/variables.tf b/modules/http-8080/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/http-8080/variables.tf +++ b/modules/http-8080/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/http-8080/versions.tf b/modules/http-8080/versions.tf index c4f23b0..6edb421 100644 --- a/modules/http-8080/versions.tf +++ b/modules/http-8080/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/https-443/README.md b/modules/https-443/README.md index a120017..e600fea 100644 --- a/modules/https-443/README.md +++ b/modules/https-443/README.md @@ -5,7 +5,7 @@ ```hcl module "https_443_security_group" { source = "terraform-aws-modules/security-group/aws//modules/https-443" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **https-443 module** is using are available [here](https:// | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"https-443-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/https-443/auto_values.tf b/modules/https-443/auto_values.tf index 3bd14e0..b597b7c 100644 --- a/modules/https-443/auto_values.tf +++ b/modules/https-443/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/https-443/main.tf b/modules/https-443/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/https-443/main.tf +++ b/modules/https-443/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/https-443/variables.tf b/modules/https-443/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/https-443/variables.tf +++ b/modules/https-443/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/https-443/versions.tf b/modules/https-443/versions.tf index c4f23b0..6edb421 100644 --- a/modules/https-443/versions.tf +++ b/modules/https-443/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/https-8443/README.md b/modules/https-8443/README.md index cd5cfb8..f369184 100644 --- a/modules/https-8443/README.md +++ b/modules/https-8443/README.md @@ -5,7 +5,7 @@ ```hcl module "https_8443_security_group" { source = "terraform-aws-modules/security-group/aws//modules/https-8443" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **https-8443 module** is using are available [here](https:/ | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"https-8443-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/https-8443/auto_values.tf b/modules/https-8443/auto_values.tf index 1ca3d58..a87b031 100644 --- a/modules/https-8443/auto_values.tf +++ b/modules/https-8443/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/https-8443/main.tf b/modules/https-8443/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/https-8443/main.tf +++ b/modules/https-8443/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/https-8443/variables.tf b/modules/https-8443/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/https-8443/variables.tf +++ b/modules/https-8443/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/https-8443/versions.tf b/modules/https-8443/versions.tf index c4f23b0..6edb421 100644 --- a/modules/https-8443/versions.tf +++ b/modules/https-8443/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/ipsec-4500/README.md b/modules/ipsec-4500/README.md index 4d5c761..66715c8 100644 --- a/modules/ipsec-4500/README.md +++ b/modules/ipsec-4500/README.md @@ -5,7 +5,7 @@ ```hcl module "ipsec_4500_security_group" { source = "terraform-aws-modules/security-group/aws//modules/ipsec-4500" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **ipsec-4500 module** is using are available [here](https:/ | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"ipsec-4500-udp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/ipsec-4500/auto_values.tf b/modules/ipsec-4500/auto_values.tf index 1b4cad0..9ba2e46 100644 --- a/modules/ipsec-4500/auto_values.tf +++ b/modules/ipsec-4500/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/ipsec-4500/main.tf b/modules/ipsec-4500/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/ipsec-4500/main.tf +++ b/modules/ipsec-4500/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/ipsec-4500/variables.tf b/modules/ipsec-4500/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/ipsec-4500/variables.tf +++ b/modules/ipsec-4500/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/ipsec-4500/versions.tf b/modules/ipsec-4500/versions.tf index c4f23b0..6edb421 100644 --- a/modules/ipsec-4500/versions.tf +++ b/modules/ipsec-4500/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/ipsec-500/README.md b/modules/ipsec-500/README.md index 4552fd5..2614e7d 100644 --- a/modules/ipsec-500/README.md +++ b/modules/ipsec-500/README.md @@ -5,7 +5,7 @@ ```hcl module "ipsec_500_security_group" { source = "terraform-aws-modules/security-group/aws//modules/ipsec-500" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **ipsec-500 module** is using are available [here](https:// | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"ipsec-500-udp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/ipsec-500/auto_values.tf b/modules/ipsec-500/auto_values.tf index 1d276c8..0c58855 100644 --- a/modules/ipsec-500/auto_values.tf +++ b/modules/ipsec-500/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/ipsec-500/main.tf b/modules/ipsec-500/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/ipsec-500/main.tf +++ b/modules/ipsec-500/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/ipsec-500/variables.tf b/modules/ipsec-500/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/ipsec-500/variables.tf +++ b/modules/ipsec-500/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/ipsec-500/versions.tf b/modules/ipsec-500/versions.tf index c4f23b0..6edb421 100644 --- a/modules/ipsec-500/versions.tf +++ b/modules/ipsec-500/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/kafka/README.md b/modules/kafka/README.md index ce9ccb2..50a055f 100644 --- a/modules/kafka/README.md +++ b/modules/kafka/README.md @@ -5,7 +5,7 @@ ```hcl module "kafka_security_group" { source = "terraform-aws-modules/security-group/aws//modules/kafka" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **kafka module** is using are available [here](https://gith | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"kafka-broker-tcp",
"kafka-broker-tls-tcp",
"kafka-broker-tls-public-tcp",
"kafka-broker-sasl-scram-tcp",
"kafka-broker-sasl-scram-tcp",
"kafka-broker-sasl-iam-tcp",
"kafka-broker-sasl-iam-public-tcp",
"kafka-jmx-exporter-tcp",
"kafka-node-exporter-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/kafka/auto_values.tf b/modules/kafka/auto_values.tf index 181bbb8..ca6290f 100644 --- a/modules/kafka/auto_values.tf +++ b/modules/kafka/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/kafka/main.tf b/modules/kafka/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/kafka/main.tf +++ b/modules/kafka/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/kafka/variables.tf b/modules/kafka/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/kafka/variables.tf +++ b/modules/kafka/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/kafka/versions.tf b/modules/kafka/versions.tf index c4f23b0..6edb421 100644 --- a/modules/kafka/versions.tf +++ b/modules/kafka/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/kibana/README.md b/modules/kibana/README.md index 79c0278..15567dd 100644 --- a/modules/kibana/README.md +++ b/modules/kibana/README.md @@ -5,7 +5,7 @@ ```hcl module "kibana_security_group" { source = "terraform-aws-modules/security-group/aws//modules/kibana" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **kibana module** is using are available [here](https://git | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"kibana-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/kibana/auto_values.tf b/modules/kibana/auto_values.tf index fc6d8e2..5ccd00e 100644 --- a/modules/kibana/auto_values.tf +++ b/modules/kibana/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/kibana/main.tf b/modules/kibana/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/kibana/main.tf +++ b/modules/kibana/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/kibana/variables.tf b/modules/kibana/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/kibana/variables.tf +++ b/modules/kibana/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/kibana/versions.tf b/modules/kibana/versions.tf index c4f23b0..6edb421 100644 --- a/modules/kibana/versions.tf +++ b/modules/kibana/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/kubernetes-api/README.md b/modules/kubernetes-api/README.md index b534dc0..0e87c57 100644 --- a/modules/kubernetes-api/README.md +++ b/modules/kubernetes-api/README.md @@ -5,7 +5,7 @@ ```hcl module "kubernetes_api_security_group" { source = "terraform-aws-modules/security-group/aws//modules/kubernetes-api" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **kubernetes-api module** is using are available [here](htt | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"kubernetes-api-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/kubernetes-api/auto_values.tf b/modules/kubernetes-api/auto_values.tf index 0cd8c9b..34b4d13 100644 --- a/modules/kubernetes-api/auto_values.tf +++ b/modules/kubernetes-api/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/kubernetes-api/main.tf b/modules/kubernetes-api/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/kubernetes-api/main.tf +++ b/modules/kubernetes-api/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/kubernetes-api/variables.tf b/modules/kubernetes-api/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/kubernetes-api/variables.tf +++ b/modules/kubernetes-api/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/kubernetes-api/versions.tf b/modules/kubernetes-api/versions.tf index c4f23b0..6edb421 100644 --- a/modules/kubernetes-api/versions.tf +++ b/modules/kubernetes-api/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/ldap/README.md b/modules/ldap/README.md index 4db9c17..a8a5c4c 100644 --- a/modules/ldap/README.md +++ b/modules/ldap/README.md @@ -5,7 +5,7 @@ ```hcl module "ldap_security_group" { source = "terraform-aws-modules/security-group/aws//modules/ldap" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **ldap module** is using are available [here](https://githu | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"ldap-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/ldap/auto_values.tf b/modules/ldap/auto_values.tf index c437562..e992525 100644 --- a/modules/ldap/auto_values.tf +++ b/modules/ldap/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/ldap/main.tf b/modules/ldap/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/ldap/main.tf +++ b/modules/ldap/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/ldap/variables.tf b/modules/ldap/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/ldap/variables.tf +++ b/modules/ldap/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/ldap/versions.tf b/modules/ldap/versions.tf index c4f23b0..6edb421 100644 --- a/modules/ldap/versions.tf +++ b/modules/ldap/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/ldaps/README.md b/modules/ldaps/README.md index eb1e44f..7f141b6 100644 --- a/modules/ldaps/README.md +++ b/modules/ldaps/README.md @@ -5,7 +5,7 @@ ```hcl module "ldaps_security_group" { source = "terraform-aws-modules/security-group/aws//modules/ldaps" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **ldaps module** is using are available [here](https://gith | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"ldaps-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/ldaps/auto_values.tf b/modules/ldaps/auto_values.tf index 451b538..a7b25d4 100644 --- a/modules/ldaps/auto_values.tf +++ b/modules/ldaps/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/ldaps/main.tf b/modules/ldaps/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/ldaps/main.tf +++ b/modules/ldaps/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/ldaps/variables.tf b/modules/ldaps/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/ldaps/variables.tf +++ b/modules/ldaps/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/ldaps/versions.tf b/modules/ldaps/versions.tf index c4f23b0..6edb421 100644 --- a/modules/ldaps/versions.tf +++ b/modules/ldaps/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/logstash/README.md b/modules/logstash/README.md index 3f8d9de..4ef22e6 100644 --- a/modules/logstash/README.md +++ b/modules/logstash/README.md @@ -5,7 +5,7 @@ ```hcl module "logstash_security_group" { source = "terraform-aws-modules/security-group/aws//modules/logstash" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **logstash module** is using are available [here](https://g | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"logstash-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/logstash/auto_values.tf b/modules/logstash/auto_values.tf index 10e573d..7409e20 100644 --- a/modules/logstash/auto_values.tf +++ b/modules/logstash/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/logstash/main.tf b/modules/logstash/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/logstash/main.tf +++ b/modules/logstash/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/logstash/variables.tf b/modules/logstash/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/logstash/variables.tf +++ b/modules/logstash/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/logstash/versions.tf b/modules/logstash/versions.tf index c4f23b0..6edb421 100644 --- a/modules/logstash/versions.tf +++ b/modules/logstash/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/loki/README.md b/modules/loki/README.md index 6bc6e3b..06cdb2a 100644 --- a/modules/loki/README.md +++ b/modules/loki/README.md @@ -5,7 +5,7 @@ ```hcl module "loki_security_group" { source = "terraform-aws-modules/security-group/aws//modules/loki" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **loki module** is using are available [here](https://githu | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"loki-grafana",
"loki-grafana-grpc"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/loki/auto_values.tf b/modules/loki/auto_values.tf index 989fe6f..ac1e0a3 100644 --- a/modules/loki/auto_values.tf +++ b/modules/loki/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/loki/main.tf b/modules/loki/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/loki/main.tf +++ b/modules/loki/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/loki/variables.tf b/modules/loki/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/loki/variables.tf +++ b/modules/loki/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/loki/versions.tf b/modules/loki/versions.tf index c4f23b0..6edb421 100644 --- a/modules/loki/versions.tf +++ b/modules/loki/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/memcached/README.md b/modules/memcached/README.md index 4d8b2de..96f3547 100644 --- a/modules/memcached/README.md +++ b/modules/memcached/README.md @@ -5,7 +5,7 @@ ```hcl module "memcached_security_group" { source = "terraform-aws-modules/security-group/aws//modules/memcached" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **memcached module** is using are available [here](https:// | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"memcached-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/memcached/auto_values.tf b/modules/memcached/auto_values.tf index bdf4e45..f5c533f 100644 --- a/modules/memcached/auto_values.tf +++ b/modules/memcached/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/memcached/main.tf b/modules/memcached/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/memcached/main.tf +++ b/modules/memcached/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/memcached/variables.tf b/modules/memcached/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/memcached/variables.tf +++ b/modules/memcached/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/memcached/versions.tf b/modules/memcached/versions.tf index c4f23b0..6edb421 100644 --- a/modules/memcached/versions.tf +++ b/modules/memcached/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/minio/README.md b/modules/minio/README.md index a96dde1..00b145d 100644 --- a/modules/minio/README.md +++ b/modules/minio/README.md @@ -5,7 +5,7 @@ ```hcl module "minio_security_group" { source = "terraform-aws-modules/security-group/aws//modules/minio" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **minio module** is using are available [here](https://gith | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"minio-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/minio/auto_values.tf b/modules/minio/auto_values.tf index 3afb82e..55ec6c4 100644 --- a/modules/minio/auto_values.tf +++ b/modules/minio/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/minio/main.tf b/modules/minio/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/minio/main.tf +++ b/modules/minio/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/minio/variables.tf b/modules/minio/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/minio/variables.tf +++ b/modules/minio/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/minio/versions.tf b/modules/minio/versions.tf index c4f23b0..6edb421 100644 --- a/modules/minio/versions.tf +++ b/modules/minio/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/mongodb/README.md b/modules/mongodb/README.md index 6f96cf2..c12bffc 100644 --- a/modules/mongodb/README.md +++ b/modules/mongodb/README.md @@ -5,7 +5,7 @@ ```hcl module "mongodb_security_group" { source = "terraform-aws-modules/security-group/aws//modules/mongodb" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **mongodb module** is using are available [here](https://gi | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"mongodb-27017-tcp",
"mongodb-27018-tcp",
"mongodb-27019-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/mongodb/auto_values.tf b/modules/mongodb/auto_values.tf index b6d2436..61bcace 100644 --- a/modules/mongodb/auto_values.tf +++ b/modules/mongodb/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/mongodb/main.tf b/modules/mongodb/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/mongodb/main.tf +++ b/modules/mongodb/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/mongodb/variables.tf b/modules/mongodb/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/mongodb/variables.tf +++ b/modules/mongodb/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/mongodb/versions.tf b/modules/mongodb/versions.tf index c4f23b0..6edb421 100644 --- a/modules/mongodb/versions.tf +++ b/modules/mongodb/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/mssql/README.md b/modules/mssql/README.md index a15ee16..c3cc86d 100644 --- a/modules/mssql/README.md +++ b/modules/mssql/README.md @@ -5,7 +5,7 @@ ```hcl module "mssql_security_group" { source = "terraform-aws-modules/security-group/aws//modules/mssql" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **mssql module** is using are available [here](https://gith | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"mssql-tcp",
"mssql-udp",
"mssql-analytics-tcp",
"mssql-broker-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/mssql/auto_values.tf b/modules/mssql/auto_values.tf index af370a5..4e12c74 100644 --- a/modules/mssql/auto_values.tf +++ b/modules/mssql/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/mssql/main.tf b/modules/mssql/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/mssql/main.tf +++ b/modules/mssql/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/mssql/variables.tf b/modules/mssql/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/mssql/variables.tf +++ b/modules/mssql/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/mssql/versions.tf b/modules/mssql/versions.tf index c4f23b0..6edb421 100644 --- a/modules/mssql/versions.tf +++ b/modules/mssql/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/mysql/README.md b/modules/mysql/README.md index 6b2a1e0..d82ef20 100644 --- a/modules/mysql/README.md +++ b/modules/mysql/README.md @@ -5,7 +5,7 @@ ```hcl module "mysql_security_group" { source = "terraform-aws-modules/security-group/aws//modules/mysql" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **mysql module** is using are available [here](https://gith | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"mysql-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/mysql/auto_values.tf b/modules/mysql/auto_values.tf index ad231a8..5601d21 100644 --- a/modules/mysql/auto_values.tf +++ b/modules/mysql/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/mysql/main.tf b/modules/mysql/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/mysql/main.tf +++ b/modules/mysql/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/mysql/variables.tf b/modules/mysql/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/mysql/variables.tf +++ b/modules/mysql/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/mysql/versions.tf b/modules/mysql/versions.tf index c4f23b0..6edb421 100644 --- a/modules/mysql/versions.tf +++ b/modules/mysql/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/nfs/README.md b/modules/nfs/README.md index eba6272..bde71fc 100644 --- a/modules/nfs/README.md +++ b/modules/nfs/README.md @@ -5,7 +5,7 @@ ```hcl module "nfs_security_group" { source = "terraform-aws-modules/security-group/aws//modules/nfs" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **nfs module** is using are available [here](https://github | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"nfs-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/nfs/auto_values.tf b/modules/nfs/auto_values.tf index fb87606..e099ee3 100644 --- a/modules/nfs/auto_values.tf +++ b/modules/nfs/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/nfs/main.tf b/modules/nfs/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/nfs/main.tf +++ b/modules/nfs/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/nfs/variables.tf b/modules/nfs/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/nfs/variables.tf +++ b/modules/nfs/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/nfs/versions.tf b/modules/nfs/versions.tf index c4f23b0..6edb421 100644 --- a/modules/nfs/versions.tf +++ b/modules/nfs/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/nomad/README.md b/modules/nomad/README.md index a7a2216..0863ebd 100644 --- a/modules/nomad/README.md +++ b/modules/nomad/README.md @@ -5,7 +5,7 @@ ```hcl module "nomad_security_group" { source = "terraform-aws-modules/security-group/aws//modules/nomad" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **nomad module** is using are available [here](https://gith | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"nomad-http-tcp",
"nomad-rpc-tcp",
"nomad-serf-tcp",
"nomad-serf-udp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/nomad/auto_values.tf b/modules/nomad/auto_values.tf index 08df67f..46c3cb3 100644 --- a/modules/nomad/auto_values.tf +++ b/modules/nomad/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/nomad/main.tf b/modules/nomad/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/nomad/main.tf +++ b/modules/nomad/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/nomad/variables.tf b/modules/nomad/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/nomad/variables.tf +++ b/modules/nomad/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/nomad/versions.tf b/modules/nomad/versions.tf index c4f23b0..6edb421 100644 --- a/modules/nomad/versions.tf +++ b/modules/nomad/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/ntp/README.md b/modules/ntp/README.md index 9eca552..8303daf 100644 --- a/modules/ntp/README.md +++ b/modules/ntp/README.md @@ -5,7 +5,7 @@ ```hcl module "ntp_security_group" { source = "terraform-aws-modules/security-group/aws//modules/ntp" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **ntp module** is using are available [here](https://github | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"ntp-udp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/ntp/auto_values.tf b/modules/ntp/auto_values.tf index cf4b735..9bb8d24 100644 --- a/modules/ntp/auto_values.tf +++ b/modules/ntp/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/ntp/main.tf b/modules/ntp/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/ntp/main.tf +++ b/modules/ntp/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/ntp/variables.tf b/modules/ntp/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/ntp/variables.tf +++ b/modules/ntp/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/ntp/versions.tf b/modules/ntp/versions.tf index c4f23b0..6edb421 100644 --- a/modules/ntp/versions.tf +++ b/modules/ntp/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/openvpn/README.md b/modules/openvpn/README.md index 51d7a58..fe741e9 100644 --- a/modules/openvpn/README.md +++ b/modules/openvpn/README.md @@ -5,7 +5,7 @@ ```hcl module "openvpn_security_group" { source = "terraform-aws-modules/security-group/aws//modules/openvpn" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **openvpn module** is using are available [here](https://gi | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"openvpn-udp",
"openvpn-tcp",
"openvpn-https-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/openvpn/auto_values.tf b/modules/openvpn/auto_values.tf index d6f7bdc..6d7ff0f 100644 --- a/modules/openvpn/auto_values.tf +++ b/modules/openvpn/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/openvpn/main.tf b/modules/openvpn/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/openvpn/main.tf +++ b/modules/openvpn/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/openvpn/variables.tf b/modules/openvpn/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/openvpn/variables.tf +++ b/modules/openvpn/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/openvpn/versions.tf b/modules/openvpn/versions.tf index c4f23b0..6edb421 100644 --- a/modules/openvpn/versions.tf +++ b/modules/openvpn/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/oracle-db/README.md b/modules/oracle-db/README.md index ea463e0..82b499a 100644 --- a/modules/oracle-db/README.md +++ b/modules/oracle-db/README.md @@ -5,7 +5,7 @@ ```hcl module "oracle_db_security_group" { source = "terraform-aws-modules/security-group/aws//modules/oracle-db" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **oracle-db module** is using are available [here](https:// | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"oracle-db-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/oracle-db/auto_values.tf b/modules/oracle-db/auto_values.tf index b74c717..571ec58 100644 --- a/modules/oracle-db/auto_values.tf +++ b/modules/oracle-db/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/oracle-db/main.tf b/modules/oracle-db/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/oracle-db/main.tf +++ b/modules/oracle-db/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/oracle-db/variables.tf b/modules/oracle-db/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/oracle-db/variables.tf +++ b/modules/oracle-db/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/oracle-db/versions.tf b/modules/oracle-db/versions.tf index c4f23b0..6edb421 100644 --- a/modules/oracle-db/versions.tf +++ b/modules/oracle-db/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/postgresql/README.md b/modules/postgresql/README.md index e7410e9..9b77264 100644 --- a/modules/postgresql/README.md +++ b/modules/postgresql/README.md @@ -5,7 +5,7 @@ ```hcl module "postgresql_security_group" { source = "terraform-aws-modules/security-group/aws//modules/postgresql" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **postgresql module** is using are available [here](https:/ | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"postgresql-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/postgresql/auto_values.tf b/modules/postgresql/auto_values.tf index 338998e..99979d2 100644 --- a/modules/postgresql/auto_values.tf +++ b/modules/postgresql/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/postgresql/main.tf b/modules/postgresql/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/postgresql/main.tf +++ b/modules/postgresql/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/postgresql/variables.tf b/modules/postgresql/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/postgresql/variables.tf +++ b/modules/postgresql/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/postgresql/versions.tf b/modules/postgresql/versions.tf index c4f23b0..6edb421 100644 --- a/modules/postgresql/versions.tf +++ b/modules/postgresql/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/prometheus/README.md b/modules/prometheus/README.md index 3eea787..c6ad9d8 100644 --- a/modules/prometheus/README.md +++ b/modules/prometheus/README.md @@ -5,7 +5,7 @@ ```hcl module "prometheus_security_group" { source = "terraform-aws-modules/security-group/aws//modules/prometheus" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **prometheus module** is using are available [here](https:/ | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"prometheus-http-tcp",
"prometheus-pushgateway-http-tcp",
"prometheus-node-exporter-http-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/prometheus/auto_values.tf b/modules/prometheus/auto_values.tf index 65331ee..8bad7fa 100644 --- a/modules/prometheus/auto_values.tf +++ b/modules/prometheus/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/prometheus/main.tf b/modules/prometheus/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/prometheus/main.tf +++ b/modules/prometheus/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/prometheus/variables.tf b/modules/prometheus/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/prometheus/variables.tf +++ b/modules/prometheus/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/prometheus/versions.tf b/modules/prometheus/versions.tf index c4f23b0..6edb421 100644 --- a/modules/prometheus/versions.tf +++ b/modules/prometheus/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/promtail/README.md b/modules/promtail/README.md index d88f461..2339e3e 100644 --- a/modules/promtail/README.md +++ b/modules/promtail/README.md @@ -5,7 +5,7 @@ ```hcl module "promtail_security_group" { source = "terraform-aws-modules/security-group/aws//modules/promtail" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **promtail module** is using are available [here](https://g | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"promtail-http"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/promtail/auto_values.tf b/modules/promtail/auto_values.tf index c2035f2..c452971 100644 --- a/modules/promtail/auto_values.tf +++ b/modules/promtail/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/promtail/main.tf b/modules/promtail/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/promtail/main.tf +++ b/modules/promtail/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/promtail/variables.tf b/modules/promtail/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/promtail/variables.tf +++ b/modules/promtail/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/promtail/versions.tf b/modules/promtail/versions.tf index c4f23b0..6edb421 100644 --- a/modules/promtail/versions.tf +++ b/modules/promtail/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/puppet/README.md b/modules/puppet/README.md index 2f9b8f8..04c423f 100644 --- a/modules/puppet/README.md +++ b/modules/puppet/README.md @@ -5,7 +5,7 @@ ```hcl module "puppet_security_group" { source = "terraform-aws-modules/security-group/aws//modules/puppet" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **puppet module** is using are available [here](https://git | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"puppet-tcp",
"puppetdb-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/puppet/auto_values.tf b/modules/puppet/auto_values.tf index afe6d4d..5334551 100644 --- a/modules/puppet/auto_values.tf +++ b/modules/puppet/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/puppet/main.tf b/modules/puppet/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/puppet/main.tf +++ b/modules/puppet/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/puppet/variables.tf b/modules/puppet/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/puppet/variables.tf +++ b/modules/puppet/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/puppet/versions.tf b/modules/puppet/versions.tf index c4f23b0..6edb421 100644 --- a/modules/puppet/versions.tf +++ b/modules/puppet/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/rabbitmq/README.md b/modules/rabbitmq/README.md index 81db819..06add30 100644 --- a/modules/rabbitmq/README.md +++ b/modules/rabbitmq/README.md @@ -5,7 +5,7 @@ ```hcl module "rabbitmq_security_group" { source = "terraform-aws-modules/security-group/aws//modules/rabbitmq" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **rabbitmq module** is using are available [here](https://g | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"rabbitmq-4369-tcp",
"rabbitmq-5671-tcp",
"rabbitmq-5672-tcp",
"rabbitmq-15672-tcp",
"rabbitmq-25672-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/rabbitmq/auto_values.tf b/modules/rabbitmq/auto_values.tf index 30a7676..e9b7d5d 100644 --- a/modules/rabbitmq/auto_values.tf +++ b/modules/rabbitmq/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/rabbitmq/main.tf b/modules/rabbitmq/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/rabbitmq/main.tf +++ b/modules/rabbitmq/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/rabbitmq/variables.tf b/modules/rabbitmq/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/rabbitmq/variables.tf +++ b/modules/rabbitmq/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/rabbitmq/versions.tf b/modules/rabbitmq/versions.tf index c4f23b0..6edb421 100644 --- a/modules/rabbitmq/versions.tf +++ b/modules/rabbitmq/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/rdp/README.md b/modules/rdp/README.md index 38a842c..83d2636 100644 --- a/modules/rdp/README.md +++ b/modules/rdp/README.md @@ -5,7 +5,7 @@ ```hcl module "rdp_security_group" { source = "terraform-aws-modules/security-group/aws//modules/rdp" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **rdp module** is using are available [here](https://github | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"rdp-tcp",
"rdp-udp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/rdp/auto_values.tf b/modules/rdp/auto_values.tf index dc55929..86e5f6f 100644 --- a/modules/rdp/auto_values.tf +++ b/modules/rdp/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/rdp/main.tf b/modules/rdp/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/rdp/main.tf +++ b/modules/rdp/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/rdp/variables.tf b/modules/rdp/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/rdp/variables.tf +++ b/modules/rdp/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/rdp/versions.tf b/modules/rdp/versions.tf index c4f23b0..6edb421 100644 --- a/modules/rdp/versions.tf +++ b/modules/rdp/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/redis/README.md b/modules/redis/README.md index 5a9d74a..d33993b 100644 --- a/modules/redis/README.md +++ b/modules/redis/README.md @@ -5,7 +5,7 @@ ```hcl module "redis_security_group" { source = "terraform-aws-modules/security-group/aws//modules/redis" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **redis module** is using are available [here](https://gith | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"redis-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/redis/auto_values.tf b/modules/redis/auto_values.tf index 8563abf..6f7dd8f 100644 --- a/modules/redis/auto_values.tf +++ b/modules/redis/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/redis/main.tf b/modules/redis/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/redis/main.tf +++ b/modules/redis/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/redis/variables.tf b/modules/redis/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/redis/variables.tf +++ b/modules/redis/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/redis/versions.tf b/modules/redis/versions.tf index c4f23b0..6edb421 100644 --- a/modules/redis/versions.tf +++ b/modules/redis/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/redshift/README.md b/modules/redshift/README.md index d2f97c9..67d4269 100644 --- a/modules/redshift/README.md +++ b/modules/redshift/README.md @@ -5,7 +5,7 @@ ```hcl module "redshift_security_group" { source = "terraform-aws-modules/security-group/aws//modules/redshift" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **redshift module** is using are available [here](https://g | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"redshift-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/redshift/auto_values.tf b/modules/redshift/auto_values.tf index c4d26e7..619d376 100644 --- a/modules/redshift/auto_values.tf +++ b/modules/redshift/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/redshift/main.tf b/modules/redshift/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/redshift/main.tf +++ b/modules/redshift/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/redshift/variables.tf b/modules/redshift/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/redshift/variables.tf +++ b/modules/redshift/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/redshift/versions.tf b/modules/redshift/versions.tf index c4f23b0..6edb421 100644 --- a/modules/redshift/versions.tf +++ b/modules/redshift/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/smtp-submission/README.md b/modules/smtp-submission/README.md index ea9059a..22ce412 100644 --- a/modules/smtp-submission/README.md +++ b/modules/smtp-submission/README.md @@ -5,7 +5,7 @@ ```hcl module "smtp_submission_security_group" { source = "terraform-aws-modules/security-group/aws//modules/smtp-submission" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **smtp-submission module** is using are available [here](ht | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"smtp-submission-587-tcp",
"smtp-submission-2587-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/smtp-submission/auto_values.tf b/modules/smtp-submission/auto_values.tf index 1b4902f..607a096 100644 --- a/modules/smtp-submission/auto_values.tf +++ b/modules/smtp-submission/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/smtp-submission/main.tf b/modules/smtp-submission/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/smtp-submission/main.tf +++ b/modules/smtp-submission/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/smtp-submission/variables.tf b/modules/smtp-submission/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/smtp-submission/variables.tf +++ b/modules/smtp-submission/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/smtp-submission/versions.tf b/modules/smtp-submission/versions.tf index c4f23b0..6edb421 100644 --- a/modules/smtp-submission/versions.tf +++ b/modules/smtp-submission/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/smtp/README.md b/modules/smtp/README.md index 9aaf9c7..75e7c55 100644 --- a/modules/smtp/README.md +++ b/modules/smtp/README.md @@ -5,7 +5,7 @@ ```hcl module "smtp_security_group" { source = "terraform-aws-modules/security-group/aws//modules/smtp" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **smtp module** is using are available [here](https://githu | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"smtp-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/smtp/auto_values.tf b/modules/smtp/auto_values.tf index 59fe543..c3e1d86 100644 --- a/modules/smtp/auto_values.tf +++ b/modules/smtp/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/smtp/main.tf b/modules/smtp/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/smtp/main.tf +++ b/modules/smtp/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/smtp/variables.tf b/modules/smtp/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/smtp/variables.tf +++ b/modules/smtp/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/smtp/versions.tf b/modules/smtp/versions.tf index c4f23b0..6edb421 100644 --- a/modules/smtp/versions.tf +++ b/modules/smtp/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/smtps/README.md b/modules/smtps/README.md index 899da7c..2cdc365 100644 --- a/modules/smtps/README.md +++ b/modules/smtps/README.md @@ -5,7 +5,7 @@ ```hcl module "smtps_security_group" { source = "terraform-aws-modules/security-group/aws//modules/smtps" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **smtps module** is using are available [here](https://gith | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"smtps-465-tcp",
"smtps-2465-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/smtps/auto_values.tf b/modules/smtps/auto_values.tf index 5c43085..19cfff4 100644 --- a/modules/smtps/auto_values.tf +++ b/modules/smtps/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/smtps/main.tf b/modules/smtps/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/smtps/main.tf +++ b/modules/smtps/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/smtps/variables.tf b/modules/smtps/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/smtps/variables.tf +++ b/modules/smtps/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/smtps/versions.tf b/modules/smtps/versions.tf index c4f23b0..6edb421 100644 --- a/modules/smtps/versions.tf +++ b/modules/smtps/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/solr/README.md b/modules/solr/README.md index 5c4a5b3..0df4f35 100644 --- a/modules/solr/README.md +++ b/modules/solr/README.md @@ -5,7 +5,7 @@ ```hcl module "solr_security_group" { source = "terraform-aws-modules/security-group/aws//modules/solr" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **solr module** is using are available [here](https://githu | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"solr-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/solr/auto_values.tf b/modules/solr/auto_values.tf index 78c11b4..6d0278c 100644 --- a/modules/solr/auto_values.tf +++ b/modules/solr/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/solr/main.tf b/modules/solr/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/solr/main.tf +++ b/modules/solr/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/solr/variables.tf b/modules/solr/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/solr/variables.tf +++ b/modules/solr/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/solr/versions.tf b/modules/solr/versions.tf index c4f23b0..6edb421 100644 --- a/modules/solr/versions.tf +++ b/modules/solr/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/splunk/README.md b/modules/splunk/README.md index e1c2afe..de4273f 100644 --- a/modules/splunk/README.md +++ b/modules/splunk/README.md @@ -5,7 +5,7 @@ ```hcl module "splunk_security_group" { source = "terraform-aws-modules/security-group/aws//modules/splunk" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **splunk module** is using are available [here](https://git | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"splunk-indexer-tcp",
"splunk-web-tcp",
"splunk-splunkd-tcp",
"splunk-hec-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/splunk/auto_values.tf b/modules/splunk/auto_values.tf index 7a56db9..3fe9ded 100644 --- a/modules/splunk/auto_values.tf +++ b/modules/splunk/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/splunk/main.tf b/modules/splunk/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/splunk/main.tf +++ b/modules/splunk/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/splunk/variables.tf b/modules/splunk/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/splunk/variables.tf +++ b/modules/splunk/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/splunk/versions.tf b/modules/splunk/versions.tf index c4f23b0..6edb421 100644 --- a/modules/splunk/versions.tf +++ b/modules/splunk/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/squid/README.md b/modules/squid/README.md index 14f32d6..b11e19a 100644 --- a/modules/squid/README.md +++ b/modules/squid/README.md @@ -5,7 +5,7 @@ ```hcl module "squid_security_group" { source = "terraform-aws-modules/security-group/aws//modules/squid" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **squid module** is using are available [here](https://gith | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"squid-proxy-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/squid/auto_values.tf b/modules/squid/auto_values.tf index fa95425..7e7962c 100644 --- a/modules/squid/auto_values.tf +++ b/modules/squid/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/squid/main.tf b/modules/squid/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/squid/main.tf +++ b/modules/squid/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/squid/variables.tf b/modules/squid/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/squid/variables.tf +++ b/modules/squid/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/squid/versions.tf b/modules/squid/versions.tf index c4f23b0..6edb421 100644 --- a/modules/squid/versions.tf +++ b/modules/squid/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/ssh/README.md b/modules/ssh/README.md index 6a365b2..693148b 100644 --- a/modules/ssh/README.md +++ b/modules/ssh/README.md @@ -5,7 +5,7 @@ ```hcl module "ssh_security_group" { source = "terraform-aws-modules/security-group/aws//modules/ssh" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **ssh module** is using are available [here](https://github | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"ssh-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/ssh/auto_values.tf b/modules/ssh/auto_values.tf index da270c3..f9bff72 100644 --- a/modules/ssh/auto_values.tf +++ b/modules/ssh/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/ssh/main.tf b/modules/ssh/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/ssh/main.tf +++ b/modules/ssh/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/ssh/variables.tf b/modules/ssh/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/ssh/variables.tf +++ b/modules/ssh/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/ssh/versions.tf b/modules/ssh/versions.tf index c4f23b0..6edb421 100644 --- a/modules/ssh/versions.tf +++ b/modules/ssh/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/storm/README.md b/modules/storm/README.md index 8b41478..1cb4066 100644 --- a/modules/storm/README.md +++ b/modules/storm/README.md @@ -5,7 +5,7 @@ ```hcl module "storm_security_group" { source = "terraform-aws-modules/security-group/aws//modules/storm" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **storm module** is using are available [here](https://gith | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"storm-nimbus-tcp",
"storm-ui-tcp",
"storm-supervisor-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/storm/auto_values.tf b/modules/storm/auto_values.tf index 7a049c6..0d650db 100644 --- a/modules/storm/auto_values.tf +++ b/modules/storm/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/storm/main.tf b/modules/storm/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/storm/main.tf +++ b/modules/storm/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/storm/variables.tf b/modules/storm/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/storm/variables.tf +++ b/modules/storm/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/storm/versions.tf b/modules/storm/versions.tf index c4f23b0..6edb421 100644 --- a/modules/storm/versions.tf +++ b/modules/storm/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/vault/README.md b/modules/vault/README.md index 4982bb9..89d1e82 100644 --- a/modules/vault/README.md +++ b/modules/vault/README.md @@ -5,7 +5,7 @@ ```hcl module "vault_security_group" { source = "terraform-aws-modules/security-group/aws//modules/vault" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **vault module** is using are available [here](https://gith | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"vault-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/vault/auto_values.tf b/modules/vault/auto_values.tf index 00b696c..8fb2d11 100644 --- a/modules/vault/auto_values.tf +++ b/modules/vault/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/vault/main.tf b/modules/vault/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/vault/main.tf +++ b/modules/vault/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/vault/variables.tf b/modules/vault/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/vault/variables.tf +++ b/modules/vault/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/vault/versions.tf b/modules/vault/versions.tf index c4f23b0..6edb421 100644 --- a/modules/vault/versions.tf +++ b/modules/vault/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/wazuh/README.md b/modules/wazuh/README.md index 8c7f016..850942d 100644 --- a/modules/wazuh/README.md +++ b/modules/wazuh/README.md @@ -5,7 +5,7 @@ ```hcl module "wazuh_security_group" { source = "terraform-aws-modules/security-group/aws//modules/wazuh" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **wazuh module** is using are available [here](https://gith | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"wazuh-server-agent-connection-tcp",
"wazuh-server-agent-connection-udp",
"wazuh-server-agent-enrollment",
"wazuh-server-agent-cluster-daemon",
"wazuh-server-syslog-collector-tcp",
"wazuh-server-syslog-collector-udp",
"wazuh-server-restful-api",
"wazuh-indexer-restful-api",
"wazuh-dashboard"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/wazuh/auto_values.tf b/modules/wazuh/auto_values.tf index 56dbf96..812b19d 100644 --- a/modules/wazuh/auto_values.tf +++ b/modules/wazuh/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/wazuh/main.tf b/modules/wazuh/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/wazuh/main.tf +++ b/modules/wazuh/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/wazuh/variables.tf b/modules/wazuh/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/wazuh/variables.tf +++ b/modules/wazuh/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/wazuh/versions.tf b/modules/wazuh/versions.tf index c4f23b0..6edb421 100644 --- a/modules/wazuh/versions.tf +++ b/modules/wazuh/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/web/README.md b/modules/web/README.md index 9256168..c4ff3d1 100644 --- a/modules/web/README.md +++ b/modules/web/README.md @@ -5,7 +5,7 @@ ```hcl module "web_security_group" { source = "terraform-aws-modules/security-group/aws//modules/web" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **web module** is using are available [here](https://github | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"http-80-tcp",
"http-8080-tcp",
"https-443-tcp",
"web-jmx-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/web/auto_values.tf b/modules/web/auto_values.tf index 03bdb52..06afb26 100644 --- a/modules/web/auto_values.tf +++ b/modules/web/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/web/main.tf b/modules/web/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/web/main.tf +++ b/modules/web/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/web/variables.tf b/modules/web/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/web/variables.tf +++ b/modules/web/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/web/versions.tf b/modules/web/versions.tf index c4f23b0..6edb421 100644 --- a/modules/web/versions.tf +++ b/modules/web/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/winrm/README.md b/modules/winrm/README.md index abd62a3..6407efc 100644 --- a/modules/winrm/README.md +++ b/modules/winrm/README.md @@ -5,7 +5,7 @@ ```hcl module "winrm_security_group" { source = "terraform-aws-modules/security-group/aws//modules/winrm" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **winrm module** is using are available [here](https://gith | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"winrm-http-tcp",
"winrm-https-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/winrm/auto_values.tf b/modules/winrm/auto_values.tf index 8ea1ff5..fbd0d6a 100644 --- a/modules/winrm/auto_values.tf +++ b/modules/winrm/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/winrm/main.tf b/modules/winrm/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/winrm/main.tf +++ b/modules/winrm/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/winrm/variables.tf b/modules/winrm/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/winrm/variables.tf +++ b/modules/winrm/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/winrm/versions.tf b/modules/winrm/versions.tf index c4f23b0..6edb421 100644 --- a/modules/winrm/versions.tf +++ b/modules/winrm/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/zabbix/README.md b/modules/zabbix/README.md index 8901a60..88e0393 100644 --- a/modules/zabbix/README.md +++ b/modules/zabbix/README.md @@ -5,7 +5,7 @@ ```hcl module "zabbix_security_group" { source = "terraform-aws-modules/security-group/aws//modules/zabbix" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **zabbix module** is using are available [here](https://git | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"zabbix-server",
"zabbix-proxy",
"zabbix-agent"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/zabbix/auto_values.tf b/modules/zabbix/auto_values.tf index 0869c7a..a6822de 100644 --- a/modules/zabbix/auto_values.tf +++ b/modules/zabbix/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/zabbix/main.tf b/modules/zabbix/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/zabbix/main.tf +++ b/modules/zabbix/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/zabbix/variables.tf b/modules/zabbix/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/zabbix/variables.tf +++ b/modules/zabbix/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/zabbix/versions.tf b/modules/zabbix/versions.tf index c4f23b0..6edb421 100644 --- a/modules/zabbix/versions.tf +++ b/modules/zabbix/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/zipkin/README.md b/modules/zipkin/README.md index b87222c..9682fd1 100644 --- a/modules/zipkin/README.md +++ b/modules/zipkin/README.md @@ -5,7 +5,7 @@ ```hcl module "zipkin_security_group" { source = "terraform-aws-modules/security-group/aws//modules/zipkin" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **zipkin module** is using are available [here](https://git | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"zipkin-admin-tcp",
"zipkin-admin-query-tcp",
"zipkin-admin-web-tcp",
"zipkin-query-tcp",
"zipkin-web-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/zipkin/auto_values.tf b/modules/zipkin/auto_values.tf index d5abf3e..0b9b2c2 100644 --- a/modules/zipkin/auto_values.tf +++ b/modules/zipkin/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/zipkin/main.tf b/modules/zipkin/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/zipkin/main.tf +++ b/modules/zipkin/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/zipkin/variables.tf b/modules/zipkin/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/zipkin/variables.tf +++ b/modules/zipkin/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/zipkin/versions.tf b/modules/zipkin/versions.tf index c4f23b0..6edb421 100644 --- a/modules/zipkin/versions.tf +++ b/modules/zipkin/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/modules/zookeeper/README.md b/modules/zookeeper/README.md index ea290b4..2b77074 100644 --- a/modules/zookeeper/README.md +++ b/modules/zookeeper/README.md @@ -5,7 +5,7 @@ ```hcl module "zookeeper_security_group" { source = "terraform-aws-modules/security-group/aws//modules/zookeeper" - version = "~> 5.0" + version = "~> 6.0" # omitted... } @@ -19,7 +19,7 @@ All automatic values **zookeeper module** is using are available [here](https:// | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 3.29 | +| [aws](#requirement\_aws) | >= 5.63 | ## Providers @@ -39,36 +39,10 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [auto\_computed\_egress\_rules](#input\_auto\_computed\_egress\_rules) | List of computed egress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_egress\_with\_self](#input\_auto\_computed\_egress\_with\_self) | List of maps defining computed egress rules with self to add automatically | `list(map(string))` | `[]` | no | -| [auto\_computed\_ingress\_rules](#input\_auto\_computed\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` | `[]` | no | -| [auto\_computed\_ingress\_with\_self](#input\_auto\_computed\_ingress\_with\_self) | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_egress\_rules](#input\_auto\_egress\_rules) | List of egress rules to add automatically | `list(string)` |
"0.0.0.0/0"
]
[| no | | [auto\_egress\_with\_self](#input\_auto\_egress\_with\_self) | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no | | [auto\_ingress\_rules](#input\_auto\_ingress\_rules) | List of ingress rules to add automatically | `list(string)` |
"all-all"
]
[| no | | [auto\_ingress\_with\_self](#input\_auto\_ingress\_with\_self) | List of maps defining ingress rules with self to add automatically | `list(map(string))` |
"zookeeper-2181-tcp",
"zookeeper-2182-tls-tcp",
"zookeeper-2888-tcp",
"zookeeper-3888-tcp",
"zookeeper-jmx-tcp"
]
[| no | -| [auto\_number\_of\_computed\_egress\_rules](#input\_auto\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_egress\_with\_self](#input\_auto\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_rules](#input\_auto\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [auto\_number\_of\_computed\_ingress\_with\_self](#input\_auto\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [computed\_egress\_cidr\_blocks](#input\_computed\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed egress rules | `list(string)` |
{
"rule": "all-all"
}
]
[| no | -| [computed\_egress\_ipv6\_cidr\_blocks](#input\_computed\_egress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed egress rules | `list(string)` |
"0.0.0.0/0"
]
[| no | -| [computed\_egress\_prefix\_list\_ids](#input\_computed\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `list(string)` | `[]` | no | -| [computed\_egress\_rules](#input\_computed\_egress\_rules) | List of computed egress rules to create by name | `list(string)` | `[]` | no | -| [computed\_egress\_with\_cidr\_blocks](#input\_computed\_egress\_with\_cidr\_blocks) | List of computed egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_computed\_egress\_with\_ipv6\_cidr\_blocks) | List of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_prefix\_list\_ids](#input\_computed\_egress\_with\_prefix\_list\_ids) | List of computed egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_self](#input\_computed\_egress\_with\_self) | List of computed egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_egress\_with\_source\_security\_group\_id](#input\_computed\_egress\_with\_source\_security\_group\_id) | List of computed egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_cidr\_blocks](#input\_computed\_ingress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_ipv6\_cidr\_blocks) | List of IPv6 CIDR ranges to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_prefix\_list\_ids](#input\_computed\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `list(string)` | `[]` | no | -| [computed\_ingress\_rules](#input\_computed\_ingress\_rules) | List of computed ingress rules to create by name | `list(string)` | `[]` | no | -| [computed\_ingress\_with\_cidr\_blocks](#input\_computed\_ingress\_with\_cidr\_blocks) | List of computed ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | List of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_prefix\_list\_ids](#input\_computed\_ingress\_with\_prefix\_list\_ids) | List of computed ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_self](#input\_computed\_ingress\_with\_self) | List of computed ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | -| [computed\_ingress\_with\_source\_security\_group\_id](#input\_computed\_ingress\_with\_source\_security\_group\_id) | List of computed ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [create](#input\_create) | Whether to create security group and all rules | `bool` | `true` | no | | [description](#input\_description) | Description of security group | `string` | `"Security Group managed by Terraform"` | no | | [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of IPv4 CIDR ranges to use on all egress rules | `list(string)` |
"::/0"
]
[| no | @@ -76,7 +50,6 @@ No resources. | [egress\_prefix\_list\_ids](#input\_egress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all egress rules | `list(string)` | `[]` | no | | [egress\_rules](#input\_egress\_rules) | List of egress rules to create by name | `list(string)` | `[]` | no | | [egress\_with\_cidr\_blocks](#input\_egress\_with\_cidr\_blocks) | List of egress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [egress\_with\_ipv6\_cidr\_blocks](#input\_egress\_with\_ipv6\_cidr\_blocks) | List of egress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [egress\_with\_prefix\_list\_ids](#input\_egress\_with\_prefix\_list\_ids) | List of egress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [egress\_with\_self](#input\_egress\_with\_self) | List of egress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [egress\_with\_source\_security\_group\_id](#input\_egress\_with\_source\_security\_group\_id) | List of egress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | @@ -85,29 +58,10 @@ No resources. | [ingress\_prefix\_list\_ids](#input\_ingress\_prefix\_list\_ids) | List of prefix list IDs (for allowing access to VPC endpoints) to use on all ingress rules | `list(string)` | `[]` | no | | [ingress\_rules](#input\_ingress\_rules) | List of ingress rules to create by name | `list(string)` | `[]` | no | | [ingress\_with\_cidr\_blocks](#input\_ingress\_with\_cidr\_blocks) | List of ingress rules to create where 'cidr\_blocks' is used | `list(map(string))` | `[]` | no | -| [ingress\_with\_ipv6\_cidr\_blocks](#input\_ingress\_with\_ipv6\_cidr\_blocks) | List of ingress rules to create where 'ipv6\_cidr\_blocks' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_prefix\_list\_ids](#input\_ingress\_with\_prefix\_list\_ids) | List of ingress rules to create where 'prefix\_list\_ids' is used | `list(map(string))` | `[]` | no | | [ingress\_with\_self](#input\_ingress\_with\_self) | List of ingress rules to create where 'self' is defined | `list(map(string))` | `[]` | no | | [ingress\_with\_source\_security\_group\_id](#input\_ingress\_with\_source\_security\_group\_id) | List of ingress rules to create where 'source\_security\_group\_id' is used | `list(map(string))` | `[]` | no | | [name](#input\_name) | Name of security group | `string` | n/a | yes | -| [number\_of\_computed\_egress\_cidr\_blocks](#input\_number\_of\_computed\_egress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules | `number` | `0` | no | -| [number\_of\_computed\_egress\_rules](#input\_number\_of\_computed\_egress\_rules) | Number of computed egress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_cidr\_blocks) | Number of computed egress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_egress\_with\_ipv6\_cidr\_blocks) | Number of computed egress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_egress\_with\_prefix\_list\_ids) | Number of computed egress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_self](#input\_number\_of\_computed\_egress\_with\_self) | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_egress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_egress\_with\_source\_security\_group\_id) | Number of computed egress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_cidr\_blocks) | Number of IPv4 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_ipv6\_cidr\_blocks) | Number of IPv6 CIDR ranges to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_prefix\_list\_ids) | Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules | `number` | `0` | no | -| [number\_of\_computed\_ingress\_rules](#input\_number\_of\_computed\_ingress\_rules) | Number of computed ingress rules to create by name | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_cidr\_blocks) | Number of computed ingress rules to create where 'cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks](#input\_number\_of\_computed\_ingress\_with\_ipv6\_cidr\_blocks) | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_prefix\_list\_ids](#input\_number\_of\_computed\_ingress\_with\_prefix\_list\_ids) | Number of computed ingress rules to create where 'prefix\_list\_ids' is used | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_self](#input\_number\_of\_computed\_ingress\_with\_self) | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no | -| [number\_of\_computed\_ingress\_with\_source\_security\_group\_id](#input\_number\_of\_computed\_ingress\_with\_source\_security\_group\_id) | Number of computed ingress rules to create where 'source\_security\_group\_id' is used | `number` | `0` | no | | [revoke\_rules\_on\_delete](#input\_revoke\_rules\_on\_delete) | Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR. | `bool` | `false` | no | | [tags](#input\_tags) | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | [use\_name\_prefix](#input\_use\_name\_prefix) | Whether to use name\_prefix or fixed name. Should be true to able to update security group name after initial creation | `bool` | `true` | no | diff --git a/modules/zookeeper/auto_values.tf b/modules/zookeeper/auto_values.tf index fad05d7..5ec4afd 100644 --- a/modules/zookeeper/auto_values.tf +++ b/modules/zookeeper/auto_values.tf @@ -26,53 +26,3 @@ variable "auto_egress_with_self" { type = list(map(string)) default = [] } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = [] -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = [] -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} diff --git a/modules/zookeeper/main.tf b/modules/zookeeper/main.tf index 80ea0ad..29a8a02 100644 --- a/modules/zookeeper/main.tf +++ b/modules/zookeeper/main.tf @@ -21,9 +21,6 @@ module "sg" { # Open to IPv4 cidr blocks ingress_with_cidr_blocks = var.ingress_with_cidr_blocks - # Open to IPv6 cidr blocks - ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks - # Open for security group id ingress_with_source_security_group_id = var.ingress_with_source_security_group_id @@ -37,37 +34,6 @@ module "sg" { # Default prefix list ids ingress_prefix_list_ids = var.ingress_prefix_list_ids - ################### - # Computed Ingress - ################### - # Rules by names - open for default CIDR - computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""])))) - - # Open for self - computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self) - - # Open to IPv4 cidr blocks - computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks - - # Open for security group id - computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id - - # Open for prefix list id - computed_ingress_with_prefix_list_ids = var.computed_ingress_with_prefix_list_ids - - ############################# - # Number of computed ingress - ############################# - number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules - number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self - number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks - number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks - number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id - number_of_computed_ingress_with_prefix_list_ids = var.number_of_computed_ingress_with_prefix_list_ids - ######### # Egress ######### @@ -80,9 +46,6 @@ module "sg" { # Open to IPv4 cidr blocks egress_with_cidr_blocks = var.egress_with_cidr_blocks - # Open to IPv6 cidr blocks - egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks - # Open for security group id egress_with_source_security_group_id = var.egress_with_source_security_group_id @@ -95,35 +58,4 @@ module "sg" { # Default prefix list ids egress_prefix_list_ids = var.egress_prefix_list_ids - - ################## - # Computed Egress - ################## - # Rules by names - open for default CIDR - computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""])))) - - # Open for self - computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self) - - # Open to IPv4 cidr blocks - computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks - - # Open to IPv6 cidr blocks - computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks - - # Open for security group id - computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id - - # Open for prefix list id - computed_egress_with_prefix_list_ids = var.computed_egress_with_prefix_list_ids - - ############################# - # Number of computed egress - ############################# - number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules - number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self - number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks - number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks - number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id - number_of_computed_egress_with_prefix_list_ids = var.number_of_computed_egress_with_prefix_list_ids } diff --git a/modules/zookeeper/variables.tf b/modules/zookeeper/variables.tf index 60c8c27..58e9d1b 100644 --- a/modules/zookeeper/variables.tf +++ b/modules/zookeeper/variables.tf @@ -62,12 +62,6 @@ variable "ingress_with_cidr_blocks" { default = [] } -variable "ingress_with_ipv6_cidr_blocks" { - description = "List of ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "ingress_with_source_security_group_id" { description = "List of ingress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -98,120 +92,6 @@ variable "ingress_prefix_list_ids" { default = [] } -################### -# Computed Ingress -################### -variable "computed_ingress_rules" { - description = "List of computed ingress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_ingress_with_self" { - description = "List of computed ingress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_cidr_blocks" { - description = "List of computed ingress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_ipv6_cidr_blocks" { - description = "List of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_source_security_group_id" { - description = "List of computed ingress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_with_prefix_list_ids" { - description = "List of computed ingress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_ingress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed ingress rules" - type = list(string) - default = [] -} - -variable "computed_ingress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = list(string) - default = [] -} - -################################### -# Number of computed ingress rules -################################### -variable "number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_cidr_blocks" { - description = "Number of computed ingress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_ipv6_cidr_blocks" { - description = "Number of computed ingress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_source_security_group_id" { - description = "Number of computed ingress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_with_prefix_list_ids" { - description = "Number of computed ingress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_ingress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed ingress rules" - type = number - default = 0 -} - -variable "number_of_computed_ingress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed ingress rules" - type = number - default = 0 -} - ######### # Egress ######### @@ -233,12 +113,6 @@ variable "egress_with_cidr_blocks" { default = [] } -variable "egress_with_ipv6_cidr_blocks" { - description = "List of egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - variable "egress_with_source_security_group_id" { description = "List of egress rules to create where 'source_security_group_id' is used" type = list(map(string)) @@ -268,117 +142,3 @@ variable "egress_prefix_list_ids" { type = list(string) default = [] } - -################## -# Computed Egress -################## -variable "computed_egress_rules" { - description = "List of computed egress rules to create by name" - type = list(string) - default = [] -} - -variable "computed_egress_with_self" { - description = "List of computed egress rules to create where 'self' is defined" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_cidr_blocks" { - description = "List of computed egress rules to create where 'cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_ipv6_cidr_blocks" { - description = "List of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_source_security_group_id" { - description = "List of computed egress rules to create where 'source_security_group_id' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_with_prefix_list_ids" { - description = "List of computed egress rules to create where 'prefix_list_ids' is used" - type = list(map(string)) - default = [] -} - -variable "computed_egress_cidr_blocks" { - description = "List of IPv4 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["0.0.0.0/0"] -} - -variable "computed_egress_ipv6_cidr_blocks" { - description = "List of IPv6 CIDR ranges to use on all computed egress rules" - type = list(string) - default = ["::/0"] -} - -variable "computed_egress_prefix_list_ids" { - description = "List of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = list(string) - default = [] -} - -################################## -# Number of computed egress rules -################################## -variable "number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_cidr_blocks" { - description = "Number of computed egress rules to create where 'cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_ipv6_cidr_blocks" { - description = "Number of computed egress rules to create where 'ipv6_cidr_blocks' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_source_security_group_id" { - description = "Number of computed egress rules to create where 'source_security_group_id' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_with_prefix_list_ids" { - description = "Number of computed egress rules to create where 'prefix_list_ids' is used" - type = number - default = 0 -} - -variable "number_of_computed_egress_cidr_blocks" { - description = "Number of IPv4 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_ipv6_cidr_blocks" { - description = "Number of IPv6 CIDR ranges to use on all computed egress rules" - type = number - default = 0 -} - -variable "number_of_computed_egress_prefix_list_ids" { - description = "Number of prefix list IDs (for allowing access to VPC endpoints) to use on all computed egress rules" - type = number - default = 0 -} diff --git a/modules/zookeeper/versions.tf b/modules/zookeeper/versions.tf index c4f23b0..6edb421 100644 --- a/modules/zookeeper/versions.tf +++ b/modules/zookeeper/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.29" + version = ">= 5.63" } } } diff --git a/outputs.tf b/outputs.tf index f9ffe98..88743b8 100644 --- a/outputs.tf +++ b/outputs.tf @@ -1,29 +1,29 @@ output "security_group_arn" { description = "The ARN of the security group" - value = try(aws_security_group.this[0].arn, aws_security_group.this_name_prefix[0].arn, "") + value = try(aws_security_group.this[0].arn, "") } output "security_group_id" { description = "The ID of the security group" - value = try(aws_security_group.this[0].id, aws_security_group.this_name_prefix[0].id, "") + value = try(aws_security_group.this[0].id, "") } output "security_group_vpc_id" { description = "The VPC ID" - value = try(aws_security_group.this[0].vpc_id, aws_security_group.this_name_prefix[0].vpc_id, "") + value = try(aws_security_group.this[0].vpc_id, "") } output "security_group_owner_id" { description = "The owner ID" - value = try(aws_security_group.this[0].owner_id, aws_security_group.this_name_prefix[0].owner_id, "") + value = try(aws_security_group.this[0].owner_id, "") } output "security_group_name" { description = "The name of the security group" - value = try(aws_security_group.this[0].name, aws_security_group.this_name_prefix[0].name, "") + value = try(aws_security_group.this[0].name, "") } output "security_group_description" { description = "The description of the security group" - value = try(aws_security_group.this[0].description, aws_security_group.this_name_prefix[0].description, "") + value = try(aws_security_group.this[0].description, "") } diff --git a/update_groups.sh b/update_groups.sh index 2ada738..4c0fe72 100755 --- a/update_groups.sh +++ b/update_groups.sh @@ -94,36 +94,12 @@ main() { egress_rules=$(get_auto_value "$auto_groups_data" "$group" "egress_rules") egress_with_self=$(get_auto_value "$auto_groups_data" "$group" "egress_with_self") - # Computed values - computed_ingress_rules=$(get_auto_value "$auto_groups_data" "$group" "computed_ingress_rules") - computed_ingress_with_self=$(get_auto_value "$auto_groups_data" "$group" "computed_ingress_with_self") - computed_egress_rules=$(get_auto_value "$auto_groups_data" "$group" "computed_egress_rules") - computed_egress_with_self=$(get_auto_value "$auto_groups_data" "$group" "computed_egress_with_self") - - # Number of computed values - number_of_computed_ingress_rules=$(get_auto_value "$auto_groups_data" "$group" "number_of_computed_ingress_rules") - number_of_computed_ingress_with_self=$(get_auto_value "$auto_groups_data" "$group" "number_of_computed_ingress_with_self") - number_of_computed_egress_rules=$(get_auto_value "$auto_groups_data" "$group" "number_of_computed_egress_rules") - number_of_computed_egress_with_self=$(get_auto_value "$auto_groups_data" "$group" "number_of_computed_egress_with_self") - # Set to empty lists, if no value was specified ingress_rules=$(set_list_if_null "$ingress_rules") ingress_with_self=$(set_list_if_null "$ingress_with_self") egress_rules=$(set_list_if_null "$egress_rules") egress_with_self=$(set_list_if_null "$egress_with_self") - # Set to empty lists, if no computed value was specified - computed_ingress_rules=$(set_list_if_null "$computed_ingress_rules") - computed_ingress_with_self=$(set_list_if_null "$computed_ingress_with_self") - computed_egress_rules=$(set_list_if_null "$computed_egress_rules") - computed_egress_with_self=$(set_list_if_null "$computed_egress_with_self") - - # Set to zero, if no value was specified - number_of_computed_ingress_rules=$(set_zero_if_null "$number_of_computed_ingress_rules") - number_of_computed_ingress_with_self=$(set_zero_if_null "$number_of_computed_ingress_with_self") - number_of_computed_egress_rules=$(set_zero_if_null "$number_of_computed_egress_rules") - number_of_computed_egress_with_self=$(set_zero_if_null "$number_of_computed_egress_with_self") - # ingress_with_self and egress_with_self are stored as simple lists (like this - ["all-all","all-tcp"]), # so we make map (like this - [{"rule"="all-all"},{"rule"="all-tcp"}]) ingress_with_self=$(echo "$ingress_with_self" | jq -rc "[{rule:.[]}]" | tr ':' '=') @@ -158,56 +134,6 @@ variable "auto_egress_with_self" { type = list(map(string)) default = $egress_with_self } - -# Computed -variable "auto_computed_ingress_rules" { - description = "List of ingress rules to add automatically" - type = list(string) - default = $computed_ingress_rules -} - -variable "auto_computed_ingress_with_self" { - description = "List of maps defining computed ingress rules with self to add automatically" - type = list(map(string)) - default = $computed_ingress_with_self -} - -variable "auto_computed_egress_rules" { - description = "List of computed egress rules to add automatically" - type = list(string) - default = $computed_egress_rules -} - -variable "auto_computed_egress_with_self" { - description = "List of maps defining computed egress rules with self to add automatically" - type = list(map(string)) - default = $computed_egress_with_self -} - -# Number of computed rules -variable "auto_number_of_computed_ingress_rules" { - description = "Number of computed ingress rules to create by name" - type = number - default = $number_of_computed_ingress_rules -} - -variable "auto_number_of_computed_ingress_with_self" { - description = "Number of computed ingress rules to create where 'self' is defined" - type = number - default = $number_of_computed_ingress_with_self -} - -variable "auto_number_of_computed_egress_rules" { - description = "Number of computed egress rules to create by name" - type = number - default = $number_of_computed_egress_rules -} - -variable "auto_number_of_computed_egress_with_self" { - description = "Number of computed egress rules to create where 'self' is defined" - type = number - default = $number_of_computed_egress_with_self -} EOF cat <
"0.0.0.0/0"
]