aws-samples / aws-samples/aws-cloudfront-samples

Edge case bug in update_security_group

Open
#6 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
246
Forks
167
PR merge metrics
No merged PRs in 30d

Description

This is truly an edge case bug, if it can be called that, in the function `update_security_group`.

If there are are IpPermissions present in the security group the code will not update the rules if `INGRESS_PORTS` changes or someone has manually deleted all rules for one value in `INGRESS_PORTS`.

**To reproduce:**
1. Set `INGRESS_PORTS = [ 80 ]`
2. Run the code
3. Set `INGRESS_PORTS = [ 80, 443 ]`
4. Run the code

**Expected behaviour:**
`IpPermissions` has been updated to include port 80 and 443

**Actual behaviour:**
Only rules for port 80 are present

I recognize that this is an edge case, and that this might not be fixed. In that case this issue will just serve as documentation of this behaviour.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.