-
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/responses-0.25.3
- Loading branch information
Showing
38 changed files
with
277 additions
and
2,478 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
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
27 changes: 27 additions & 0 deletions
27
jobs/migrations/0022_alter_jobtype_options_alter_job_job_types_and_more.py
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,27 @@ | ||
# Generated by Django 4.2.16 on 2024-09-13 17:30 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('jobs', '0021_alter_job_creator_alter_job_last_modified_by_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='jobtype', | ||
options={'ordering': ('name',), 'verbose_name': 'job types', 'verbose_name_plural': 'job types'}, | ||
), | ||
migrations.AlterField( | ||
model_name='job', | ||
name='job_types', | ||
field=models.ManyToManyField(blank=True, limit_choices_to={'active': True}, related_name='jobs', to='jobs.jobtype', verbose_name='Job types'), | ||
), | ||
migrations.AlterField( | ||
model_name='job', | ||
name='other_job_type', | ||
field=models.CharField(blank=True, max_length=100, verbose_name='Other job types'), | ||
), | ||
] |
Oops, something went wrong.