Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made google_document_ai_processor_default_version test ignore changes to version field #13781

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/7317.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
3 changes: 2 additions & 1 deletion google/resource_document_ai_processor_default_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ func resourceDocumentAIProcessorDefaultVersion() *schema.Resource {
Required: true,
ForceNew: true,
DiffSuppressFunc: projectNumberDiffSuppress,
Description: `The version to set`,
Description: `The version to set. Using 'stable' or 'rc' will cause the API to return the latest version in that release channel.
Apply 'lifecycle.ignore_changes' to the 'version' field to suppress this diff.`,
},
},
UseJSONNumber: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ resource "google_document_ai_processor" "processor" {

resource "google_document_ai_processor_default_version" "processor" {
processor = google_document_ai_processor.processor.id
version = "${google_document_ai_processor.processor.id}/processorVersions/pretrained-next"
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,
]
}
}
`, context)
}
12 changes: 10 additions & 2 deletions website/docs/r/document_ai_processor_default_version.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@ resource "google_document_ai_processor" "processor" {

resource "google_document_ai_processor_default_version" "processor" {
processor = google_document_ai_processor.processor.id
version = "${google_document_ai_processor.processor.id}/processorVersions/pretrained-next"
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,
]
}
}
```

Expand All @@ -51,7 +58,8 @@ The following arguments are supported:

* `version` -
(Required)
The version to set
The version to set. Using `stable` or `rc` will cause the API to return the latest version in that release channel.
Apply `lifecycle.ignore_changes` to the `version` field to suppress this diff.

* `processor` -
(Required)
Expand Down