Files
vm-cloudflare/terraform/main.tf
Vault Sovereign 37a867c485 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
2025-12-16 18:31:53 +00:00

30 lines
745 B
HCL

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
)
}