Skip to content

cloudfront_distribution idempotency doesn't allow for list ordering #50

Open
@Alex-Richman

Description

@Alex-Richman

SUMMARY

cloudfront_distribution compares the current and desired Aliases/LambdaFunctionAssociations configuration directly, meaning changes in the ordering of items in the lists causes an unnecessary update.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

cloudfront_distribution

STEPS TO REPRODUCE
cloudfront_distribution:
  state: present
  ...
   aliases: ...
EXPECTED RESULTS

List ordering for Aliases/LambdaFunctionAssociations should be ignored for idempotency checks.

ACTUAL RESULTS
--- before
+++ after
@@ -1,32 +1,30 @@
 {
     "Aliases": {
         "Items": [
+            "aa.redacted.com",
+            "as.redacted.com",
+            "bs.redacted.com",
+            "ca.redacted.com",
+            "cs.redacted.com",
+            "ha.redacted.com",
+            "is.redacted.com",
+            "la.redacted.com",
+            "ls.redacted.com",
+            "redacted.com",
             "rs.redacted.com",
             "sa.redacted.com",
-            "is.redacted.com",
-            "la.redacted.com",
-            "ca.redacted.com",
-            "as.redacted.com",
-            "ls.redacted.com",
-            "redacted.com",
-            "ss.redacted.com",
-            "bs.redacted.com",
-            "cs.redacted.com",
-            "ha.redacted.com",
-            "aa.redacted.com"
+            "ss.redacted.com"
         ]
     },
     "DefaultCacheBehavior": {
         "LambdaFunctionAssociations": {
             "Items": [
                 {
-                    "EventType": "origin-response",
-                    "IncludeBody": false,
+                    "EventType": "origin-request",
                     "LambdaFunctionARN": "arn:aws:lambda:us-east-1:redacted"
                 },
                 {
-                    "EventType": "origin-request",
-                    "IncludeBody": false,
+                    "EventType": "origin-response",
                     "LambdaFunctionARN": "arn:aws:lambda:us-east-1:redacted"
                 }
             ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects_2.10bugThis issue/PR relates to a bugeasyfixGood for new comers and easy to start with contributionmodulemoduleneeds_infoThis issue requires further information. Please answer any outstanding questionsneeds_templateThis issue/PR has an incomplete description. Please fill in the proposed template correctlypluginsplugin (any type)waiting_on_contributorNeeds help. Feel free to engage to get things unblocked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions