-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Failed to create Cognitive Service Account when qname_runtime_endpoint is not set #6343
Comments
This reverts commit 304c19a.
Hi all, I'm also running into this issue and was wondering what the status since the pull requests confuses me. I assume that by writing tests @johejo figured out that when we don't pass the qna_runtime_endpoint, terraform doesn't include this in the API. If that's the case, can we maybe try to simulate the API call directly and see if we get the same issue? |
@devedse - could you share you tf config? |
@katbyte , this is my config:
|
curious, is there a workaround? dummy URL for QNA maker? |
Terraform (and AzureRM Provider) Version terraform 0.12.28 I encountered the same error when creating the following "Bing.Search.v7" service, even though I added this (qna_runtime_endpoint = null) parameter to the resource module.
Error creating Cognitive Services Account "stock-news" (Resource Group "stock"): cognitiveservices.AccountsClient#Create: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="ApiPropertiesInvalid" Message="The given 'apiProperties' '{\r\n "qnaRuntimeEndpoint": ""\r\n}' is invalid. Validation errors: Property 'qnaRuntimeEndpoint' has not been defined and the schema does not allow additional properties. Path 'apiProperties.qnaRuntimeEndpoint'." |
Thanks for opening this issue. After tested, I found the issue still exists. So I submit a PR to fix this issue. |
This has been released in version 2.21.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.21.0"
}
# ... other configuration ... |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
Terraform (and AzureRM Provider) Version
v2.3.0 or newer
Affected Resource(s)
azurerm_cognitive_account
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
Successfully create cognitive account.
Actual Behavior
https://github.com/terraform-providers/terraform-provider-azurerm/blob/c916aa6db4142add1760a9b39bc668eb8b1dfcde/azurerm/internal/services/cognitive/resource_arm_cognitive_account.go#L156-L166
Caused by #5778.
The 'qnaRuntimeEndpoint' type is
*string
.If we assign a
""
usingutils.String
into 'qnaRuntimeEndpoint', we will get a""
in json by marshaling.We should use
d.GetOk("qname_runtime_endpoint")
and need to check if exists.https://github.com/Azure/azure-sdk-for-go/blob/b7d185716507a401293b9f6c303f6e9798c4cb1b/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/models.go#L258-L268
Steps to Reproduce
terraform apply
Important Factoids
References
qna_runtime_endpoint
property #5778The text was updated successfully, but these errors were encountered: