Commit 3ab979d
committed
feat: Add support for suppression rules in Aqua Security Terraform provider
Implementation:
Adds suppression rule CRUD resource and listing data source, wires them into the provider with new client endpoints and constants, plus docs, examples, tests, and refined credential handling.
- **Suppression Rules**:
- **Resource**: New `aquasec_suppression_rule` with CRUD, schema validations, and import (`aquasec/resource_suppression_rules.go`).
- **Data Source**: New `aquasec_suppression_rules` for listing/pagination (`aquasec/data_suppression_rules.go`).
- **Provider Wiring**: Registers resource/data source in `provider.go`.
- **Client**:
- Adds `SuppressionRule` models, enums, and helpers; implements `Get/List/Create/Update/Delete` via Supply Chain API (`client/suppression_rules.go`).
- Extends client init with `saasScpUrl`; adds supply-chain URLs and adjusts API-key auth mapping (`client/client.go`, `consts/consts.go`).
- **Utils**: New flatten/expand helpers for suppression rules (`aquasec/utils.go`).
- **Provider Config**: Trims/merges creds from file/env, prefers API key flow, updates validation paths (`aquasec/provider.go`).
- **Docs & Examples**: Adds docs for resource/data source and Terraform examples.
- **Tests**: Acceptance tests for resource and data source.1 parent 0a6066f commit 3ab979d
File tree
13 files changed
+2152
-28
lines changed- aquasec
- client
- consts
- docs
- data-sources
- resources
- examples
- data-sources/aquasec_suppression_rules
- resources/aquasec_suppression_rule
13 files changed
+2152
-28
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| 150 | + | |
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
| |||
184 | 186 | | |
185 | 187 | | |
186 | 188 | | |
| 189 | + | |
187 | 190 | | |
188 | 191 | | |
189 | 192 | | |
| |||
235 | 238 | | |
236 | 239 | | |
237 | 240 | | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
242 | 260 | | |
243 | 261 | | |
244 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
245 | 269 | | |
246 | 270 | | |
247 | 271 | | |
248 | 272 | | |
249 | 273 | | |
250 | 274 | | |
251 | 275 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
263 | 289 | | |
264 | 290 | | |
265 | 291 | | |
| |||
282 | 308 | | |
283 | 309 | | |
284 | 310 | | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
| 311 | + | |
295 | 312 | | |
296 | 313 | | |
297 | 314 | | |
| |||
309 | 326 | | |
310 | 327 | | |
311 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
312 | 338 | | |
313 | 339 | | |
314 | 340 | | |
| |||
0 commit comments