   (assoc opts :IpRanges val))
 
 (defn- first-level [sub-key opts]
- (map #(nested-level opts %1) (get opts sub-key)))
+  (map #(nested-level opts %1) (get opts sub-key)))
 
 (defn- expand [opts key sub-key]
   (flatten (map #(first-level sub-key %1) (get opts key))))

   [clojure.tools.logging :as log]
   [clojure.xml :as xml]
   [clojure.zip :as zip]
   [clojure.data.zip.xml :refer [xml1-> attr xml-> text text= attr=]]))

(defn- xml-to-map [xml-string]
  (zip/xml-zip (xml/parse (java.io.ByteArrayInputStream. (.getBytes xml-string)))))

(defn- compare-config
  "Returns a list of two vectors
   First vector is what is present in the remote config , which are not present in the local config
   and the second vector is those present in the local config, which are not applied to the aws config yet"
  [local remote]
  (concat (list (vec (filter #(not (in? (set local) %)) (set remote))))
          (list (vec (filter #(not (in? (set remote) %)) (set local))))))
