Initial commit: Cloudflare infrastructure with WAF Intelligence
- Complete Cloudflare Terraform configuration (DNS, WAF, tunnels, access) - WAF Intelligence MCP server with threat analysis and ML classification - GitOps automation with PR workflows and drift detection - Observatory monitoring stack with Prometheus/Grafana - IDE operator rules for governed development - Security playbooks and compliance frameworks - Autonomous remediation and state reconciliation
This commit is contained in:
29
terraform/main.tf
Normal file
29
terraform/main.tf
Normal file
@@ -0,0 +1,29 @@
|
||||
terraform {
|
||||
required_version = ">= 1.0"
|
||||
|
||||
required_providers {
|
||||
cloudflare = {
|
||||
source = "cloudflare/cloudflare"
|
||||
version = "~> 4.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "cloudflare" {
|
||||
api_token = var.cloudflare_api_token
|
||||
}
|
||||
|
||||
# Data source for account (optional - fails gracefully)
|
||||
data "cloudflare_accounts" "main" {
|
||||
count = var.cloudflare_account_name != "" ? 1 : 0
|
||||
name = var.cloudflare_account_name
|
||||
}
|
||||
|
||||
locals {
|
||||
# Use account ID from data source if available, otherwise use variable
|
||||
account_id = (
|
||||
var.cloudflare_account_name != "" && length(data.cloudflare_accounts.main) > 0 && length(data.cloudflare_accounts.main[0].accounts) > 0
|
||||
? data.cloudflare_accounts.main[0].accounts[0].id
|
||||
: var.cloudflare_account_id
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user