-
Notifications
You must be signed in to change notification settings - Fork 605
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/pip/django-ordered-model-3.7.4
- Loading branch information
Showing
39 changed files
with
286 additions
and
2,485 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
resource "fastly_service_dictionary_items" "edge_security_dictionary_items" { | ||
count = var.activate_ngwaf_service ? 1 : 0 | ||
service_id = fastly_service_vcl.python_org.id | ||
dictionary_id = one([for d in fastly_service_vcl.python_org.dictionary : d.dictionary_id if d.name == var.edge_security_dictionary]) | ||
items = { | ||
Enabled : "100" | ||
} | ||
} | ||
|
||
resource "fastly_service_dynamic_snippet_content" "ngwaf_config_snippets" { | ||
for_each = var.activate_ngwaf_service ? toset(["init", "miss", "pass", "deliver"]) : [] | ||
service_id = fastly_service_vcl.python_org.id | ||
snippet_id = one([for d in fastly_service_vcl.python_org.dynamicsnippet : d.snippet_id if d.name == "ngwaf_config_${each.key}"]) | ||
content = "### Terraform managed ngwaf_config_${each.key}" | ||
manage_snippets = false | ||
} | ||
|
||
# NGWAF Edge Deployment on SignalSciences.net | ||
resource "sigsci_edge_deployment" "ngwaf_edge_site_service" { | ||
count = var.activate_ngwaf_service ? 1 : 0 | ||
provider = sigsci.firewall | ||
site_short_name = var.ngwaf_site_name | ||
} | ||
|
||
resource "sigsci_edge_deployment_service" "ngwaf_edge_service_link" { | ||
count = var.activate_ngwaf_service ? 1 : 0 | ||
provider = sigsci.firewall | ||
site_short_name = var.ngwaf_site_name | ||
fastly_sid = fastly_service_vcl.python_org.id | ||
activate_version = var.activate_ngwaf_service | ||
percent_enabled = 100 | ||
depends_on = [ | ||
sigsci_edge_deployment.ngwaf_edge_site_service, | ||
fastly_service_vcl.python_org, | ||
fastly_service_dictionary_items.edge_security_dictionary_items, | ||
fastly_service_dynamic_snippet_content.ngwaf_config_snippets, | ||
] | ||
} | ||
|
||
resource "sigsci_edge_deployment_service_backend" "ngwaf_edge_service_backend_sync" { | ||
count = var.activate_ngwaf_service ? 1 : 0 | ||
provider = sigsci.firewall | ||
site_short_name = var.ngwaf_site_name | ||
fastly_sid = fastly_service_vcl.python_org.id | ||
fastly_service_vcl_active_version = fastly_service_vcl.python_org.active_version | ||
depends_on = [ | ||
sigsci_edge_deployment_service.ngwaf_edge_service_link, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,15 +12,20 @@ module "fastly_production" { | |
fastly_key = var.FASTLY_API_KEY | ||
fastly_header_token = var.FASTLY_HEADER_TOKEN | ||
s3_logging_keys = var.fastly_s3_logging | ||
|
||
ngwaf_site_name = "prod" | ||
ngwaf_email = "[email protected]" | ||
ngwaf_token = var.ngwaf_token | ||
activate_ngwaf_service = false | ||
} | ||
|
||
module "fastly_staging" { | ||
source = "./cdn" | ||
|
||
name = "test.python.org" | ||
domain = "test.python.org" | ||
subdomain = "www.test.python.org" | ||
extra_domains = ["www.test.python.org"] | ||
name = "test.python.org" | ||
domain = "test.python.org" | ||
subdomain = "www.test.python.org" | ||
extra_domains = ["www.test.python.org"] | ||
# TODO: adjust to test-pythondotorg when done testing NGWAF | ||
backend_address = "pythondotorg.ingress.us-east-2.psfhosted.computer" | ||
default_ttl = 3600 | ||
|
@@ -29,4 +34,9 @@ module "fastly_staging" { | |
fastly_key = var.FASTLY_API_KEY | ||
fastly_header_token = var.FASTLY_HEADER_TOKEN | ||
s3_logging_keys = var.fastly_s3_logging | ||
|
||
ngwaf_site_name = "test" | ||
ngwaf_email = "[email protected]" | ||
ngwaf_token = var.ngwaf_token | ||
activate_ngwaf_service = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.