Skip to content
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

remove the Cloudflare WAF rule #273

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion terraform/010-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ ssl certificate, core application load balancer, and a CloudWatch log group
- Create CloudWatch log group
- Optionally create a Cloudwatch dashboard
- Optionally create a NAT gateway
- Create a Cloudflare rule to allow access to the NAT gateway (if enabled)

## Required Inputs

Expand Down
30 changes: 0 additions & 30 deletions terraform/010-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -136,33 +136,3 @@ module "ecs-service-cloudwatch-dashboard" {
}

data "aws_region" "current" {}


resource "cloudflare_ruleset" "nat" {
count = var.create_nat_gateway ? 1 : 0

zone_id = data.cloudflare_zone.this.id
name = "Bypass bot protection"
description = "Skip super bot fight mode to ensure id-broker can access MFA API"
kind = "zone"
phase = "http_request_firewall_custom"

rules {
action = "skip"
expression = "(ip.src eq ${module.vpc.nat_gateway_ip})"
description = "${var.idp_name} NAT gateway skip bot protection"
enabled = true
action_parameters {
phases = [
"http_request_sbfm"
]
}
logging {
enabled = true
}
}
}

data "cloudflare_zone" "this" {
name = var.cloudflare_domain
}
7 changes: 0 additions & 7 deletions terraform/010-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,5 @@ terraform {
source = "hashicorp/aws"
version = ">= 4.0.0, < 6.0.0"
}
cloudflare = {
source = "cloudflare/cloudflare"

// 4.39.0 deprecated cloudflare_record.value
// While waiting for version 5 to mature, we'll constrain to earlier versions.
version = ">= 2.0.0, < 4.39.0"
}
}
}
1 change: 0 additions & 1 deletion test/010-cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module "cluster" {
aws_instance = { a = "b" }
aws_zones = [""]
cert_domain_name = ""
cloudflare_domain = ""
create_nat_gateway = true
ecs_cluster_name = ""
ecs_instance_profile_id = ""
Expand Down
Loading