Untitled

mail@pastecode.io avatar
unknown
plain_text
15 days ago
752 B
5
Indexable
Never
def generate_gamma_sns_subscriptions_region_optin_optout
  [
    <%- require 'json' -%>
    <%- @regions.each { |r| -%>
    <%- if r.arn_partition == "aws" -%>
    <%- if optin_region_list.include?(r.airport_code.downcase) %>
    <%- cup_gamma_service_account_id  = r.service('upm-sdc-config').custom_properties["CUPServiceAccountID-gamma"] -%>
    <%- unless cup_gamma_service_account_id.to_s.strip.empty? %>
    {
      "sqsArn" => "<%= "arn:#{r.arn_partition}:sqs:#{r.region_name}:" %><%= cup_gamma_service_account_id %><%= ":cognito-idp-region-opt-events-subscriber-gamma-#{r.airport_code.downcase}" %>",
      "snsArn" => "arn:aws:sns:us-east-1:741443714515:RegionOptEvent-PreProd"
    },
    <%- end -%>
    <%- end -%>
    <%- end } -%>
  ]
end
Leave a Comment