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

Incorrect type for percentage_filter_value in azurerm_app_configuration_feature #23258

Closed
1 task done
baximan opened this issue Sep 13, 2023 · 6 comments · Fixed by #23263
Closed
1 task done

Incorrect type for percentage_filter_value in azurerm_app_configuration_feature #23258

baximan opened this issue Sep 13, 2023 · 6 comments · Fixed by #23263

Comments

@baximan
Copy link

baximan commented Sep 13, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • 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 "+1" or "me too" comments, 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.5.7

AzureRM Provider Version

3.70.0

Affected Resource(s)/Data Source(s)

azurerm_app_configuration_feature

Terraform Configuration Files

There are 2 issues with percentage_filter_value:
1. Azurerm documentation mentions incorrect type. Should be `number` instead of `list of numbers`

2. Missing information on possible values for it. Tried using 0,1 and 2. No changes appear on Azure Portal. Please clarify what are the possible values and if it refers to the 'use feature filter' on the Portal.

resource "azurerm_app_configuration" "app_configuration" {
  name                = "app-config-1"
  resource_group_name = "rg-1"
  location            = "Canada Central"
  sku                 = "standard"
}

resource "azurerm_app_configuration_feature" "app_configuration_feature" {
  configuration_store_id  = azurerm_app_configuration.app_configuration.id
  description             = "mydescription"
  enabled                 = "true"
  label                   = "mylabel"
  name                    = "myname"
  percentage_filter_value = [1] // list of number like azurerm document mentions

  dynamic "targeting_filter" {
    default_rollout_percentage = "90"
  }
}

Debug Output/Panic Output

ERROR when using list of numbers: 

│   on ..\main.tf line 14, in resource "azurerm_app_configuration_feature" "app_configuration_feature":
│   96:   percentage_filter_value = [1]
│     ├────────────────
│     │ percentage_filter_value is a list of number
│
│ Inappropriate value for attribute "percentage_filter_value": number required.

Expected Behaviour

Expected behavior should be no error which is achieved by using attribute type as number.

Actual Behaviour

No response

Steps to Reproduce

  1. terraform plan the above config

Important Factoids

No response

References

No response

@teowa
Copy link
Contributor

teowa commented Sep 14, 2023

Hi @baximan , the Azurerm doc is wrong. From Azure doc, the percentage_filter_value should be a number, I have submit PR to fix the doc.

Thanks.

@baximan
Copy link
Author

baximan commented Sep 14, 2023

Thanks for confirming @teowa! Do you know what are the possible values and which field does it correspond to on Azure portal? It seems to be defaulting to zero and doesn't update anything on azure portal.

@teowa
Copy link
Contributor

teowa commented Sep 15, 2023

Hi @baximan , my config is:

resource "azurerm_app_configuration_feature" "test" {
  configuration_store_id = azurerm_app_configuration.appconf.id
  description            = "test description"
  name                   = "test-ackey"
  label                  = "test-ackeylabel"
  enabled                = true
  percentage_filter_value= 1
}

it corresponds to
image

image image

@baximan
Copy link
Author

baximan commented Sep 15, 2023

Hi @teowa ,

Okay! So, based on what you shared it's the % value for Custom Filter . Are you able to provision Custom or Targeting or Time window filter through Terraform? I'm unable to as azurerm is missing an attribute to enable Use filter feature
image

@teowa
Copy link
Contributor

teowa commented Sep 18, 2023

Hi @baximan , in azurerm, if either of percentage_filter_value, targeting_filter or timewindow_filter is specified, this means Use filter feature is enabled. Some examples on these fields can be found at

timewindow_filter {
start = "2019-11-12T07:20:50.52Z"
end = "2019-11-13T07:20:50.52Z"
}
targeting_filter {
default_rollout_percentage = 39
users = ["random", "user"]
groups {
name = "testgroup"
rollout_percentage = 50
}
groups {
name = "testgroup2"
rollout_percentage = 30
}
}

Copy link

github-actions bot commented May 6, 2024

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants