vendors have codes on them; making sqs for processing.
This commit is contained in:
2
migrator/migrations/1522981446-DOWN-add-vendor-code.sql
Normal file
2
migrator/migrations/1522981446-DOWN-add-vendor-code.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- 1522981446 DOWN add-vendor-code
|
||||
ALTER TABLE vendors drop column code;
|
||||
2
migrator/migrations/1522981446-UP-add-vendor-code.sql
Normal file
2
migrator/migrations/1522981446-UP-add-vendor-code.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- 1522981446 UP add-vendor-code
|
||||
ALTER TABLE vendors add column code varchar(255) unique;
|
||||
@@ -12,7 +12,6 @@
|
||||
merge-data
|
||||
))
|
||||
|
||||
|
||||
(defn get-all []
|
||||
(->> (j/query (get-conn) "SELECT * FROM vendors")
|
||||
(map parse)))
|
||||
@@ -20,3 +19,8 @@
|
||||
(defn upsert [id data]
|
||||
(j/update! (get-conn) :vendors (clj->db data) ["id = ?" (Integer/parseInt id)] )
|
||||
(merge-data (db->clj (first (j/query (get-conn) ["SELECT * FROM vendors WHERE id = ?" (Integer/parseInt id)])))))
|
||||
|
||||
(defn insert [data]
|
||||
(parse (first (j/insert! (get-conn)
|
||||
:vendors
|
||||
(clj->db data)))))
|
||||
|
||||
@@ -133,6 +133,11 @@
|
||||
:body (pr-str (vendors/upsert id edn-params))
|
||||
:headers {"Content-Type" "application/edn"}})
|
||||
|
||||
(POST "/api/vendors" {:keys [edn-params] :as r}
|
||||
{:status 200
|
||||
:body (pr-str (vendors/insert edn-params))
|
||||
:headers {"Content-Type" "application/edn"}})
|
||||
|
||||
(POST "/api/invoices" {:keys [edn-params]}
|
||||
(invoices/insert-multi! (:rows edn-params))
|
||||
{:status 200
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
(re-frame/reg-event-db
|
||||
::edit
|
||||
(fn [db [_ company-id]]
|
||||
(assoc-in db [:admin-companies :editing]
|
||||
(get (:companies db) company-id))))
|
||||
(assoc-in db [:admin :company]
|
||||
(get (:companies db) company-id))))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::save
|
||||
(fn [{:keys [db]} _]
|
||||
(let [edited-company (get-in db [:admin-companies :editing])]
|
||||
{:db (assoc-in db [:admin-companies :editing :saving?] true)
|
||||
(let [edited-company (get-in db [:admin :company])]
|
||||
{:db (assoc-in db [:admin :company :saving?] true)
|
||||
:http {:method :put
|
||||
:token (:user db)
|
||||
:body (pr-str (select-keys edited-company [:name :email :data :invoice-reminder-schedule]))
|
||||
@@ -28,11 +28,11 @@
|
||||
(fn [db [_ company]]
|
||||
(-> db
|
||||
|
||||
(assoc-in [:admin-companies :editing] nil)
|
||||
(assoc-in [:admin :company] nil)
|
||||
(assoc-in [:companies (:id company)] company))))
|
||||
|
||||
(re-frame/reg-event-db
|
||||
::change
|
||||
(fn [db [_ path value]]
|
||||
(assoc-in db (concat [:admin-companies :editing] path)
|
||||
(assoc-in db (concat [:admin :company] path)
|
||||
value)))
|
||||
|
||||
@@ -8,33 +8,46 @@
|
||||
(re-frame/reg-event-db
|
||||
::edit
|
||||
(fn [db [_ vendor-id]]
|
||||
(assoc-in db [:admin-vendors :editing]
|
||||
(assoc-in db [:admin :vendor]
|
||||
(get (:vendors db) vendor-id))))
|
||||
|
||||
(re-frame/reg-event-db
|
||||
::new
|
||||
(fn [db _]
|
||||
(assoc-in db [:admin :vendor]
|
||||
{})))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::save
|
||||
(fn [{:keys [db]} _]
|
||||
(let [edited-vendor (get-in db [:admin-vendors :editing])]
|
||||
{:db (assoc-in db [:admin-vendors :editing :saving?] true)
|
||||
:http {:method :put
|
||||
:token (:user db)
|
||||
:body (pr-str (select-keys edited-vendor [:name :email :data :invoice-reminder-schedule]))
|
||||
:headers {"Content-Type" "application/edn"}
|
||||
:uri (str "/api/vendors/" (:id edited-vendor))
|
||||
:on-success [::save-complete]}})))
|
||||
(let [edited-vendor (get-in db [:admin :vendor])
|
||||
fx {:db (assoc-in db [:admin :vendor :saving?] true)}]
|
||||
(if (:id edited-vendor)
|
||||
(assoc fx :http {:method :put
|
||||
:token (:user db)
|
||||
:body (pr-str (select-keys edited-vendor [:name :email :data :invoice-reminder-schedule :code]))
|
||||
:headers {"Content-Type" "application/edn"}
|
||||
:uri (str "/api/vendors/" (:id edited-vendor))
|
||||
:on-success [::save-complete]})
|
||||
(assoc fx :http {:method :post
|
||||
:token (:user db)
|
||||
:body (pr-str (select-keys edited-vendor [:name :email :data :invoice-reminder-schedule :code]))
|
||||
:headers {"Content-Type" "application/edn"}
|
||||
:uri (str "/api/vendors")
|
||||
:on-success [::save-complete]})))))
|
||||
|
||||
(re-frame/reg-event-db
|
||||
::save-complete
|
||||
(fn [db [_ vendor]]
|
||||
(-> db
|
||||
|
||||
(assoc-in [:admin-vendors :editing] nil)
|
||||
(assoc-in [:admin :vendor] nil)
|
||||
(assoc-in [:vendors (:id vendor)] vendor))))
|
||||
|
||||
(re-frame/reg-event-db
|
||||
::change
|
||||
(fn [db [_ path value]]
|
||||
(assoc-in db (concat [:admin-vendors :editing] path)
|
||||
(assoc-in db (concat [:admin :vendor] path)
|
||||
value)))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
|
||||
@@ -24,20 +24,15 @@
|
||||
(fn [db]
|
||||
(:user db)))
|
||||
|
||||
(re-frame/reg-sub
|
||||
::admin-companies
|
||||
(fn [db]
|
||||
(:admin-companies db)))
|
||||
|
||||
(re-frame/reg-sub
|
||||
::vendors
|
||||
(fn [db]
|
||||
(vals (:vendors db))))
|
||||
|
||||
(re-frame/reg-sub
|
||||
::admin-vendors
|
||||
::admin
|
||||
(fn [db]
|
||||
(:admin-vendors db)))
|
||||
(:admin db)))
|
||||
|
||||
(re-frame/reg-sub
|
||||
::user
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
[bidi.bidi :as bidi]))
|
||||
(defn companies-table []
|
||||
(let [companies (re-frame/subscribe [::subs/companies])
|
||||
admin-companies (re-frame/subscribe [::subs/admin-companies])
|
||||
editing-company (:editing @admin-companies)]
|
||||
editing-company (:company @(re-frame/subscribe [::subs/admin]))]
|
||||
[:table {:class "table", :style {:width "100%"}}
|
||||
[:thead
|
||||
[:tr
|
||||
@@ -32,9 +31,7 @@
|
||||
[:div.hero-body
|
||||
[:div.container
|
||||
(let [companies (re-frame/subscribe [::subs/companies])
|
||||
admin-companies (re-frame/subscribe [::subs/admin-companies])
|
||||
editing-company (:editing @admin-companies)]
|
||||
(println editing-company)
|
||||
editing-company (:company @(re-frame/subscribe [::subs/admin]))]
|
||||
|
||||
[:div
|
||||
[:h1.title "Companies"]
|
||||
|
||||
@@ -4,15 +4,13 @@
|
||||
[reagent.core :as reagent]
|
||||
[auto-ap.subs :as subs]
|
||||
[auto-ap.events.admin.vendors :as events]
|
||||
[auto-ap.views.utils :refer [login-url dispatch-value-change]]
|
||||
[auto-ap.views.utils :refer [login-url dispatch-value-change dispatch-event]]
|
||||
[cljs.reader :as edn]
|
||||
[auto-ap.routes :as routes]
|
||||
[bidi.bidi :as bidi]))
|
||||
(defn vendors-table []
|
||||
(let [vendors (re-frame/subscribe [::subs/vendors])
|
||||
admin-vendors (re-frame/subscribe [::subs/admin-vendors])
|
||||
editing-vendor (:editing @admin-vendors)]
|
||||
(println @vendors)
|
||||
editing-vendor (:editing @(re-frame/subscribe [::subs/admin]))]
|
||||
[:table {:class "table", :style {:width "100%"}}
|
||||
[:thead
|
||||
[:tr
|
||||
@@ -27,6 +25,70 @@
|
||||
[:td email]
|
||||
[:td invoice-reminder-schedule]])]]))
|
||||
|
||||
(defn edit-dialog []
|
||||
(let [{:keys [name email invoice-reminder-schedule id code] :as editing-vendor} (:vendor @(re-frame/subscribe [::subs/admin]))]
|
||||
[:div.modal.is-active
|
||||
[:div.modal-background {:on-click (fn [] (re-frame/dispatch [::events/edit nil]))}]
|
||||
|
||||
[:div.modal-card
|
||||
[:header.modal-card-head
|
||||
[:p.modal-card-title
|
||||
(if id
|
||||
(str "Edit " (or name "<vendor>"))
|
||||
(str "Add " (or name "<new vendor>")))]
|
||||
[:button.delete {:on-click (fn [] (re-frame/dispatch [::events/edit nil]))}]]
|
||||
[:section.modal-card-body
|
||||
[:div.field
|
||||
[:label.label "Name"]
|
||||
[:div.control
|
||||
[:input.input {:type "text" :value name
|
||||
:on-change (dispatch-value-change [::events/change [:name]])}]]]
|
||||
[:div.field
|
||||
[:label.label "Code"]
|
||||
[:div.control
|
||||
[:input.input {:type "text" :value code
|
||||
:on-change (dispatch-value-change [::events/change [:code]])}]]
|
||||
[:p.help "The vendor code is used for invoice parsing. Only one vendor at a time can use a code"]]
|
||||
|
||||
[:div.field
|
||||
[:label.label "Email"]
|
||||
[:div.control
|
||||
[:input.input {:type "email"
|
||||
:value email
|
||||
:on-change (dispatch-value-change [::events/change [:email]])}]]]
|
||||
|
||||
[:div.field
|
||||
[:labal.label "Invoice Reminders"]
|
||||
[:div.control
|
||||
[:label.radio
|
||||
[:input {:type "radio"
|
||||
:name "schedule"
|
||||
:value "Weekly"
|
||||
:checked (if (= "Weekly" invoice-reminder-schedule)
|
||||
"checked"
|
||||
"")
|
||||
:on-change (dispatch-value-change [::events/change [:invoice-reminder-schedule]])}]
|
||||
" Send weekly"]]
|
||||
[:div.control
|
||||
[:label.radio
|
||||
[:input {:type "radio"
|
||||
:name "schedule"
|
||||
:value "Never"
|
||||
:checked (if (= "Never" invoice-reminder-schedule)
|
||||
"checked"
|
||||
"")
|
||||
:on-change (dispatch-value-change [::events/change [:invoice-reminder-schedule]])}]
|
||||
" Never"]]]
|
||||
|
||||
(when (:saving? editing-vendor) [:div.is-overlay {:style {"backgroundColor" "rgba(150,150,150, 0.5)"}}])]
|
||||
|
||||
[:footer.modal-card-foot
|
||||
[:a.button.is-primary {:on-click (fn [] (re-frame/dispatch [::events/save]))}
|
||||
[:span "Save"]
|
||||
(when (:saving? editing-vendor)
|
||||
[:span.icon
|
||||
[:i.fa.fa-spin.fa-spinner]])]]]]))
|
||||
|
||||
(defn admin-vendors-page []
|
||||
[(with-meta
|
||||
(fn []
|
||||
@@ -35,68 +97,16 @@
|
||||
[:div.hero-body
|
||||
[:div.container
|
||||
(let [vendors (re-frame/subscribe [::subs/vendors])
|
||||
admin-vendors (re-frame/subscribe [::subs/admin-vendors])
|
||||
editing-vendor (:editing @admin-vendors)]
|
||||
editing-vendor (:vendor @(re-frame/subscribe [::subs/admin]))]
|
||||
|
||||
[:div
|
||||
[:h1.title "Vendors"]
|
||||
[vendors-table]
|
||||
|
||||
|
||||
[:a.button.is-primary.is-large {:on-click (dispatch-event [::events/new])} "New vendor"]
|
||||
|
||||
(when editing-vendor
|
||||
[:div.modal.is-active
|
||||
[:div.modal-background {:on-click (fn [] (re-frame/dispatch [::events/edit nil]))}]
|
||||
|
||||
[:div.modal-card
|
||||
[:header.modal-card-head
|
||||
[:p.modal-card-title
|
||||
(str "Edit " (:name editing-vendor))]
|
||||
[:button.delete {:on-click (fn [] (re-frame/dispatch [::events/edit nil]))}]]
|
||||
[:section.modal-card-body
|
||||
[:div.field
|
||||
[:label.label "Name"]
|
||||
[:div.control
|
||||
[:input.input {:type "text" :value (:name editing-vendor)
|
||||
:on-change (dispatch-value-change [::events/change [:name]])}]]]
|
||||
|
||||
[:div.field
|
||||
[:label.label "Email"]
|
||||
[:div.control
|
||||
[:input.input {:type "email"
|
||||
:value (:email editing-vendor)
|
||||
:on-change (dispatch-value-change [::events/change [:email]])}]]]
|
||||
|
||||
[:div.field
|
||||
[:labal.label "Invoice Reminders"]
|
||||
[:div.control
|
||||
[:label.radio
|
||||
[:input {:type "radio"
|
||||
:name "schedule"
|
||||
:value "Weekly"
|
||||
:checked (if (= "Weekly" (:invoice-reminder-schedule editing-vendor))
|
||||
"checked"
|
||||
"")
|
||||
:on-change (dispatch-value-change [::events/change [:invoice-reminder-schedule]])}]
|
||||
" Send weekly"]]
|
||||
[:div.control
|
||||
[:label.radio
|
||||
[:input {:type "radio"
|
||||
:name "schedule"
|
||||
:value "Never"
|
||||
:checked (if (= "Never" (:invoice-reminder-schedule editing-vendor))
|
||||
"checked"
|
||||
"")
|
||||
:on-change (dispatch-value-change [::events/change [:invoice-reminder-schedule]])}]
|
||||
" Never"]]]
|
||||
|
||||
(when (:saving? editing-vendor) [:div.is-overlay {:style {"backgroundColor" "rgba(150,150,150, 0.5)"}}])]
|
||||
|
||||
[:footer.modal-card-foot
|
||||
[:a.button.is-primary {:on-click (fn [] (re-frame/dispatch [::events/save]))}
|
||||
[:span "Save"]
|
||||
(when (:saving? editing-vendor)
|
||||
[:span.icon
|
||||
[:i.fa.fa-spin.fa-spinner]])]]]])])]]]])
|
||||
[edit-dialog]
|
||||
)])]]]])
|
||||
{:component-did-mount (fn []
|
||||
(re-frame/dispatch [::events/mounted]))})])
|
||||
|
||||
@@ -11,4 +11,10 @@
|
||||
|
||||
(defn dispatch-value-change [event]
|
||||
(fn [e]
|
||||
(.preventDefault e)
|
||||
(re-frame/dispatch (conj event (.. e -target -value)))))
|
||||
|
||||
(defn dispatch-event [event]
|
||||
(fn [e]
|
||||
(.preventDefault e)
|
||||
(re-frame/dispatch event)))
|
||||
|
||||
@@ -45,6 +45,36 @@ resource "aws_s3_bucket" "invoices" {
|
||||
}
|
||||
EOF
|
||||
}
|
||||
resource "aws_sqs_queue" "integreat-mail" {
|
||||
name = "integreat-mail-prod"
|
||||
|
||||
policy = <<POLICY
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Principal": "*",
|
||||
"Action": "sqs:SendMessage",
|
||||
"Resource": "arn:aws:sqs:*:*:integreat-mail-prod",
|
||||
"Condition": {
|
||||
"ArnEquals": { "aws:SourceArn": "${aws_s3_bucket.invoices.arn}" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
POLICY
|
||||
}
|
||||
|
||||
resource "aws_s3_bucket_notification" "mail_bucket_notification" {
|
||||
bucket = "${aws_s3_bucket.invoices.id}"
|
||||
|
||||
queue {
|
||||
queue_arn = "${aws_sqs_queue.integreat-mail.arn}"
|
||||
events = ["s3:ObjectCreated:*"]
|
||||
filter_suffix = ""
|
||||
}
|
||||
}
|
||||
|
||||
resource "aws_iam_user" "app_user" {
|
||||
name = "integreat"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"terraform_version": "0.11.5",
|
||||
"serial": 7,
|
||||
"serial": 11,
|
||||
"lineage": "9b630886-8cee-a57d-c7a2-4f19f13f9c51",
|
||||
"modules": [
|
||||
{
|
||||
@@ -117,6 +117,33 @@
|
||||
"deposed": [],
|
||||
"provider": "provider.aws"
|
||||
},
|
||||
"aws_s3_bucket_notification.mail_bucket_notification": {
|
||||
"type": "aws_s3_bucket_notification",
|
||||
"depends_on": [
|
||||
"aws_s3_bucket.invoices",
|
||||
"aws_sqs_queue.integreat-mail"
|
||||
],
|
||||
"primary": {
|
||||
"id": "integreat-mail-prod",
|
||||
"attributes": {
|
||||
"bucket": "integreat-mail-prod",
|
||||
"id": "integreat-mail-prod",
|
||||
"lambda_function.#": "0",
|
||||
"queue.#": "1",
|
||||
"queue.0.events.#": "1",
|
||||
"queue.0.events.3356830603": "s3:ObjectCreated:*",
|
||||
"queue.0.filter_prefix": "",
|
||||
"queue.0.filter_suffix": "",
|
||||
"queue.0.id": "tf-s3-queue-20180406031531190700000001",
|
||||
"queue.0.queue_arn": "arn:aws:sqs:us-east-1:679918342773:integreat-mail-prod",
|
||||
"topic.#": "0"
|
||||
},
|
||||
"meta": {},
|
||||
"tainted": false
|
||||
},
|
||||
"deposed": [],
|
||||
"provider": "provider.aws"
|
||||
},
|
||||
"aws_ses_receipt_rule.store": {
|
||||
"type": "aws_ses_receipt_rule",
|
||||
"depends_on": [
|
||||
@@ -168,15 +195,42 @@
|
||||
"deposed": [],
|
||||
"provider": "provider.aws"
|
||||
},
|
||||
"aws_sqs_queue.integreat-mail": {
|
||||
"type": "aws_sqs_queue",
|
||||
"depends_on": [
|
||||
"aws_s3_bucket.invoices"
|
||||
],
|
||||
"primary": {
|
||||
"id": "https://sqs.us-east-1.amazonaws.com/679918342773/integreat-mail-prod",
|
||||
"attributes": {
|
||||
"arn": "arn:aws:sqs:us-east-1:679918342773:integreat-mail-prod",
|
||||
"content_based_deduplication": "false",
|
||||
"delay_seconds": "0",
|
||||
"fifo_queue": "false",
|
||||
"id": "https://sqs.us-east-1.amazonaws.com/679918342773/integreat-mail-prod",
|
||||
"max_message_size": "262144",
|
||||
"message_retention_seconds": "345600",
|
||||
"name": "integreat-mail-prod",
|
||||
"policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"sqs:SendMessage\",\"Resource\":\"arn:aws:sqs:*:*:integreat-mail-prod\",\"Condition\":{\"ArnEquals\":{\"aws:SourceArn\":\"arn:aws:s3:::integreat-mail-prod\"}}}]}",
|
||||
"receive_wait_time_seconds": "0",
|
||||
"tags.%": "0",
|
||||
"visibility_timeout_seconds": "30"
|
||||
},
|
||||
"meta": {},
|
||||
"tainted": false
|
||||
},
|
||||
"deposed": [],
|
||||
"provider": "provider.aws"
|
||||
},
|
||||
"data.aws_caller_identity.current": {
|
||||
"type": "aws_caller_identity",
|
||||
"depends_on": [],
|
||||
"primary": {
|
||||
"id": "2018-04-05 23:57:10.202315014 +0000 UTC",
|
||||
"id": "2018-04-06 03:15:18.246075732 +0000 UTC",
|
||||
"attributes": {
|
||||
"account_id": "679918342773",
|
||||
"arn": "arn:aws:iam::679918342773:user/bryce",
|
||||
"id": "2018-04-05 23:57:10.202315014 +0000 UTC",
|
||||
"id": "2018-04-06 03:15:18.246075732 +0000 UTC",
|
||||
"user_id": "AIDAJPUJFTOKO4IRADMV4"
|
||||
},
|
||||
"meta": {},
|
||||
|
||||
@@ -1,15 +1,88 @@
|
||||
{
|
||||
"version": 3,
|
||||
"terraform_version": "0.11.5",
|
||||
"serial": 7,
|
||||
"serial": 11,
|
||||
"lineage": "9b630886-8cee-a57d-c7a2-4f19f13f9c51",
|
||||
"modules": [
|
||||
{
|
||||
"path": [
|
||||
"root"
|
||||
],
|
||||
"outputs": {},
|
||||
"outputs": {
|
||||
"aws_access_key_id": {
|
||||
"sensitive": false,
|
||||
"type": "string",
|
||||
"value": "AKIAIRKDGLBX7J7VJZ6Q"
|
||||
},
|
||||
"aws_default_region": {
|
||||
"sensitive": false,
|
||||
"type": "string",
|
||||
"value": "us-east-1"
|
||||
},
|
||||
"aws_secret_access_key": {
|
||||
"sensitive": false,
|
||||
"type": "string",
|
||||
"value": "OtRw2t/xktJBDjP8Jnx1Yf6G+uzBfIkrQEc6nmgo"
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"aws_iam_access_key.app_user": {
|
||||
"type": "aws_iam_access_key",
|
||||
"depends_on": [
|
||||
"aws_iam_user.app_user"
|
||||
],
|
||||
"primary": {
|
||||
"id": "AKIAIRKDGLBX7J7VJZ6Q",
|
||||
"attributes": {
|
||||
"id": "AKIAIRKDGLBX7J7VJZ6Q",
|
||||
"secret": "OtRw2t/xktJBDjP8Jnx1Yf6G+uzBfIkrQEc6nmgo",
|
||||
"ses_smtp_password": "ApPp+ffnGJ/nH8OmP/3dB6ASbZDSNPF3sRyRtZNrEl5D",
|
||||
"status": "Active",
|
||||
"user": "integreat"
|
||||
},
|
||||
"meta": {},
|
||||
"tainted": false
|
||||
},
|
||||
"deposed": [],
|
||||
"provider": "provider.aws"
|
||||
},
|
||||
"aws_iam_user.app_user": {
|
||||
"type": "aws_iam_user",
|
||||
"depends_on": [],
|
||||
"primary": {
|
||||
"id": "integreat",
|
||||
"attributes": {
|
||||
"arn": "arn:aws:iam::679918342773:user/integreat",
|
||||
"force_destroy": "false",
|
||||
"id": "integreat",
|
||||
"name": "integreat",
|
||||
"path": "/",
|
||||
"unique_id": "AIDAINFBWI2I7A3TKPGW2"
|
||||
},
|
||||
"meta": {},
|
||||
"tainted": false
|
||||
},
|
||||
"deposed": [],
|
||||
"provider": "provider.aws"
|
||||
},
|
||||
"aws_iam_user_policy_attachment.app_user_policy": {
|
||||
"type": "aws_iam_user_policy_attachment",
|
||||
"depends_on": [
|
||||
"aws_iam_user.app_user"
|
||||
],
|
||||
"primary": {
|
||||
"id": "integreat-20180405235730902200000001",
|
||||
"attributes": {
|
||||
"id": "integreat-20180405235730902200000001",
|
||||
"policy_arn": "arn:aws:iam::aws:policy/AdministratorAccess",
|
||||
"user": "integreat"
|
||||
},
|
||||
"meta": {},
|
||||
"tainted": false
|
||||
},
|
||||
"deposed": [],
|
||||
"provider": "provider.aws"
|
||||
},
|
||||
"aws_s3_bucket.invoices": {
|
||||
"type": "aws_s3_bucket",
|
||||
"depends_on": [
|
||||
@@ -95,15 +168,42 @@
|
||||
"deposed": [],
|
||||
"provider": "provider.aws"
|
||||
},
|
||||
"aws_sqs_queue.integreat-mail": {
|
||||
"type": "aws_sqs_queue",
|
||||
"depends_on": [
|
||||
"aws_s3_bucket.invoices"
|
||||
],
|
||||
"primary": {
|
||||
"id": "https://sqs.us-east-1.amazonaws.com/679918342773/integreat-mail-prod",
|
||||
"attributes": {
|
||||
"arn": "arn:aws:sqs:us-east-1:679918342773:integreat-mail-prod",
|
||||
"content_based_deduplication": "false",
|
||||
"delay_seconds": "0",
|
||||
"fifo_queue": "false",
|
||||
"id": "https://sqs.us-east-1.amazonaws.com/679918342773/integreat-mail-prod",
|
||||
"max_message_size": "262144",
|
||||
"message_retention_seconds": "345600",
|
||||
"name": "integreat-mail-prod",
|
||||
"policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"sqs:SendMessage\",\"Resource\":\"arn:aws:sqs:*:*:s3-event-notification-queue\",\"Condition\":{\"ArnEquals\":{\"aws:SourceArn\":\"arn:aws:s3:::integreat-mail-prod\"}}}]}",
|
||||
"receive_wait_time_seconds": "0",
|
||||
"tags.%": "0",
|
||||
"visibility_timeout_seconds": "30"
|
||||
},
|
||||
"meta": {},
|
||||
"tainted": false
|
||||
},
|
||||
"deposed": [],
|
||||
"provider": "provider.aws"
|
||||
},
|
||||
"data.aws_caller_identity.current": {
|
||||
"type": "aws_caller_identity",
|
||||
"depends_on": [],
|
||||
"primary": {
|
||||
"id": "2018-04-05 23:38:43.421813463 +0000 UTC",
|
||||
"id": "2018-04-06 03:12:05.025363179 +0000 UTC",
|
||||
"attributes": {
|
||||
"account_id": "679918342773",
|
||||
"arn": "arn:aws:iam::679918342773:user/bryce",
|
||||
"id": "2018-04-05 23:38:43.421813463 +0000 UTC",
|
||||
"id": "2018-04-06 03:12:05.025363179 +0000 UTC",
|
||||
"user_id": "AIDAJPUJFTOKO4IRADMV4"
|
||||
},
|
||||
"meta": {},
|
||||
|
||||
Reference in New Issue
Block a user