v0.40.0 Unstable Pre-Release
Pre-releaseWe are revising and standardizing our handling of security groups and security group rules across all our Terraform modules. This is an early attempt with significant breaking changes. We will make further breaking changes soon, so using this version is not recommended.
BREAKING CHANGES
Click for details and migration guidance
If there is something not documented here, please let us know by filing a ticket.
-
var.allowed_security_groupsis removed in favor of the security group module'svar.security_group_ruleswhich can contain a singlesource_security_group_idper rule -
var.allowed_cidr_blocksis removed in favor of the security group module'svar.security_group_ruleswhich can contain acidr_blocks -
var.use_existing_security_groupsis replaced withvar.security_group_enabled(note that if the former wastrue, the latter should befalse) -
var.existing_security_groupsis replaced withvar.security_groups -
security group has moved
terraform state mv \ "module.redis.aws_security_group.default[0]" \ "module.redis.module.security_group.aws_security_group.default[0]"
-
default
security_group_rulesdoes not allow ingress but this can be added manually.Note: The list must have the same json keys per index
security_group_rules = [ { type = "egress" from_port = 0 to_port = 65535 protocol = "-1" cidr_blocks = ["0.0.0.0/0"] source_security_group_id = null description = "Allow all outbound traffic" }, { type = "ingress" from_port = 6379 to_port = 6379 protocol = "tcp" cidr_blocks = [] source_security_group_id = local.security_group_id # provide existing security group or comment out this rule description = "Allow inbound traffic from existing Security Groups" }, { type = "ingress" from_port = 6379 to_port = 6379 protocol = "tcp" cidr_blocks = [] # provide cidr blocks or comment out this rule source_security_group_id = null description = "Allow inbound traffic from CIDR blocks" } ]
-
security group rules have been moved
Note: since the new security group rule names are generated upon a plan, the plan will need to be run first to generate the new names in order to move the rules. Replace
someguidwith the appropriate value.terraform state mv \ 'module.redis.aws_security_group_rule.egress[0]' \ 'module.redis.module.security_group.aws_security_group_rule.default["egress--1-0-65535-someguid"]' terraform state mv \ 'module.redis.aws_security_group_rule.ingress_security_groups[0]' \ 'module.redis.module.security_group.aws_security_group_rule.default["ingress-tcp-6379-6379-someguid"]' terraform state mv \ 'module.redis.aws_security_group_rule.ingress_cidr_blocks[0]' \ 'module.redis.module.security_group.aws_security_group_rule.default["ingress-tcp-6379-6379-someguid"]'