- release_tracks: [ALPHA, GA]
  command_type: GENERIC
  help_text:
    brief: Create a Cloud Security Command Center (SCC) IaC Validation Report.
    description: |
      Create a  Cloud Security Command Center (SCC) IaC Validation Report. First argument is the
      parent of the IaC defined in the plan file. It is followed by path of the terraform plan
      file in JSON format.

      LRO operation ID is returned as the response of the command.
    examples: |
     Create an Iac Validation report on parent `organizations/123/locations/global`:

        $ {command} organizations/123/locations/global --tf-plan-file=planFile.json

  request:
    collection: securityposture.organizations.locations.reports
    disable_resource_check: true
    api_version: v1alpha
    method: createIaCValidationReport
    GA:
      api_version: v1

  arguments:
    params:
    - arg_name: parent
      api_field: parent
      is_positional: true
      required: true
      help_text: |
        Name of the organization where IaC Validation Report is to be created. Format:
        organizations/<organizationID>/locations/<location>

    - arg_name: tf-plan-file
      api_field: createIaCValidationReportRequest.iac.tfPlan
      required: true
      type: "googlecloudsdk.calliope.arg_parsers:FileContents:"
      processor: googlecloudsdk.command_lib.scc.hooks:ProcessTFPlanFile
      help_text: |
        Path to a JSON file containing the IaC plan to be validated.

  async:
    collection: securityposture.organizations.locations.operations
    extract_resource_result: false

  output:
    format: multi(response:format=yaml)
