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

azure_cognitive_deployment - Changes model.version property from Required to Optional. #24264

Merged
merged 8 commits into from
Jan 23, 2024
Merged
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 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add a test for the new property?

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
Loading