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

Resource azurerm_cognitive_account_rai_policy requires severity_threshold where does not have an effect #28653

Open
1 task done
davidjbng opened this issue Jan 31, 2025 · 0 comments

Comments

@davidjbng
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

While transitioning from azapi_resource to azurerm_cognitive_account_rai_policy I noticed the severity_threshold attribute in is required although it does not seem to have any effect for the following content filter types:

Jailbreak
Indirect Attack
Protected Material Text
Protected Material Code

Azure OpenAI Service

Looking at the Azure OpenAi settings it does not seem possible to specify values for these filters:
Image
Image

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.10.5

AzureRM Provider Version

4.17.0

Affected Resource(s)/Data Source(s)

azurerm_cognitive_account_rai_policy

Terraform Configuration Files

resource "azurerm_cognitive_account_rai_policy" "content_filter_policy" {
  content_filter {
    name               = "Jailbreak" # or "Indirect Attack", "Protected Material Text", "Protected Material Code"
    filter_enabled     = true
    block_enabled      = true
    # severity_threshold = "High" <- value required in provider but not used in azure
    source             = "Prompt"
  }
}

Debug Output/Panic Output

2025-01-31T16:22:07.374+0100 [DEBUG] provider: plugin exited
2025-01-31T16:22:07.390+0100 [ERROR] vertex "module.azure_openai.azurerm_cognitive_account_rai_policy.content_filter_policy" error: Missing required argument
2025-01-31T16:22:07.398+0100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-01-31T16:22:07.398+0100 [INFO]  provider: plugin process exited: plugin=.terraform/providers/registry.terraform.io/hashicorp/kubernetes/2.35.1/darwin_arm64/terraform-provider-kubernetes_v2.35.1_x5 id=98966
2025-01-31T16:22:07.398+0100 [DEBUG] provider: plugin exited
╷
│ Error: Missing required argument
│ 
│   on ../modules/azure-openai/azure-openai.tf line 94, in resource "azurerm_cognitive_account_rai_policy" "content_filter_policy":
│   94:   content_filter {
│ 
│ The argument "severity_threshold" is required, but no definition was found.
╵
2025-01-31T16:22:07.448+0100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-01-31T16:22:07.449+0100 [INFO]  provider: plugin process exited: plugin=.terraform/providers/registry.terraform.io/hashicorp/azurerm/4.17.0/darwin_arm64/terraform-provider-azurerm_v4.17.0_x5 id=98968
2025-01-31T16:22:07.449+0100 [DEBUG] provider: plugin exited

Expected Behaviour

severity_threshold is not required for content_filter with names:

  • Jailbreak
  • Indirect Attack
  • Protected Material Text
  • Protected Material Code

Actual Behaviour

severity_threshold is required for all content_filter names

Steps to Reproduce

No response

Important Factoids

No response

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants