SecurityScanConfigArgs

data class SecurityScanConfigArgs(val authentication: Output<SecurityScanConfigAuthenticationArgs>? = null, val blacklistPatterns: Output<List<String>>? = null, val displayName: Output<String>? = null, val exportToSecurityCommandCenter: Output<String>? = null, val maxQps: Output<Int>? = null, val project: Output<String>? = null, val schedule: Output<SecurityScanConfigScheduleArgs>? = null, val startingUrls: Output<List<String>>? = null, val targetPlatforms: Output<List<String>>? = null, val userAgent: Output<String>? = null) : ConvertibleToJava<SecurityScanConfigArgs>

A ScanConfig resource contains the configurations to launch a scan. To get more information about ScanConfig, see:

Example Usage

Scan Config Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const scannerStaticIp = new gcp.compute.Address("scanner_static_ip", {name: "scan-basic-static-ip"});
const scan_config = new gcp.compute.SecurityScanConfig("scan-config", {
displayName: "scan-config",
startingUrls: [pulumi&#46;interpolate`http://${scannerStaticIp&#46;address}`],
targetPlatforms: ["COMPUTE"],
});
import pulumi
import pulumi_gcp as gcp
scanner_static_ip = gcp.compute.Address("scanner_static_ip", name="scan-basic-static-ip")
scan_config = gcp.compute.SecurityScanConfig("scan-config",
display_name="scan-config",
starting_urls=[scanner_static_ip&#46;address&#46;apply(lambda address: f"http://{address}")],
target_platforms=["COMPUTE"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var scannerStaticIp = new Gcp.Compute.Address("scanner_static_ip", new()
{
Name = "scan-basic-static-ip",
});
var scan_config = new Gcp.Compute.SecurityScanConfig("scan-config", new()
{
DisplayName = "scan-config",
StartingUrls = new[]
{
scannerStaticIp.IPAddress.Apply(address => $"http://{address}"),
},
TargetPlatforms = new[]
{
"COMPUTE",
},
});
});
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
scannerStaticIp, err := compute.NewAddress(ctx, "scanner_static_ip", &compute.AddressArgs{
Name: pulumi.String("scan-basic-static-ip"),
})
if err != nil {
return err
}
_, err = compute.NewSecurityScanConfig(ctx, "scan-config", &compute.SecurityScanConfigArgs{
DisplayName: pulumi.String("scan-config"),
StartingUrls: pulumi.StringArray{
scannerStaticIp.Address.ApplyT(func(address string) (string, error) {
return fmt.Sprintf("http://%v", address), nil
}).(pulumi.StringOutput),
},
TargetPlatforms: pulumi.StringArray{
pulumi.String("COMPUTE"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Address;
import com.pulumi.gcp.compute.AddressArgs;
import com.pulumi.gcp.compute.SecurityScanConfig;
import com.pulumi.gcp.compute.SecurityScanConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var scannerStaticIp = new Address("scannerStaticIp", AddressArgs.builder()
.name("scan-basic-static-ip")
.build());
var scan_config = new SecurityScanConfig("scan-config", SecurityScanConfigArgs.builder()
.displayName("scan-config")
.startingUrls(scannerStaticIp.address().applyValue(_address -> String.format("http://%s", _address)))
.targetPlatforms("COMPUTE")
.build());
}
}
resources:
scannerStaticIp:
type: gcp:compute:Address
name: scanner_static_ip
properties:
name: scan-basic-static-ip
scan-config:
type: gcp:compute:SecurityScanConfig
properties:
displayName: scan-config
startingUrls:
- http://${scannerStaticIp.address}
targetPlatforms:
- COMPUTE

Import

ScanConfig can be imported using any of these accepted formats:

  • {{project}}/{{name}}

  • {{project}} {{name}}

  • {{name}} When using the pulumi import command, ScanConfig can be imported using one of the formats above. For example:

$ pulumi import gcp:compute/securityScanConfig:SecurityScanConfig default {{project}}/{{name}}
$ pulumi import gcp:compute/securityScanConfig:SecurityScanConfig default "{{project}} {{name}}"
$ pulumi import gcp:compute/securityScanConfig:SecurityScanConfig default {{name}}

Constructors

Link copied to clipboard
constructor(authentication: Output<SecurityScanConfigAuthenticationArgs>? = null, blacklistPatterns: Output<List<String>>? = null, displayName: Output<String>? = null, exportToSecurityCommandCenter: Output<String>? = null, maxQps: Output<Int>? = null, project: Output<String>? = null, schedule: Output<SecurityScanConfigScheduleArgs>? = null, startingUrls: Output<List<String>>? = null, targetPlatforms: Output<List<String>>? = null, userAgent: Output<String>? = null)

Properties

Link copied to clipboard

The authentication configuration. If specified, service will use the authentication configuration during scanning. Structure is documented below.

Link copied to clipboard
val blacklistPatterns: Output<List<String>>? = null

The blacklist URL patterns as described in https://cloud.google.com/security-scanner/docs/excluded-urls

Link copied to clipboard
val displayName: Output<String>? = null

The user provider display name of the ScanConfig.

Link copied to clipboard

Controls export of scan configurations and results to Cloud Security Command Center. Default value is ENABLED. Possible values are: ENABLED, DISABLED.

Link copied to clipboard
val maxQps: Output<Int>? = null

The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively. Defaults to 15.

Link copied to clipboard
val project: Output<String>? = null

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard

The schedule of the ScanConfig Structure is documented below.

Link copied to clipboard
val startingUrls: Output<List<String>>? = null

The starting URLs from which the scanner finds site pages.

Link copied to clipboard
val targetPlatforms: Output<List<String>>? = null

Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be used as a default. Each value may be one of: APP_ENGINE, COMPUTE.

Link copied to clipboard
val userAgent: Output<String>? = null

Type of the user agents used for scanning Default value is CHROME_LINUX. Possible values are: USER_AGENT_UNSPECIFIED, CHROME_LINUX, CHROME_ANDROID, SAFARI_IPHONE.

Functions

Link copied to clipboard
open override fun toJava(): SecurityScanConfigArgs