google_document_ai_processor_default_version

The default version for the processor. Deleting this resource is a no-op, and does not unset the default version.

Open in Cloud Shell

Example Usage - Documentai Default Version

resource "google_document_ai_processor" "processor" {
  location = "us"
  display_name = "test-processor"
  type = "OCR_PROCESSOR"
}

resource "google_document_ai_processor_default_version" "processor" {
  processor = google_document_ai_processor.processor.id
  version = "${google_document_ai_processor.processor.id}/processorVersions/stable"

  lifecycle {
    ignore_changes = [
      # Using "stable" or "rc" will return a specific version from the API; suppressing the diff.
      version,
    ]
  }
}

Argument Reference

The following arguments are supported:


Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

ProcessorDefaultVersion can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import ProcessorDefaultVersion using one of the formats above. For example:

import {
  id = "{{processor}}"
  to = google_document_ai_processor_default_version.default
}

When using the terraform import command, ProcessorDefaultVersion can be imported using one of the formats above. For example:

$ terraform import google_document_ai_processor_default_version.default {{processor}}