-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Support for configuring public access for mysql_flexible_server #24641
Comments
Also facing this problem. And I also can't find a workaround? We have to manually go and disable that. |
@serbezki Hello! 🙋♂️ This is certainly not ideal, but a quick work-around I've been using while figuring out this resource is using a For example, at the end of my main.tf, I have a block that looks like this:
When it all gets done running, the Flexible server is there, and Public Access is disabled as expected. I understand that doing any Hopefully they'll get this baked into the module proper, but until then, hopefully this helps! |
+1 There are ways to set the checkbox of |
@JBodkin-Amphora I found a method by using the resource "azapi_resource_action" "allow_public_network_access" {
type = "Microsoft.DBforMySQL/flexibleServers@2023-06-30"
resource_id = azurerm_mysql_flexible_server.this.id
method = "PATCH"
body = {
properties = {
network = {
publicNetworkAccess = var.allow_public_network_access ? "Enabled" : "Disabled"
}
}
}
} |
We have a Azure Policy (from caf-enterprise-scale) in-place to prevent the creation of resources with public access, hence why I would like the ability to configure this in |
This functionality has been released in v3.105.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Fyi @tombuildsstuff, this doesn't seem to be completed. This seems to have been added to |
Reopened with new issue #26156 |
Is there an existing issue for this?
Community Note
Description
Currently
public_network_access_enabled
is set to computed, hence the value cannot be configured. This value can be configured when using public access connectivity method, to disable public access and use private link instead.I think these are the required changes but I can't run the acceptance tests to check.
JBodkin-Amphora@41bc37d
New or Affected Resource(s)/Data Source(s)
azurerm_mysql_flexible_server
Potential Terraform Configuration
References
No response
The text was updated successfully, but these errors were encountered: