@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
260 lines (259 loc) • 9.65 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* A ScanConfig resource contains the configurations to launch a scan.
*
* To get more information about ScanConfig, see:
*
* * [API documentation](https://cloud.google.com/security-scanner/docs/reference/rest/v1beta/projects.scanConfigs)
* * How-to Guides
* * [Using Cloud Security Scanner](https://cloud.google.com/security-scanner/docs/scanning)
*
* ## Example Usage
*
* ### Scan Config Basic
*
* ```typescript
* 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.interpolate`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:
*
* ```sh
* $ pulumi import gcp:compute/securityScanConfig:SecurityScanConfig default {{project}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:compute/securityScanConfig:SecurityScanConfig default "{{project}} {{name}}"
* ```
*
* ```sh
* $ pulumi import gcp:compute/securityScanConfig:SecurityScanConfig default {{name}}
* ```
*/
export declare class SecurityScanConfig extends pulumi.CustomResource {
/**
* Get an existing SecurityScanConfig resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SecurityScanConfigState, opts?: pulumi.CustomResourceOptions): SecurityScanConfig;
/**
* Returns true if the given object is an instance of SecurityScanConfig. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is SecurityScanConfig;
/**
* The authentication configuration.
* If specified, service will use the authentication configuration during scanning.
* Structure is documented below.
*/
readonly authentication: pulumi.Output<outputs.compute.SecurityScanConfigAuthentication | undefined>;
/**
* The blacklist URL patterns as described in
* https://cloud.google.com/security-scanner/docs/excluded-urls
*/
readonly blacklistPatterns: pulumi.Output<string[] | undefined>;
/**
* The user provider display name of the ScanConfig.
*/
readonly displayName: pulumi.Output<string>;
/**
* Controls export of scan configurations and results to Cloud Security Command Center.
* Default value is `ENABLED`.
* Possible values are: `ENABLED`, `DISABLED`.
*/
readonly exportToSecurityCommandCenter: pulumi.Output<string | undefined>;
/**
* The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively.
* Defaults to 15.
*/
readonly maxQps: pulumi.Output<number | undefined>;
/**
* A server defined name for this index. Format:
* `projects/{{project}}/scanConfigs/{{server_generated_id}}`
*/
readonly name: pulumi.Output<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* The schedule of the ScanConfig
* Structure is documented below.
*/
readonly schedule: pulumi.Output<outputs.compute.SecurityScanConfigSchedule | undefined>;
/**
* The starting URLs from which the scanner finds site pages.
*
*
* - - -
*/
readonly startingUrls: pulumi.Output<string[]>;
/**
* 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`.
*/
readonly targetPlatforms: pulumi.Output<string[] | undefined>;
/**
* 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`.
*/
readonly userAgent: pulumi.Output<string | undefined>;
/**
* Create a SecurityScanConfig resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: SecurityScanConfigArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering SecurityScanConfig resources.
*/
export interface SecurityScanConfigState {
/**
* The authentication configuration.
* If specified, service will use the authentication configuration during scanning.
* Structure is documented below.
*/
authentication?: pulumi.Input<inputs.compute.SecurityScanConfigAuthentication>;
/**
* The blacklist URL patterns as described in
* https://cloud.google.com/security-scanner/docs/excluded-urls
*/
blacklistPatterns?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The user provider display name of the ScanConfig.
*/
displayName?: pulumi.Input<string>;
/**
* Controls export of scan configurations and results to Cloud Security Command Center.
* Default value is `ENABLED`.
* Possible values are: `ENABLED`, `DISABLED`.
*/
exportToSecurityCommandCenter?: pulumi.Input<string>;
/**
* The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively.
* Defaults to 15.
*/
maxQps?: pulumi.Input<number>;
/**
* A server defined name for this index. Format:
* `projects/{{project}}/scanConfigs/{{server_generated_id}}`
*/
name?: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* The schedule of the ScanConfig
* Structure is documented below.
*/
schedule?: pulumi.Input<inputs.compute.SecurityScanConfigSchedule>;
/**
* The starting URLs from which the scanner finds site pages.
*
*
* - - -
*/
startingUrls?: pulumi.Input<pulumi.Input<string>[]>;
/**
* 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`.
*/
targetPlatforms?: pulumi.Input<pulumi.Input<string>[]>;
/**
* 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`.
*/
userAgent?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a SecurityScanConfig resource.
*/
export interface SecurityScanConfigArgs {
/**
* The authentication configuration.
* If specified, service will use the authentication configuration during scanning.
* Structure is documented below.
*/
authentication?: pulumi.Input<inputs.compute.SecurityScanConfigAuthentication>;
/**
* The blacklist URL patterns as described in
* https://cloud.google.com/security-scanner/docs/excluded-urls
*/
blacklistPatterns?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The user provider display name of the ScanConfig.
*/
displayName: pulumi.Input<string>;
/**
* Controls export of scan configurations and results to Cloud Security Command Center.
* Default value is `ENABLED`.
* Possible values are: `ENABLED`, `DISABLED`.
*/
exportToSecurityCommandCenter?: pulumi.Input<string>;
/**
* The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively.
* Defaults to 15.
*/
maxQps?: pulumi.Input<number>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* The schedule of the ScanConfig
* Structure is documented below.
*/
schedule?: pulumi.Input<inputs.compute.SecurityScanConfigSchedule>;
/**
* The starting URLs from which the scanner finds site pages.
*
*
* - - -
*/
startingUrls: pulumi.Input<pulumi.Input<string>[]>;
/**
* 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`.
*/
targetPlatforms?: pulumi.Input<pulumi.Input<string>[]>;
/**
* 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`.
*/
userAgent?: pulumi.Input<string>;
}