Skip to content

Commit

Permalink
azure_cognitive_deployment - Changes model.version property from …
Browse files Browse the repository at this point in the history
…`Required` to `Optional`. (#24264)

* add `source` property and update doc

* test optional `version` property

* test optional `version` property

* Remove `source` from the update list.

* Remove `source` from doc.

* Update website/docs/r/cognitive_deployment.html.markdown

Co-authored-by: stephybun <steph@hashicorp.com>

---------

Co-authored-by: stephybun <steph@hashicorp.com>
  • Loading branch information
liuwuliuyun and stephybun authored Jan 23, 2024
1 parent 299aa66 commit 04c253b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (r CognitiveDeploymentResource) Arguments() map[string]*pluginsdk.Schema {

"version": {
Type: pluginsdk.TypeString,
Required: true,
Optional: true,
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,21 +142,21 @@ resource "azurerm_cognitive_account" "test" {
func (r CognitiveDeploymentTestResource) basic(data acceptance.TestData) string {
template := r.template(data, "OpenAI")
return fmt.Sprintf(`
%s
resource "azurerm_cognitive_deployment" "test" {
name = "acctest-cd-%d"
cognitive_account_id = azurerm_cognitive_account.test.id
model {
format = "OpenAI"
name = "text-embedding-ada-002"
version = "2"
format = "OpenAI"
name = "text-embedding-ada-002"
}
scale {
type = "Standard"
}
lifecycle {
ignore_changes = [model.0.version]
}
}
`, template, data.RandomInteger)
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/cognitive_deployment.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ A `model` block supports the following:

* `name` - (Required) The name of the Cognitive Services Account Deployment model. Changing this forces a new resource to be created.

* `version` - (Required) The version of Cognitive Services Account Deployment model.
* `version` - (Optional) The version of Cognitive Services Account Deployment model. If `version` is not specified, the default version of the model at the time will be assigned.

---

Expand Down

0 comments on commit 04c253b

Please sign in to comment.