@robinmordasiewicz/f5xc-terraform-mcp 2.9.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -0
- package/dist/docs/data-sources/dns_zone.md +2 -2
- package/dist/docs/functions/blindfold_file.md +3 -3
- package/dist/docs/guides/addon-activation.md +459 -0
- package/dist/docs/guides/advanced-http-loadbalancer.md +20 -20
- package/dist/docs/guides/authentication.md +30 -30
- package/dist/docs/guides/blindfold.md +27 -17
- package/dist/docs/guides/http-loadbalancer.md +12 -12
- package/dist/docs/resources/api_credential.md +2 -2
- package/dist/docs/resources/dns_zone.md +306 -443
- package/dist/index.js +255 -1
- package/dist/index.js.map +1 -1
- package/dist/schemas/index.d.ts +39 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +30 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/services/addons.d.ts +63 -0
- package/dist/services/addons.d.ts.map +1 -0
- package/dist/services/addons.js +471 -0
- package/dist/services/addons.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,12 +12,47 @@ A Model Context Protocol (MCP) server that provides AI assistants with comprehen
|
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
14
14
|
|
|
15
|
+
Choose the installation method that best fits your environment:
|
|
16
|
+
|
|
17
|
+
| Method | Best For | Requirements |
|
|
18
|
+
|--------|----------|--------------|
|
|
19
|
+
| [VSCode MCP Gallery](#vscode-mcp-gallery) | VSCode users with Node.js | VSCode 1.99+, Node.js |
|
|
20
|
+
| [npx (Recommended)](#from-npm) | Developers with Node.js | Node.js 18+ |
|
|
21
|
+
| [MCPB Bundle](#mcpb-bundle-no-nodejs-required) | Corporate laptops | None |
|
|
22
|
+
| [From Source](#from-source) | Contributors | Node.js 18+, npm |
|
|
23
|
+
|
|
24
|
+
### VSCode MCP Gallery
|
|
25
|
+
|
|
26
|
+
The easiest way to install if you're using VSCode with GitHub Copilot:
|
|
27
|
+
|
|
28
|
+
1. Open VSCode
|
|
29
|
+
2. Press `Ctrl+Shift+P` / `Cmd+Shift+P` to open Command Palette
|
|
30
|
+
3. Run `MCP: Add Server`
|
|
31
|
+
4. Search for `f5xc` or `@robinmordasiewicz/f5xc-terraform-mcp`
|
|
32
|
+
5. Click Install
|
|
33
|
+
|
|
15
34
|
### From npm
|
|
16
35
|
|
|
17
36
|
```bash
|
|
18
37
|
npm install -g @robinmordasiewicz/f5xc-terraform-mcp
|
|
19
38
|
```
|
|
20
39
|
|
|
40
|
+
Or run directly with npx (no installation required):
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npx @robinmordasiewicz/f5xc-terraform-mcp
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### MCPB Bundle (No Node.js Required)
|
|
47
|
+
|
|
48
|
+
For corporate environments where Node.js cannot be installed:
|
|
49
|
+
|
|
50
|
+
1. Download the latest `.mcpb` file from [GitHub Releases](https://github.com/robinmordasiewicz/terraform-provider-f5xc/releases)
|
|
51
|
+
2. Double-click the file to install, or drag it into Claude Desktop / VSCode
|
|
52
|
+
3. The bundle includes everything needed - no external dependencies
|
|
53
|
+
|
|
54
|
+
**File**: `f5xc-terraform-mcp-X.Y.Z.mcpb`
|
|
55
|
+
|
|
21
56
|
### From Source
|
|
22
57
|
|
|
23
58
|
```bash
|
|
@@ -159,6 +194,21 @@ To make the MCP server available across all workspaces, add to your VS Code user
|
|
|
159
194
|
| `f5xc_terraform_get_schema_definition` | Get a schema definition from a spec |
|
|
160
195
|
| `f5xc_terraform_list_definitions` | List all definitions in a spec |
|
|
161
196
|
|
|
197
|
+
### Subscription Tier Tools
|
|
198
|
+
|
|
199
|
+
| Tool | Description |
|
|
200
|
+
|------|-------------|
|
|
201
|
+
| `f5xc_terraform_get_subscription_info` | Get subscription tier requirements for resources |
|
|
202
|
+
| `f5xc_terraform_get_property_subscription_info` | Get property-level subscription tier indicators |
|
|
203
|
+
|
|
204
|
+
### Addon Service Tools
|
|
205
|
+
|
|
206
|
+
| Tool | Description |
|
|
207
|
+
|------|-------------|
|
|
208
|
+
| `f5xc_terraform_addon_list_services` | List available addon services with activation requirements |
|
|
209
|
+
| `f5xc_terraform_addon_check_activation` | Check if an addon service is activated for the tenant |
|
|
210
|
+
| `f5xc_terraform_addon_activation_workflow` | Get activation workflow and Terraform code for addons |
|
|
211
|
+
|
|
162
212
|
### Utility Tools
|
|
163
213
|
|
|
164
214
|
| Tool | Description |
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
page_title: "f5xc_dns_zone Data Source - terraform-provider-f5xc"
|
|
3
3
|
subcategory: "DNS"
|
|
4
4
|
description: |-
|
|
5
|
-
Manages
|
|
5
|
+
Manages DNS Zone in a given namespace. If one already exist it will give a error. in F5 Distributed Cloud.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# f5xc_dns_zone (Data Source)
|
|
9
9
|
|
|
10
|
-
Manages
|
|
10
|
+
Manages DNS Zone in a given namespace. If one already exist it will give a error. in F5 Distributed Cloud.
|
|
11
11
|
|
|
12
12
|
~> **Note** Please refer to [DNS Zone API docs](https://docs.cloud.f5.com/docs-v2/api/dns-zone) to learn more.
|
|
13
13
|
|
|
@@ -125,9 +125,9 @@ resource "f5xc_http_loadbalancer" "secure" {
|
|
|
125
125
|
# Example: Encrypt multiple certificate files using for_each
|
|
126
126
|
locals {
|
|
127
127
|
certificates = {
|
|
128
|
-
"server"
|
|
129
|
-
"client"
|
|
130
|
-
"ca"
|
|
128
|
+
"server" = "${path.module}/certs/server.key"
|
|
129
|
+
"client" = "${path.module}/certs/client.key"
|
|
130
|
+
"ca" = "${path.module}/certs/ca.key"
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
|
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
---
|
|
2
|
+
page_title: "Guide: Addon Service Activation"
|
|
3
|
+
subcategory: "Guides"
|
|
4
|
+
description: |-
|
|
5
|
+
Learn how to activate F5XC addon services using Terraform.
|
|
6
|
+
Covers Bot Defense, Client Side Defense, WAAP, and more.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Addon Service Activation
|
|
10
|
+
|
|
11
|
+
This guide walks you through activating F5 Distributed Cloud addon services using Terraform. By the end, you'll understand how to:
|
|
12
|
+
|
|
13
|
+
- **Check activation eligibility** - Determine if an addon can be activated
|
|
14
|
+
- **Activate self-service addons** - Bot Defense, Client Side Defense, etc.
|
|
15
|
+
- **Handle managed activation** - Services requiring sales contact
|
|
16
|
+
- **Monitor activation status** - Track subscription state changes
|
|
17
|
+
|
|
18
|
+
## Overview
|
|
19
|
+
|
|
20
|
+
F5 Distributed Cloud addon services are additional security and performance features that can be activated for your tenant. These include:
|
|
21
|
+
|
|
22
|
+
| Addon Service | Description | Tier Required |
|
|
23
|
+
| ------------------------------------ | --------------------------------------------- | ------------- |
|
|
24
|
+
| `f5xc-bot-defense-standard` | Protect applications from automated attacks | STANDARD |
|
|
25
|
+
| `f5xc-bot-defense-advanced` | Bot defense with advanced ML detection | ADVANCED |
|
|
26
|
+
| `f5xc-client-side-defense-standard` | Protect against Magecart and formjacking | STANDARD |
|
|
27
|
+
| `f5xc-waap-standard` | Web App and API Protection with API Discovery | STANDARD |
|
|
28
|
+
| `f5xc-waap-advanced` | WAAP with full API security features | ADVANCED |
|
|
29
|
+
| `f5xc-malicious-user-detection` | Identify malicious user behavior patterns | ADVANCED |
|
|
30
|
+
| `f5xc-synthetic-monitoring` | Monitor application availability | STANDARD |
|
|
31
|
+
|
|
32
|
+
### Activation Types
|
|
33
|
+
|
|
34
|
+
Addon services have different activation types that determine how they can be activated:
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
┌─────────────────────────────────────────────────────────────────────┐
|
|
38
|
+
│ Activation Types │
|
|
39
|
+
├─────────────────────────────────────────────────────────────────────┤
|
|
40
|
+
│ │
|
|
41
|
+
│ SELF-ACTIVATION │
|
|
42
|
+
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
|
43
|
+
│ │ Check Status │───►│ Create │───►│ Active │ │
|
|
44
|
+
│ │ (AS_NONE) │ │ Subscription │ │ (AS_SUBSCRIBED) │ │
|
|
45
|
+
│ └──────────────┘ └──────────────┘ └──────────────┘ │
|
|
46
|
+
│ User can activate directly via Terraform │
|
|
47
|
+
│ │
|
|
48
|
+
│ PARTIALLY MANAGED │
|
|
49
|
+
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
|
50
|
+
│ │ Check Status │───►│ Request │───►│ SRE Review │ │
|
|
51
|
+
│ │ (AS_NONE) │ │ Subscription │ │ (AS_PENDING) │ │
|
|
52
|
+
│ └──────────────┘ └──────────────┘ └──────┬───────┘ │
|
|
53
|
+
│ │ │
|
|
54
|
+
│ ┌──────▼───────┐ │
|
|
55
|
+
│ │ Active │ │
|
|
56
|
+
│ │ (AS_SUBSCRIBED) │ │
|
|
57
|
+
│ └──────────────┘ │
|
|
58
|
+
│ User initiates, SRE team processes │
|
|
59
|
+
│ │
|
|
60
|
+
│ FULLY MANAGED │
|
|
61
|
+
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
|
62
|
+
│ │ Contact │───►│ Sales │───►│ F5 Activates │ │
|
|
63
|
+
│ │ F5 Sales │ │ Agreement │ │ Addon │ │
|
|
64
|
+
│ └──────────────┘ └──────────────┘ └──────────────┘ │
|
|
65
|
+
│ Requires sales engagement │
|
|
66
|
+
│ │
|
|
67
|
+
└─────────────────────────────────────────────────────────────────────┘
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Prerequisites
|
|
71
|
+
|
|
72
|
+
Before you begin, ensure you have:
|
|
73
|
+
|
|
74
|
+
- **Terraform >= 1.0** - The F5XC provider requires Terraform 1.0 or later
|
|
75
|
+
- **F5 Distributed Cloud Account** - Sign up at <https://www.f5.com/cloud/products/distributed-cloud-console>
|
|
76
|
+
- **API Credentials** - Token or P12 certificate authentication configured
|
|
77
|
+
- **Appropriate Subscription Tier** - Most addon services require ADVANCED tier
|
|
78
|
+
|
|
79
|
+
### Authentication Setup
|
|
80
|
+
|
|
81
|
+
Configure one of these authentication methods via environment variables:
|
|
82
|
+
|
|
83
|
+
#### Option 1: API Token (Recommended for development)
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
export F5XC_API_URL="https://your-tenant.console.ves.volterra.io"
|
|
87
|
+
export F5XC_API_TOKEN="your-api-token"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
#### Option 2: P12 Certificate (Recommended for production)
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
export F5XC_API_URL="https://your-tenant.console.ves.volterra.io"
|
|
94
|
+
export F5XC_P12_FILE="/path/to/your-credentials.p12"
|
|
95
|
+
export F5XC_P12_PASSWORD="your-p12-password" # pragma: allowlist secret
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Quick Start
|
|
99
|
+
|
|
100
|
+
### Step 1: Clone the Repository
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
git clone https://github.com/robinmordasiewicz/terraform-provider-f5xc.git
|
|
104
|
+
cd terraform-provider-f5xc/examples/guides/addon-activation
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Step 2: Configure Your Deployment
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
cp terraform.tfvars.example terraform.tfvars
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Edit `terraform.tfvars` to enable the addon services you want to activate:
|
|
114
|
+
|
|
115
|
+
```hcl
|
|
116
|
+
# Enable Bot Defense activation
|
|
117
|
+
enable_bot_defense = true
|
|
118
|
+
|
|
119
|
+
# Enable Client Side Defense
|
|
120
|
+
enable_client_side_defense = false
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Step 3: Initialize and Apply
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
terraform init
|
|
127
|
+
terraform plan
|
|
128
|
+
terraform apply
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Checking Activation Eligibility
|
|
132
|
+
|
|
133
|
+
Before attempting to activate an addon service, check if it's available for your tenant.
|
|
134
|
+
|
|
135
|
+
### Using the Activation Status Data Source
|
|
136
|
+
|
|
137
|
+
```hcl
|
|
138
|
+
# Check if Bot Defense can be activated
|
|
139
|
+
data "f5xc_addon_service_activation_status" "bot_defense" {
|
|
140
|
+
addon_service = "f5xc-bot-defense-standard"
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
output "bot_defense_status" {
|
|
144
|
+
value = {
|
|
145
|
+
state = data.f5xc_addon_service_activation_status.bot_defense.state
|
|
146
|
+
can_activate = data.f5xc_addon_service_activation_status.bot_defense.can_activate
|
|
147
|
+
message = data.f5xc_addon_service_activation_status.bot_defense.message
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### State Values
|
|
153
|
+
|
|
154
|
+
| State | Description | Can Activate? |
|
|
155
|
+
| --------------- | ---------------------- | -------------------- |
|
|
156
|
+
| `AS_NONE` | Service not subscribed | Yes |
|
|
157
|
+
| `AS_PENDING` | Activation in progress | No (wait) |
|
|
158
|
+
| `AS_SUBSCRIBED` | Already active | Already done |
|
|
159
|
+
| `AS_ERROR` | Subscription error | No (contact support) |
|
|
160
|
+
|
|
161
|
+
### Querying Addon Service Details
|
|
162
|
+
|
|
163
|
+
```hcl
|
|
164
|
+
# Get detailed information about an addon service
|
|
165
|
+
data "f5xc_addon_service" "bot_defense" {
|
|
166
|
+
name = "f5xc-bot-defense-standard"
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
output "addon_details" {
|
|
170
|
+
value = {
|
|
171
|
+
display_name = data.f5xc_addon_service.bot_defense.display_name
|
|
172
|
+
tier = data.f5xc_addon_service.bot_defense.tier
|
|
173
|
+
activation_type = data.f5xc_addon_service.bot_defense.activation_type
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Self-Activation Workflow
|
|
179
|
+
|
|
180
|
+
For addon services with `self` activation type, you can activate directly via Terraform.
|
|
181
|
+
|
|
182
|
+
### Basic Self-Activation
|
|
183
|
+
|
|
184
|
+
```hcl
|
|
185
|
+
# Step 1: Check if we can activate
|
|
186
|
+
data "f5xc_addon_service_activation_status" "bot_defense" {
|
|
187
|
+
addon_service = "f5xc-bot-defense-standard"
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
# Step 2: Create subscription only if available
|
|
191
|
+
resource "f5xc_addon_subscription" "bot_defense" {
|
|
192
|
+
count = data.f5xc_addon_service_activation_status.bot_defense.can_activate && data.f5xc_addon_service_activation_status.bot_defense.state == "AS_NONE" ? 1 : 0
|
|
193
|
+
|
|
194
|
+
name = "bot-defense-subscription"
|
|
195
|
+
namespace = "system"
|
|
196
|
+
|
|
197
|
+
addon_service {
|
|
198
|
+
name = "f5xc-bot-defense-standard"
|
|
199
|
+
namespace = "shared"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
output "activation_result" {
|
|
204
|
+
value = length(f5xc_addon_subscription.bot_defense) > 0 ? "Activated" : "Not activated (check status)"
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Multiple Addon Activation
|
|
209
|
+
|
|
210
|
+
```hcl
|
|
211
|
+
locals {
|
|
212
|
+
# Define the addons you want to activate
|
|
213
|
+
addons_to_activate = [
|
|
214
|
+
"f5xc-bot-defense-standard",
|
|
215
|
+
"f5xc-client-side-defense-standard",
|
|
216
|
+
"f5xc-waap-standard",
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
# Check activation status for each
|
|
221
|
+
data "f5xc_addon_service_activation_status" "addons" {
|
|
222
|
+
for_each = toset(local.addons_to_activate)
|
|
223
|
+
addon_service = each.value
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
# Create subscriptions for available addons
|
|
227
|
+
resource "f5xc_addon_subscription" "addons" {
|
|
228
|
+
for_each = {
|
|
229
|
+
for addon in local.addons_to_activate :
|
|
230
|
+
addon => addon
|
|
231
|
+
if data.f5xc_addon_service_activation_status.addons[addon].can_activate && data.f5xc_addon_service_activation_status.addons[addon].state == "AS_NONE"
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
name = "${replace(replace(each.value, "f5xc-", ""), "-standard", "")}-subscription"
|
|
235
|
+
namespace = "system"
|
|
236
|
+
|
|
237
|
+
addon_service {
|
|
238
|
+
name = each.value
|
|
239
|
+
namespace = "shared"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## Waiting for Activation
|
|
245
|
+
|
|
246
|
+
Some addons may take time to activate, especially those with partial management. Here are patterns for handling this.
|
|
247
|
+
|
|
248
|
+
### Pattern 1: Using terraform_data with Precondition
|
|
249
|
+
|
|
250
|
+
```hcl
|
|
251
|
+
# Check status after subscription
|
|
252
|
+
data "f5xc_addon_service_activation_status" "bot_defense_status" {
|
|
253
|
+
addon_service = "f5xc-bot-defense-standard"
|
|
254
|
+
|
|
255
|
+
depends_on = [f5xc_addon_subscription.bot_defense]
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
# Validate activation succeeded
|
|
259
|
+
resource "terraform_data" "validate_activation" {
|
|
260
|
+
lifecycle {
|
|
261
|
+
precondition {
|
|
262
|
+
condition = data.f5xc_addon_service_activation_status.bot_defense_status.state == "AS_SUBSCRIBED"
|
|
263
|
+
error_message = "Bot Defense activation not yet complete. Current state: ${data.f5xc_addon_service_activation_status.bot_defense_status.state}"
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### Pattern 2: Using time_sleep for Simple Delays
|
|
270
|
+
|
|
271
|
+
```hcl
|
|
272
|
+
resource "f5xc_addon_subscription" "bot_defense" {
|
|
273
|
+
name = "bot-defense-subscription"
|
|
274
|
+
namespace = "system"
|
|
275
|
+
|
|
276
|
+
addon_service {
|
|
277
|
+
name = "f5xc-bot-defense-standard"
|
|
278
|
+
namespace = "shared"
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
# Wait for activation to propagate
|
|
283
|
+
resource "time_sleep" "wait_for_activation" {
|
|
284
|
+
depends_on = [f5xc_addon_subscription.bot_defense]
|
|
285
|
+
|
|
286
|
+
create_duration = "30s"
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
# Use the addon feature after waiting
|
|
290
|
+
resource "f5xc_http_loadbalancer" "with_bot_defense" {
|
|
291
|
+
depends_on = [time_sleep.wait_for_activation]
|
|
292
|
+
# ... configuration with bot defense enabled
|
|
293
|
+
}
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### Pattern 3: External Verification Script
|
|
297
|
+
|
|
298
|
+
For critical deployments, you may want to verify activation before proceeding:
|
|
299
|
+
|
|
300
|
+
```hcl
|
|
301
|
+
resource "null_resource" "verify_activation" {
|
|
302
|
+
depends_on = [f5xc_addon_subscription.bot_defense]
|
|
303
|
+
|
|
304
|
+
provisioner "local-exec" {
|
|
305
|
+
command = <<-EOT
|
|
306
|
+
for i in {1..30}; do
|
|
307
|
+
status=$(curl -s -H "Authorization: APIToken $F5XC_API_TOKEN" \
|
|
308
|
+
"$F5XC_API_URL/api/web/namespaces/system/addon_services/f5xc-bot-defense-standard/activation-status" \
|
|
309
|
+
| jq -r '.state')
|
|
310
|
+
if [ "$status" = "AS_SUBSCRIBED" ]; then
|
|
311
|
+
echo "Activation complete!"
|
|
312
|
+
exit 0
|
|
313
|
+
fi
|
|
314
|
+
echo "Waiting for activation... (attempt $i/30, status: $status)"
|
|
315
|
+
sleep 10
|
|
316
|
+
done
|
|
317
|
+
echo "Activation timeout"
|
|
318
|
+
exit 1
|
|
319
|
+
EOT
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
## Managed Activation Workflow
|
|
325
|
+
|
|
326
|
+
For addon services requiring sales contact, use Terraform to monitor status after F5 activates the service.
|
|
327
|
+
|
|
328
|
+
### Verifying Managed Addon Status
|
|
329
|
+
|
|
330
|
+
```hcl
|
|
331
|
+
# For managed addons, just check status (don't try to create subscription)
|
|
332
|
+
data "f5xc_addon_service_activation_status" "managed_addon" {
|
|
333
|
+
addon_service = "some_managed_addon"
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
output "managed_addon_status" {
|
|
337
|
+
value = {
|
|
338
|
+
active = data.f5xc_addon_service_activation_status.managed_addon.state == "AS_SUBSCRIBED"
|
|
339
|
+
message = data.f5xc_addon_service_activation_status.managed_addon.message
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
# Use conditional logic based on activation status
|
|
344
|
+
resource "f5xc_http_loadbalancer" "with_managed_feature" {
|
|
345
|
+
count = data.f5xc_addon_service_activation_status.managed_addon.state == "AS_SUBSCRIBED" ? 1 : 0
|
|
346
|
+
|
|
347
|
+
# Configuration that uses the managed addon feature
|
|
348
|
+
name = "lb-with-managed-addon"
|
|
349
|
+
namespace = "production"
|
|
350
|
+
# ... rest of configuration
|
|
351
|
+
}
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
## Using Addon Features
|
|
355
|
+
|
|
356
|
+
Once an addon is activated, you can use its features in your configurations.
|
|
357
|
+
|
|
358
|
+
### Bot Defense in HTTP Load Balancer
|
|
359
|
+
|
|
360
|
+
```hcl
|
|
361
|
+
resource "f5xc_http_loadbalancer" "with_bot_defense" {
|
|
362
|
+
depends_on = [f5xc_addon_subscription.bot_defense]
|
|
363
|
+
|
|
364
|
+
name = "my-protected-app"
|
|
365
|
+
namespace = "production"
|
|
366
|
+
|
|
367
|
+
domains = ["app.example.com"]
|
|
368
|
+
|
|
369
|
+
default_route_pools {
|
|
370
|
+
pool {
|
|
371
|
+
name = f5xc_origin_pool.backend.name
|
|
372
|
+
namespace = "production"
|
|
373
|
+
}
|
|
374
|
+
weight = 1
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
# Enable Bot Defense
|
|
378
|
+
bot_defense {
|
|
379
|
+
policy {
|
|
380
|
+
name = "my-bot-policy"
|
|
381
|
+
namespace = "shared"
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
http {
|
|
386
|
+
port = 80
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### Client Side Defense
|
|
392
|
+
|
|
393
|
+
```hcl
|
|
394
|
+
resource "f5xc_http_loadbalancer" "with_csd" {
|
|
395
|
+
depends_on = [f5xc_addon_subscription.client_side_defense]
|
|
396
|
+
|
|
397
|
+
name = "my-protected-app"
|
|
398
|
+
namespace = "production"
|
|
399
|
+
|
|
400
|
+
domains = ["app.example.com"]
|
|
401
|
+
|
|
402
|
+
# Enable Client Side Defense
|
|
403
|
+
enable_client_side_defense = true
|
|
404
|
+
|
|
405
|
+
# ... rest of configuration
|
|
406
|
+
}
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
## Troubleshooting
|
|
410
|
+
|
|
411
|
+
### Common Issues
|
|
412
|
+
|
|
413
|
+
#### Access denied when creating subscription
|
|
414
|
+
|
|
415
|
+
- Verify your API token has addon management permissions
|
|
416
|
+
- Check that your subscription tier supports the addon
|
|
417
|
+
|
|
418
|
+
#### Activation stuck in AS_PENDING
|
|
419
|
+
|
|
420
|
+
- For partially managed addons, contact F5 support
|
|
421
|
+
- For self-activation, wait and retry after a few minutes
|
|
422
|
+
|
|
423
|
+
#### State shows AS_ERROR
|
|
424
|
+
|
|
425
|
+
- Check F5XC console for detailed error messages
|
|
426
|
+
- Contact F5 support with your tenant ID
|
|
427
|
+
|
|
428
|
+
### Debugging Tips
|
|
429
|
+
|
|
430
|
+
```hcl
|
|
431
|
+
# Output detailed status for debugging
|
|
432
|
+
output "debug_addon_status" {
|
|
433
|
+
value = {
|
|
434
|
+
addon_service = "f5xc-bot-defense-standard"
|
|
435
|
+
state = data.f5xc_addon_service_activation_status.bot_defense.state
|
|
436
|
+
can_activate = data.f5xc_addon_service_activation_status.bot_defense.can_activate
|
|
437
|
+
message = data.f5xc_addon_service_activation_status.bot_defense.message
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
## Best Practices
|
|
443
|
+
|
|
444
|
+
1. **Always check eligibility first** - Use the activation status data source before attempting activation
|
|
445
|
+
2. **Use conditional resource creation** - Only create subscriptions when `can_activate` is true
|
|
446
|
+
3. **Handle dependencies properly** - Use `depends_on` to ensure addons are active before using features
|
|
447
|
+
4. **Monitor activation state** - For partially managed addons, monitor the state for completion
|
|
448
|
+
5. **Document addon requirements** - Clearly document which addons your configuration requires
|
|
449
|
+
|
|
450
|
+
## Complete Example
|
|
451
|
+
|
|
452
|
+
See the [addon-activation example](https://github.com/robinmordasiewicz/terraform-provider-f5xc/tree/main/examples/guides/addon-activation) for a complete, working Terraform configuration.
|
|
453
|
+
|
|
454
|
+
## Related Resources
|
|
455
|
+
|
|
456
|
+
- [f5xc_addon_service Data Source](../data-sources/addon_service)
|
|
457
|
+
- [f5xc_addon_service_activation_status Data Source](../data-sources/addon_service_activation_status)
|
|
458
|
+
- [f5xc_addon_subscription Resource](../resources/addon_subscription)
|
|
459
|
+
- [HTTP Load Balancer Resource](../resources/http_loadbalancer)
|
|
@@ -13,16 +13,16 @@ This guide extends the [basic HTTP Load Balancer guide](http-loadbalancer) with
|
|
|
13
13
|
|
|
14
14
|
By following this guide, you'll deploy an HTTP Load Balancer with **11 security controls**:
|
|
15
15
|
|
|
16
|
-
| Security Layer
|
|
17
|
-
|
|
18
|
-
| **Perimeter**
|
|
19
|
-
| **Perimeter**
|
|
20
|
-
| **Bot Defense**
|
|
21
|
-
| **Bot Defense**
|
|
22
|
-
| **Application**
|
|
23
|
-
| **Application**
|
|
24
|
-
| **Rate Control**
|
|
25
|
-
| **Data Protection** | Data Guard
|
|
16
|
+
| Security Layer | Feature | Protection |
|
|
17
|
+
| ------------------- | -------------------------- | ---------------------------------------------- |
|
|
18
|
+
| **Perimeter** | IP Reputation | Blocks known malicious IPs by threat category |
|
|
19
|
+
| **Perimeter** | Threat Mesh | Global threat intelligence sharing |
|
|
20
|
+
| **Bot Defense** | JavaScript Challenge | Client-side bot detection |
|
|
21
|
+
| **Bot Defense** | Malicious User Detection | Behavioral analysis and risk scoring |
|
|
22
|
+
| **Application** | Web Application Firewall | Blocks SQLi, XSS, and OWASP Top 10 |
|
|
23
|
+
| **Application** | Bot Protection Settings | Signature-based bot classification |
|
|
24
|
+
| **Rate Control** | Rate Limiting | Prevents abuse with configurable thresholds |
|
|
25
|
+
| **Data Protection** | Data Guard | Masks sensitive data (CC, SSN) in responses |
|
|
26
26
|
|
|
27
27
|
## Prerequisites
|
|
28
28
|
|
|
@@ -305,16 +305,16 @@ resource "f5xc_http_loadbalancer" "app" {
|
|
|
305
305
|
|
|
306
306
|
The IP Reputation service maintains a continuously-updated database of known malicious IP addresses. When enabled, requests from IPs matching configured threat categories are automatically blocked.
|
|
307
307
|
|
|
308
|
-
| Threat Category
|
|
309
|
-
|
|
310
|
-
| `SPAM_SOURCES`
|
|
311
|
-
| `WEB_ATTACKS`
|
|
312
|
-
| `BOTNETS`
|
|
313
|
-
| `SCANNERS`
|
|
314
|
-
| `PHISHING`
|
|
315
|
-
| `PROXY`
|
|
316
|
-
| `TOR_PROXY`
|
|
317
|
-
| `DENIAL_OF_SERVICE`
|
|
308
|
+
| Threat Category | Description |
|
|
309
|
+
| --------------------- | ------------------------------------ |
|
|
310
|
+
| `SPAM_SOURCES` | Known spam-sending IP addresses |
|
|
311
|
+
| `WEB_ATTACKS` | IPs involved in web-based attacks |
|
|
312
|
+
| `BOTNETS` | Command & control and infected hosts |
|
|
313
|
+
| `SCANNERS` | Reconnaissance, probes, brute force |
|
|
314
|
+
| `PHISHING` | Phishing and fraud operations |
|
|
315
|
+
| `PROXY` | Anonymous proxy services |
|
|
316
|
+
| `TOR_PROXY` | Tor exit nodes |
|
|
317
|
+
| `DENIAL_OF_SERVICE` | DoS and DDoS sources |
|
|
318
318
|
|
|
319
319
|
-> **Tip:** Start with all categories enabled, then selectively disable based on your application requirements. For example, disable `TOR_PROXY` if you need to support privacy-focused users.
|
|
320
320
|
|