-
Notifications
You must be signed in to change notification settings - Fork 619
feat: add ngwaf #2527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat: add ngwaf #2527
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c8cfda8
feat: add ngwaf with successful tfplan
JacobCoffee e782de1
docs: update to latest var name
JacobCoffee cd4c146
chore: apply formatting
JacobCoffee 33da5a2
feat: make ngwaf bits enabled via var
JacobCoffee e898375
fix: use var fvor activation
JacobCoffee ef7fbeb
fix: fix invalid syntax
JacobCoffee e9a2442
fix: fix invalid syntax again
JacobCoffee e99fe11
chore: use service account
JacobCoffee 30c7b18
chore: cleanup cruft
JacobCoffee c31b872
Merge branch 'main' into ngwaf
JacobCoffee f55f203
fix: apply patch for dynamic dynamic things
JacobCoffee b03a8de
Update infra/cdn/README.md
JacobCoffee 893e9b5
Merge branch 'main' into ngwaf
JacobCoffee dde2e66
Update infra/cdn/README.md
JacobCoffee e068d41
Merge branch 'main' into ngwaf
JacobCoffee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.