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

azurerm_app_configuration_feature resource creates invalid feature flags when no filters are defined #13673

Closed
lennykean opened this issue Oct 8, 2021 · 3 comments · Fixed by #13771

Comments

@lennykean
Copy link

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

Terraform (and AzureRM Provider) Version

2.79.1

Affected Resource(s)

  • azurerm_app_configuration_feature

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp


resource "azurerm_app_configuration_feature" "test" {
  name  = "TestFlag"
}

Expected Behaviour

The resource should be created without any filters

Actual Behaviour

The resource is created with a Microsoft.Percentage filter and a value of zero, which isn't a valid feature flag.

@danmastrowcoles
Copy link

danmastrowcoles commented Oct 18, 2021

I think this might be caused by

value.Conditions.ClientFilters.Filters = append(value.Conditions.ClientFilters.Filters, PercentageFeatureFilter{

The Percentage filter is always added, an additional if statement could be added to check the model, similiar to the other filters. (Might also need to change the model as it always has a Percentage Parameter)

Unless this was intentional, but percentage filters should be optional?
Do you have any context on this @koikonom or could you assist us with this one?

@koikonom
Copy link
Contributor

Thanks @lennykean for opening this issue and @danmastrowcoles bringing this to my attention. I have opened a PR to address this issue #13771 .

@github-actions
Copy link

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 Nov 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants