Method: organizations.locations.reports.createIaCValidationReport

Validates a specified infrastructure-as-code (IaC) configuration, and creates a Report with the validation results.

Only Terraform configurations are supported. Only modified assets are validated.

HTTP request

POST https://securityposture.googleapis.com/v1/{parent=organizations/*/locations/*}/reports:createIaCValidationReport

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The parent resource name, in the format organizations/{organization}/locations/global.

Request body

The request body contains data with the following structure:

JSON representation
{
  "iac": {
    object (IaC)
  }
}
Fields
iac

object (IaC)

Required. The infrastructure-as-code (IaC) configuration to validate.

Response body

If successful, the response body contains an instance of Operation.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • securityposture.reports.create

For more information, see the IAM documentation.

IaC

Details of an infrastructure-as-code (IaC) configuration.

JSON representation
{

  // Union field source can be only one of the following:
  "tfPlan": string
  // End of list of possible types for union field source.
}
Fields
Union field source. The IaC configuration to validate. source can be only one of the following:
tfPlan

string (bytes format)

Optional. A Terraform plan file, formatted as a stringified JSON object.

To learn how to generate a Terraform plan file in JSON format, see JSON output format in the Terraform documentation.

A base64-encoded string.