Skip to content

Security Group Updates are Broken. #338

@alexandros-genies

Description

@alexandros-genies

Description

Due to the lifecycle rule of create_before_destroy, updating the inbound security group rules is extremely unstable. Somertimes, the apply goes through and changes are reflected. Other times, the apply errors out on "duplicate security groups" and the state file gets corrupted (the ingress and egress resources are removed from the state file).

Versions

  • Module version [Required]: 7.2.2

  • Terraform version: 1.2.4

  • Provider version(s): ">= 4.5"

Reproduction Code [Required]

Steps to reproduce the behavior:

  1. Create a postgres RDS aurora instance
  2. Change the inbound security group rule via the allowed_cidr_blocks variable.
  3. Change the inbound security group rule again after step 2.
  4. View the state file, the ingress and egress resources are gone, and the apply from step 3 should error out

This sometimes works, sometimes doesn't, due to the unstable nature of "create_before_destroy"

What is the reason to use "create_before_destroy" for the security group? AFAIK aren't the updates made inplace anyways?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions