Skip to content

Commit

Permalink
Add logging for fastly-mobile-feedlocator (SumoLogic#227)
Browse files Browse the repository at this point in the history
* add collectors for fastly-mobile-feedlocator and add said collectors to role

* add dev

* join might need to be interpolated

* might have to try heredoc after all
  • Loading branch information
jonoden committed Mar 23, 2021
1 parent fb889a4 commit a28c281
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 1 deletion.
35 changes: 34 additions & 1 deletion terraform/fastly-role.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,40 @@
resource "sumologic_role" "fastly" {
name = "${var.role_prefix[var.env]}-fastly"
description = "Accessing fastly logs"
filter_predicate = "_sourceCategory=${sumologic_http_source.HTTP_fastly-gcs-assets_stg.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-static_stg.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-www_stg.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-gcs-assets_prd.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-static_prd.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-www_prd.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-www-purge_stg.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-mktg_stg.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-mktg_prd.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-mktg-purge_stg.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-mktg-purge_prd.category} OR _sourceCategory=${sumologic_http_source.HTTP_video-service.category} OR _sourceCategory=${sumologic_http_source.HTTP_video-service-stg.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-waf-apps_stg.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-waf-apps_prd.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-nytco_stg.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-nytco_prd.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-rss_stg.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-rss_prd.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-mwcm_stg.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-mwcm_prd.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-int_stg.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-int_prd.category} OR _sourceCategory=${sumologic_http_source.SEO_fastly-spiderbites_stg.category} OR _sourceCategory=${sumologic_http_source.SEO_fastly-spiderbites_prd.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-advertising-waf_stg.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-advertising-waf_prd.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-advertising_stg.category} OR _sourceCategory=${sumologic_http_source.HTTP_fastly-advertising_prd.category}"
filter_predicate = <<-EOT
_sourceCategory=${sumologic_http_source.HTTP_fastly-gcs-assets_stg.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-static_stg.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-www_stg.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-gcs-assets_prd.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-static_prd.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-www_prd.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-www-purge_stg.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-mktg_stg.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-mktg_prd.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-mktg-purge_stg.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-mktg-purge_prd.category}
OR _sourceCategory=${sumologic_http_source.HTTP_video-service.category}
OR _sourceCategory=${sumologic_http_source.HTTP_video-service-stg.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-waf-apps_stg.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-waf-apps_prd.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-nytco_stg.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-nytco_prd.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-rss_stg.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-rss_prd.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-mwcm_stg.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-mwcm_prd.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-int_stg.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-int_prd.category}
OR _sourceCategory=${sumologic_http_source.SEO_fastly-spiderbites_stg.category}
OR _sourceCategory=${sumologic_http_source.SEO_fastly-spiderbites_prd.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-advertising-waf_stg.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-advertising-waf_prd.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-advertising_stg.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-advertising_prd.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-mobile-feedlocator_dev.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-mobile-feedlocator_stg.category}
OR _sourceCategory=${sumologic_http_source.HTTP_fastly-mobile-feedlocator_prd.category}
EOT
capabilities = ["manageFieldExtractionRules", "manageMonitors", "viewPartitions", "viewFields", "viewFieldExtraction", "createAccessKeys", "changeDataAccessLevel", "manageFields"]
}

Expand Down
42 changes: 42 additions & 0 deletions terraform/fastly.tf
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@ resource "sumologic_http_source" "HTTP_fastly-myaccount_dev" {
message_per_request = false
force_timezone = false
}

resource "sumologic_http_source" "HTTP_fastly-bestsellers_dev" {
name = "fastly-bestsellers/dev"
description = "Fastly bestsellers dev"
Expand All @@ -658,6 +659,7 @@ resource "sumologic_http_source" "HTTP_fastly-bestsellers_dev" {
message_per_request = false
force_timezone = false
}

resource "sumologic_http_source" "HTTP_fastly-bestsellers_stg" {
name = "fastly-bestsellers/stg"
description = "Fastly bestsellers stg"
Expand All @@ -670,6 +672,7 @@ resource "sumologic_http_source" "HTTP_fastly-bestsellers_stg" {
message_per_request = false
force_timezone = false
}

resource "sumologic_http_source" "HTTP_fastly-bestsellers_prd" {
name = "fastly-bestsellers/prd"
description = "Fastly bestsellers prd"
Expand All @@ -682,3 +685,42 @@ resource "sumologic_http_source" "HTTP_fastly-bestsellers_prd" {
message_per_request = false
force_timezone = false
}

resource "sumologic_http_source" "HTTP_fastly-mobile-feedlocator_dev" {
name = "fastly-mobile-feedlocator/dev"
description = "Fastly mobile feed locator dev"
category = "fastly-mobile-feedlocator/dev"
collector_id = sumologic_collector.HTTP.id
multiline_processing_enabled = true
timezone = "UTC"
use_autoline_matching = true
automatic_date_parsing = true
message_per_request = false
force_timezone = false
}

resource "sumologic_http_source" "HTTP_fastly-mobile-feedlocator_stg" {
name = "fastly-mobile-feedlocator/stg"
description = "Fastly mobile feed locator stg"
category = "fastly-mobile-feedlocator/stg"
collector_id = sumologic_collector.HTTP.id
multiline_processing_enabled = true
timezone = "UTC"
use_autoline_matching = true
automatic_date_parsing = true
message_per_request = false
force_timezone = false
}

resource "sumologic_http_source" "HTTP_fastly-mobile-feedlocator_prd" {
name = "fastly-mobile-feedlocator/prd"
description = "Fastly mobile feed locator prd"
category = "fastly-mobile-feedlocator/prd"
collector_id = sumologic_collector.HTTP.id
multiline_processing_enabled = true
timezone = "UTC"
use_autoline_matching = true
automatic_date_parsing = true
message_per_request = false
force_timezone = false
}

0 comments on commit a28c281

Please sign in to comment.