Skip to content

Commit 87249be

Browse files
authored
Add static_ip_scan field to google_security_scanner_scan_config (#18329)
1 parent aca6377 commit 87249be

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

mmv1/products/securityscanner/ScanConfig.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ samples:
4949
resource_id_vars:
5050
address_name: scan-ignore-http-ip
5151
scan_config_name: terraform-scan-config
52+
- name: scan_config_static_ip
53+
primary_resource_id: scan-config
54+
min_version: beta
55+
steps:
56+
- name: scan_config_static_ip
57+
min_version: beta
58+
resource_id_vars:
59+
address_name: scan-static-ip
60+
scan_config_name: terraform-scan-config
5261
properties:
5362
- name: name
5463
type: String
@@ -205,3 +214,9 @@ properties:
205214
- name: ignoreHttpStatusErrors
206215
type: Boolean
207216
description: Whether to keep scanning even if most requests return HTTP error codes.
217+
- name: staticIpScan
218+
type: Boolean
219+
description: |
220+
Whether the scan configuration has enabled static IP address scan feature.
221+
If enabled, the scanner will access applications from static IP addresses.
222+
min_version: beta
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
resource "google_compute_address" "scanner_static_ip" {
2+
provider = google-beta
3+
name = "{{index $.ResourceIdVars "address_name"}}"
4+
}
5+
6+
resource "google_security_scanner_scan_config" "{{$.PrimaryResourceId}}" {
7+
provider = google-beta
8+
display_name = "{{index $.ResourceIdVars "scan_config_name"}}"
9+
starting_urls = ["http://${google_compute_address.scanner_static_ip.address}"]
10+
target_platforms = ["COMPUTE"]
11+
static_ip_scan = true
12+
}

0 commit comments

Comments
 (0)