hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.53k stars 4.61k forks source link

Support for enabling extensions for azurerm_postgresql_flexible_server_database #18265

Open MShekow opened 2 years ago

MShekow commented 2 years ago

Is there an existing issue for this?

Community Note

Description

As documented here, whoever administrates the Azure DB must explicitly put extensions on the "allow list" (so that database users can then install them via CREATE EXTENSION ... SQL command.

It seems that azurerm_postgresql_flexible_server_database lacks this ability to specify a list of allow-listed PostgreSQL extensions.

New or Affected Resource(s)/Data Source(s)

azurerm_postgresql_flexible_server_database

Potential Terraform Configuration

No response

References

No response

neil-yechenwei commented 2 years ago

Thanks for raising this issue. Seems this feature has been implemented by azurerm_postgresql_flexible_server_configuration

MShekow commented 2 years ago

Yes, you are right, thanks for pointing it out. May I suggest to add a small hint to the fact that this azurerm_postgresql_flexible_server_configuration module exists, somewhere on https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_flexible_server_database ? And likewise to all the other modules that have a corresponding ..._configuration module.

Amier3 commented 2 years ago

@MShekow

If you'd like, we'd welcome a PR to make this more clear for postgresql_flexible_server_database. I'd suggest just adding an example block for a simple configuration resource at the end of the example usage here.

goors commented 5 months ago

azurerm_postgresql_flexible_server_configuration is enabling extension for server and not database. Is there a way to have this enabled for actual database? I tried azurerm_postgresql_flexible_server_configuration and in fact it will enable for example extensions for server but not for database.