I have Terraform and setting up Azure SQL database.
Currently Compute Hardware are defined as in Terraform:
requested_service_objective_name = "GP_S_Gen5_4"
This will configure Compute Hardware for Max vCores 4 and Min vCores 1.
I have need to configure min vCores as 0,5. If I set up 0.5 and then deploy Terraform with "GP_S_Gen5_4", I get automatically upgraded to Min vCores 1.
Is there anything I can do to configure size as 0,5 or is 1 actual min when deployed by Terraform?

The resource azurerm_mssql_database does not have an attribute to set max vcores, it is specified in the last part of the sku_name. So if you want to have more max vcores, increase the sku. Set min_capacity to the minimum amount of vcores that you would need. Set auto_pause_delay_in_minutes to force the database to go into pause mode after x minutes of inactivity. This variable should be 60 minutes or higher, you can also set it to -1, which would leave the database running on the minimum capacity.
I would not recommend using azurerm_mssql_elasticpool if you need a normal sql database, it has other purposes. See below or read the documentation:

Some general recommendations/guidelines:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With