Closed rapster83 closed 5 years ago
Hi @stefan-rapp ,
I tried things locally and wanna share my findings. Hope it could help you and clarify the next follow ups to unblock you.
read_scale
and secondary_replica_count
. Distinguishing them is the basic for we to go on the following. For example, you mentioned “…If I set the read_scale back to 0 in the Azure Portal manually…”, while please allow me to say the description is inaccurate. What you set is “secondary_replica_count” rather than “read_scale”;edition = Hyperscale
as what your config was.secondary_replica_count
property yet. As a summary, there are two follow ups as described from the above. I can regard them in my feature backlog.
Hope the above help clarify.
Hi @mybayern1974,
First, thank you for your reply and the helpful information. :-)
I tried to solve the problem with the parameter “read_scale
”, as there is no “secondary_replica_count
” yet. Also not in the Terraform Doc
“An argument named "secondary_replica_count" is not expected here.”
So that does not solve my problem. The module I implemented for Azure SQL DBs, creates several DBs with different Azure SQL Editions. As you mentioned in the Azure Documentation for the parameter “properties.readScale
” it is not available for Hyperscale
editions:
“If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for **Premium** and **Business Critical** databases.``” That was the reason why I want to have the
read_scale` disabled for Hyperscale edition DBs.
To explicitly set the “secondary_replica_count
” to 0 in the terraform input would be a great idea. Is there a feature request already, so a parameter will be supported with the next release of the Azure Provider for Terraform?
THX
@stefan-rapp , I would work on this "secondary_replica_count" feature aiming at the next release. Please stay tuned.
@stefan-rapp , I'd like to share with you some staged updates:
secondary_replica_count
configurable was newly enabled by Azure, in terms of programing, at the beginning of Sep, when the Go SDK did not cover that yet, so we will use the newly released Go SDK;Looking at the provider code, read_scale
is an optional attribute, but it defaults to false
. I would think that if this is optional terraform should not be setting it unless the user specifies a value.
@stefan-rapp , assume the issue has been fixed. Please expect it comes into being in v1.36.0
This has been released in version 1.36.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:
provider "azurerm" {
version = "~> 1.36.0"
}
# ... other configuration ...
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!
Community Note
Terraform (and AzureRM Provider) Version
Terraform v0.12.7
Affected Resource(s)
azurerm_sql_database
Terraform Configuration Files
Debug Output
~ read_scale = true -> false
Expected Behavior
Azure SQL Database should be created the the 'read scale' of 0, like the following screenshot illustrates. As the
read_scale
parameter is set tofalse
explicitly.Actual Behavior
Even if I set the parameter "
read_scale
" to 'false
' explicitly, the Azure SQL Database will be created with the value 'true
' as the following screenshot illustrates.If I set the
read_scale
back to 0 in the Azure Portal manually, no changes occur and the code works fine. Seems like there is a problem with theread_scale
parameter on initial creation of a SQL Database.Steps to Reproduce
terraform apply