terraform-provider-azurerm
terraform-provider-azurerm copied to clipboard
`azurerm_eventhub_namespace` issue with `public_network_access` filed
Is there an existing issue for this?
- [X] I have searched the existing issues
Community Note
- Please vote on this issue by adding a :thumbsup: 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 Version
1.2.2
AzureRM Provider Version
3.23
Affected Resource(s)/Data Source(s)
azurerm_eventhub_namespace
Terraform Configuration Files
resource "azurerm_eventhub_namespace" "example" {
name = "example-namespace"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
sku = "Standard"
capacity = 1
network_rulesets {
default_action = "Deny"
virtual_network_rule = []
ip_rule = []
public_network_access = true
}
tags = {
environment = "Production"
}
}
Debug Output/Panic Output
resource "azurerm_eventhub_namespace" "example":
public_network_access = true
An argument named "public_network_access" is not expected here
Expected Behaviour
An argument named "public_network_access" is not expected here
Actual Behaviour
No response
Steps to Reproduce
No response
Important Factoids
I tried removing the public_network_access filed from resource, that time i am seeing an issue like
Namespace Name: "primary-eventhub-xxx"): networkrulesets.NetworkRuleSetsClient#NamespacesCreateOrUpdateNetworkRuleSet: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="This update of networkRuleSets, sets zero IPRule and VirtualNetworkRules, and the DefaultAction is set to Deny. This would render the namespace resources inaccessible for data-plane requests. If the intention was to restrict data-plane requests to private links only, please set the PublicNetworkAccess property to true. Else either set the DefaultAction property to Allow OR add some allowed IPRules or VirtualNetworkRules in the update request. CorrelationId: 8d1c4468-a628-e2fd-5c2d-e22cbf6f803d"
References
The public_network_access is supported by latest version of provider. Terraform doc