-
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
azurerm_log_analytics_saved_search string function_parameters not correct format accepted #10989
Comments
If you want to have the format "typeArg:string="mail"" You'll need to escape the double quote (") around "mail" so like this Single quotes: "typeArg:string='mail'" also work |
That's the first thing I tried and it was not working then I looked at the validation function which enforces this regex: |
Apologies; I tried it the other day and it worked, now it's not. I was probably using my build, where I am modifying that regex to accept different parameters definitions to more accurately show what is possibly. The problem is including tabular definitions and then validating them. To validate it correctly is convoluted and it needs a lot of work to do it properly. But you're right it doesn't work and it should. |
Thanks for opening this issue. This was a problem in the 2.x version of the provider which is no longer actively maintained. |
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. |
Terraform (and AzureRM Provider) Version
Terraform v0.14.7
Your version of Terraform is out of date! The latest version
is 0.14.8. You can update by downloading from https://www.terraform.io/downloads.html
Affected Resource(s)
azurerm_log_analytics_saved_search
Terraform Configuration Files
Debug Output
Error: invalid value for function_parameters.1 (Log Analytics Saved Search Function Parameters must be in the following format: param-name1:type1=default_value1)
on config.tf line 16, in resource "azurerm_log_analytics_saved_search" "entity_function":
16: resource "azurerm_log_analytics_saved_search" "entity_function" {
Expected Behaviour
Terraform should accept variables of the following kind when string
function_parameters = ["typeArg:string="mail"","tagsArg:string="dc""]
or
function_parameters = ["typeArg:string='mail'","tagsArg:string='dc'"]
Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
azurerm_log_analytics_saved_search.entity_function: Creating...
azurerm_log_analytics_saved_search.entity_function: Creation complete after 2s [id=subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.OperationalInsights/workspaces/team-test-workspace/savedSearches/getentitylist]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Actual Behaviour
Error: invalid value for function_parameters.1 (Log Analytics Saved Search Function Parameters must be in the following format: param-name1:type1=default_value1)
on config.tf line 16, in resource "azurerm_log_analytics_saved_search" "entity_function":
16: resource "azurerm_log_analytics_saved_search" "entity_function" {
Steps to Reproduce
terraform apply
The text was updated successfully, but these errors were encountered: