-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tf
More file actions
69 lines (54 loc) · 1.38 KB
/
Copy pathmain.tf
File metadata and controls
69 lines (54 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Root configuration that references the zone-specific configuration and account level configuration
# This file is used by Terraform Cloud to find the actual configuration
terraform {
required_version = ">= 1.5.0"
cloud {
organization = "iamask"
workspaces {
name = "cloudflare"
}
}
required_providers {
cloudflare = {
source = "cloudflare/cloudflare"
version = "~> 5.0"
}
}
}
provider "cloudflare" {
api_token = var.API_TOKEN
}
# Variable declarations
variable "API_TOKEN" {
description = "Cloudflare API Token"
type = string
sensitive = true
}
variable "ZONE_ID" {
description = "Cloudflare Zone ID"
type = string
}
variable "ACCOUNT_ID" {
description = "Cloudflare Account ID"
type = string
}
# Reference the zone-specific configuration
module "tf_zxc_co_in" {
source = "./accounts/account_a/zone_tf_zxc_co_in"
ZONE_ID = var.ZONE_ID
}
# Account-level Custom ruleset module
module "account_custom_rules" {
source = "./accounts/account_a/custom_rulesets"
ACCOUNT_ID = var.ACCOUNT_ID
}
# Account-level Rate Limiting ruleset module
module "account_ratelimit" {
source = "./accounts/account_a/ratelimit_rulesets"
ACCOUNT_ID = var.ACCOUNT_ID
}
# Account-level WAF Managed ruleset module
module "account_managed_waf" {
source = "./accounts/account_a/waf_managed_rulesets"
ACCOUNT_ID = var.ACCOUNT_ID
}