Open Gerrit-K opened 1 year ago
@Gerrit-K I didn't get any error about public_network_access_enabled
property. The network config is created as what's defined in config. Can you share your tf config with me?
public_network_access_enabled
is defined as optional + default and the default value is true. So, in theory, there won't be any error when creating the ehn.
@xiaxyi Thanks for your reply. I just played around with this a little bit and extracted an MRE from my (rather large and also partly confidential) tf file.
Some notes/observations:
*.tf.json
files, but not on *.tf
files directly"public_network_access_enabled": null,
to network_rulesets
, the error disappears (and the default of true
will be used)trusted_service_access_enabled
and virtual_network_rule
, which are both also optional, according to the documentation.trusted_service_access_enabled
and virtual_network_rule
are already set to null
, because CDKTF automatically does that. If the error is correct and to be expected when using JSON and omitting optional properties, I'll rather raise an issue at the CDKTF provider to simply add "public_network_access_enabled": null
when it's omitted in the TypeScript source code.I am facing the same issue with latest version and i created a issues - 18485, followed with suggestions but still having same issues
@sreekanth3107 no I don't think your issue is connected to this one. Yes, it's the same property, but most likely it was just the wrong property name in your tf file. For me it works with a HCL (not JSON!) file and public_network_access_enabled
.
this discrepancy between the documentation and azurerm provider behavior has been present since v3.21.0
edit:
here's some HCL code from my eventhub_namespace
resource
network_rulesets = [
{
default_action = "Deny"
trusted_service_access_enabled = false
ip_rule = null
virtual_network_rule = null
}
]
this is correctly configured according to the documentation, but as of v3.21.0, it no longer works. It works when I add public_network_access_enabled = null
but that's not clear from the documentation. Or am I missing something?
Is there an existing issue for this?
Community Note
Terraform Version
1.3.2
AzureRM Provider Version
3.26.0
Affected Resource(s)/Data Source(s)
azurerm_eventhub_namespace
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
No error, since the documentation states that
public_network_access_enabled
should be optional on both, the root resource andnetwork_rulesets
block levels.Actual Behaviour
Error, see "Debug output".
Steps to Reproduce
No response
Important Factoids
No response
References
No response