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_api_management_product does not respect subscriptions_limit being 0 #28101

Open
1 task done
crispinboylan-int opened this issue Nov 25, 2024 · 3 comments · May be fixed by #28133
Open
1 task done

azurerm_api_management_product does not respect subscriptions_limit being 0 #28101

crispinboylan-int opened this issue Nov 25, 2024 · 3 comments · May be fixed by #28133

Comments

@crispinboylan-int
Copy link

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 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.9.8

AzureRM Provider Version

4.10.0

Affected Resource(s)/Data Source(s)

azurerm_api_management_product

Terraform Configuration Files

resource "azurerm_api_management_product" "test" {
  product_id            = "test"
  api_management_name   = azurerm_api_management.this.name
  resource_group_name   = "test"
  display_name          = "Test"
  subscription_required = true
  subscriptions_limit   = 0
  approval_required     = false
  published             = true
}

Debug Output/Panic Output

-

Expected Behaviour

The maximum subscriptions should be set to 0 (which stops people from being able to create subscription keys on this subscription).

Actual Behaviour

The maximum subscriptions is shown as blank, and users can create as many subscriptions as they like on the product.

Steps to Reproduce

terragrunt apply

check product in api management, the max subscriptions will be blank

Important Factoids

No response

References

No response

@crispinboylan-int crispinboylan-int changed the title azurerm_api_management_product does not respect max subscriptions being 0 azurerm_api_management_product does not respect subscriptions_limit being 0 Nov 25, 2024
@sinbai
Copy link
Contributor

sinbai commented Nov 27, 2024

Hi @crispinboylan-int thanks for opening this issue. I assume that preventing people from creating subscription keys should just be setting subscription_required = false (not specify subscriptions_limit). Because requiring a subscription but setting it to 0 doesn't seem to make sense, correct?

@crispinboylan-int
Copy link
Author

the trouble with subscription_required=false is that this means there is no authentication required at all on the api.

@crispinboylan-int
Copy link
Author

regardless, its a valid thing in the ui to set subscription required to true and max subscriptions to 0, so i think terraform should allow it

sinbai added a commit to sinbai/terraform-provider-azurerm that referenced this issue Nov 28, 2024
sinbai added a commit to sinbai/terraform-provider-azurerm that referenced this issue Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants