Commit 75199485 authored by Niall Ferguson's avatar Niall Ferguson Committed by GitHub

feat: Added optional revoke_rules_on_delete functionality (required for EMR) (#179)

parent e5c6f41d
This diff is collapsed.
...@@ -15,9 +15,10 @@ locals { ...@@ -15,9 +15,10 @@ locals {
resource "aws_security_group" "this" { resource "aws_security_group" "this" {
count = var.create && false == var.use_name_prefix ? 1 : 0 count = var.create && false == var.use_name_prefix ? 1 : 0
name = var.name name = var.name
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
revoke_rules_on_delete = var.revoke_rules_on_delete
tags = merge( tags = merge(
var.tags, var.tags,
...@@ -33,9 +34,10 @@ resource "aws_security_group" "this" { ...@@ -33,9 +34,10 @@ resource "aws_security_group" "this" {
resource "aws_security_group" "this_name_prefix" { resource "aws_security_group" "this_name_prefix" {
count = var.create && var.use_name_prefix ? 1 : 0 count = var.create && var.use_name_prefix ? 1 : 0
name_prefix = "${var.name}-" name_prefix = "${var.name}-"
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
revoke_rules_on_delete = var.revoke_rules_on_delete
tags = merge( tags = merge(
var.tags, var.tags,
......
...@@ -21,6 +21,7 @@ List of Security Groups implemented as Terraform modules ...@@ -21,6 +21,7 @@ List of Security Groups implemented as Terraform modules
* [kibana](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/kibana) * [kibana](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/kibana)
* [kubernetes-api](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/kubernetes-api) * [kubernetes-api](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/kubernetes-api)
* [ldaps](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/ldaps) * [ldaps](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/ldaps)
* [logstash](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/logstash)
* [memcached](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/memcached) * [memcached](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/memcached)
* [minio](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/minio) * [minio](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/minio)
* [mongodb](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/mongodb) * [mongodb](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/mongodb)
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **activemq module** is using are available [here](https://g ...@@ -18,7 +18,7 @@ All automatic values **activemq module** is using are available [here](https://g
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **alertmanager module** is using are available [here](https ...@@ -18,7 +18,7 @@ All automatic values **alertmanager module** is using are available [here](https
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **carbon-relay-ng module** is using are available [here](ht ...@@ -18,7 +18,7 @@ All automatic values **carbon-relay-ng module** is using are available [here](ht
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **cassandra module** is using are available [here](https:// ...@@ -18,7 +18,7 @@ All automatic values **cassandra module** is using are available [here](https://
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **consul module** is using are available [here](https://git ...@@ -18,7 +18,7 @@ All automatic values **consul module** is using are available [here](https://git
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **docker-swarm module** is using are available [here](https ...@@ -18,7 +18,7 @@ All automatic values **docker-swarm module** is using are available [here](https
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **elasticsearch module** is using are available [here](http ...@@ -18,7 +18,7 @@ All automatic values **elasticsearch module** is using are available [here](http
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **grafana module** is using are available [here](https://gi ...@@ -18,7 +18,7 @@ All automatic values **grafana module** is using are available [here](https://gi
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **graphite-statsd module** is using are available [here](ht ...@@ -18,7 +18,7 @@ All automatic values **graphite-statsd module** is using are available [here](ht
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **http-80 module** is using are available [here](https://gi ...@@ -18,7 +18,7 @@ All automatic values **http-80 module** is using are available [here](https://gi
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **http-8080 module** is using are available [here](https:// ...@@ -18,7 +18,7 @@ All automatic values **http-8080 module** is using are available [here](https://
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **https-443 module** is using are available [here](https:// ...@@ -18,7 +18,7 @@ All automatic values **https-443 module** is using are available [here](https://
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **https-8443 module** is using are available [here](https:/ ...@@ -18,7 +18,7 @@ All automatic values **https-8443 module** is using are available [here](https:/
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **ipsec-4500 module** is using are available [here](https:/ ...@@ -18,7 +18,7 @@ All automatic values **ipsec-4500 module** is using are available [here](https:/
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **ipsec-500 module** is using are available [here](https:// ...@@ -18,7 +18,7 @@ All automatic values **ipsec-500 module** is using are available [here](https://
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **kafka module** is using are available [here](https://gith ...@@ -18,7 +18,7 @@ All automatic values **kafka module** is using are available [here](https://gith
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **kibana module** is using are available [here](https://git ...@@ -18,7 +18,7 @@ All automatic values **kibana module** is using are available [here](https://git
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **kubernetes-api module** is using are available [here](htt ...@@ -18,7 +18,7 @@ All automatic values **kubernetes-api module** is using are available [here](htt
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **ldaps module** is using are available [here](https://gith ...@@ -18,7 +18,7 @@ All automatic values **ldaps module** is using are available [here](https://gith
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
This diff is collapsed.
# This file was generated from values defined in rules.tf using update_groups.sh.
###################################
# DO NOT CHANGE THIS FILE MANUALLY
###################################
variable "auto_ingress_rules" {
description = "List of ingress rules to add automatically"
type = list(string)
default = ["logstash-tcp"]
}
variable "auto_ingress_with_self" {
description = "List of maps defining ingress rules with self to add automatically"
type = list(map(string))
default = [{ "rule" = "all-all" }]
}
variable "auto_egress_rules" {
description = "List of egress rules to add automatically"
type = list(string)
default = ["all-all"]
}
variable "auto_egress_with_self" {
description = "List of maps defining egress rules with self to add automatically"
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
}
module "sg" {
source = "../../"
create = var.create
name = var.name
use_name_prefix = var.use_name_prefix
description = var.description
vpc_id = var.vpc_id
revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
##########
# Ingress
##########
# Rules by names - open for default CIDR
ingress_rules = sort(compact(distinct(concat(var.auto_ingress_rules, var.ingress_rules, [""]))))
# Open for self
ingress_with_self = concat(var.auto_ingress_with_self, var.ingress_with_self)
# 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
# Default ingress CIDR blocks
ingress_cidr_blocks = var.ingress_cidr_blocks
ingress_ipv6_cidr_blocks = var.ingress_ipv6_cidr_blocks
# 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
#############################
# 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
#########
# Egress
#########
# Rules by names - open for default CIDR
egress_rules = sort(compact(distinct(concat(var.auto_egress_rules, var.egress_rules, [""]))))
# Open for self
egress_with_self = concat(var.auto_egress_with_self, var.egress_with_self)
# 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
# Default egress CIDR blocks
egress_cidr_blocks = var.egress_cidr_blocks
egress_ipv6_cidr_blocks = var.egress_ipv6_cidr_blocks
# 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
#############################
# 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
}
output "this_security_group_id" {
description = "The ID of the security group"
value = module.sg.this_security_group_id
}
output "this_security_group_vpc_id" {
description = "The VPC ID"
value = module.sg.this_security_group_vpc_id
}
output "this_security_group_owner_id" {
description = "The owner ID"
value = module.sg.this_security_group_owner_id
}
output "this_security_group_name" {
description = "The name of the security group"
value = module.sg.this_security_group_name
}
output "this_security_group_description" {
description = "The description of the security group"
value = module.sg.this_security_group_description
}
This diff is collapsed.
terraform {
required_version = ">= 0.12.6, < 0.14"
required_providers {
aws = "~> 2.42"
}
}
...@@ -18,7 +18,7 @@ All automatic values **memcached module** is using are available [here](https:// ...@@ -18,7 +18,7 @@ All automatic values **memcached module** is using are available [here](https://
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **minio module** is using are available [here](https://gith ...@@ -18,7 +18,7 @@ All automatic values **minio module** is using are available [here](https://gith
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
...@@ -18,7 +18,7 @@ All automatic values **mongodb module** is using are available [here](https://gi ...@@ -18,7 +18,7 @@ All automatic values **mongodb module** is using are available [here](https://gi
| Name | Version | | Name | Version |
|------|---------| |------|---------|
| terraform | ~> 0.12.6 | | terraform | >= 0.12.6, < 0.14 |
| aws | ~> 2.42 | | aws | ~> 2.42 |
## Providers ## Providers
...@@ -92,6 +92,7 @@ No provider. ...@@ -92,6 +92,7 @@ No provider.
| 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\_ipv6\_cidr\_blocks | Number of computed ingress rules to create where 'ipv6\_cidr\_blocks' is used | `number` | `0` | no |
| 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\_self | Number of computed ingress rules to create where 'self' is defined | `number` | `0` | no |
| 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 | | 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 | 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 | A mapping of tags to assign to security group | `map(string)` | `{}` | no | | tags | A mapping of tags to assign to security group | `map(string)` | `{}` | no |
| 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 | | 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 |
| vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes | | vpc\_id | ID of the VPC where to create security group | `string` | n/a | yes |
......
module "sg" { module "sg" {
source = "../../" source = "../../"
create = var.create create = var.create
name = var.name name = var.name
use_name_prefix = var.use_name_prefix use_name_prefix = var.use_name_prefix
description = var.description description = var.description
vpc_id = var.vpc_id vpc_id = var.vpc_id
tags = var.tags revoke_rules_on_delete = var.revoke_rules_on_delete
tags = var.tags
########## ##########
# Ingress # Ingress
......
...@@ -29,6 +29,12 @@ variable "description" { ...@@ -29,6 +29,12 @@ variable "description" {
default = "Security Group managed by Terraform" default = "Security Group managed by Terraform"
} }
variable "revoke_rules_on_delete" {
description = "Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. Enable for EMR."
type = bool
default = false
}
variable "tags" { variable "tags" {
description = "A mapping of tags to assign to security group" description = "A mapping of tags to assign to security group"
type = map(string) type = map(string)
......
terraform { terraform {
required_version = "~> 0.12.6" required_version = ">= 0.12.6, < 0.14"
required_providers { required_providers {
aws = "~> 2.42" aws = "~> 2.42"
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment