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?
Set-AzSqlDatabase
Sets properties for a database, or moves an existing database into an elastic pool.
Syntax
PowerShell
PowerShell
Description
The Set-AzSqlDatabase cmdlet sets properties for a database in Azure SQL Database. This cmdlet can modify the service tier (Edition), performance level (RequestedServiceObjectiveName), and storage max size (MaxSizeBytes) for the database. In addition, you can specify the ElasticPoolName parameter to move a database into an elastic pool. If a database is already in an elastic pool, you can use the RequestedServiceObjectiveName parameter to move the database out of an elastic pool and into a performance level for single databases.
Examples
Example 1: Update a database to a Standard S0 database
PowerShell
This command updates a database named Database01 to a Standard S0 database on a server named Server01.
Example 2: Add a database to an elastic pool
PowerShell
This command adds a database named Database01 to the elastic pool named ElasticPool01 hosted on the server named Server01.
Example 3: Modify the storage max size of a database
This command updates a database named Database01 to set its max size to 1 TB.
Example 4: Update a existing General Purpose database to Hyperscale service tier
This command updates a database named Database01 from General Purpose to Hyperscale service tier.
Parameters
-AsJob
Run cmdlet in the background
-AutoPauseDelayInMinutes
The auto pause delay in minutes for database (serverless only), -1 to opt out
-BackupStorageRedundancy
The Backup storage redundancy used to store backups for the SQL Database. Options are: Local, Zone and Geo.
-ComputeGeneration
The compute generation to assign.
-ComputeModel
Computed model of Azure Sql database. Serverless or Provisioned
-Confirm
Prompts you for confirmation before running the cmdlet.
-DatabaseName
Specifies the name of the database.
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
-Edition
Specifies the edition for the database. The acceptable values for this parameter are:
-ElasticPoolName
Specifies name of the elastic pool in which to move the database.
-HighAvailabilityReplicaCount
The number of readonly secondary replicas associated with the database. For Hyperscale edition only.
-LicenseType
The license type for the Azure Sql database. Possible values are:
-MaintenanceConfigurationId
The Maintenance configuration id for the SQL Database.
-MaxSizeBytes
The maximum size of the Azure SQL Database in bytes.
-MinimumCapacity
The Minimal capacity that database will always have allocated, if not paused. For serverless Azure Sql databases only.
-NewName
The new name to rename the database to.
-ReadScale
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.
-RequestedServiceObjectiveName
Specifies the name of the service objective to assign to the database. For information about service objectives, see Azure SQL Database Service Tiers and Performance Levels in the Microsoft Developer Network Library.
-ResourceGroupName
Specifies the name of resource group to which the server is assigned.
-SecondaryType
The secondary type of the database if it is a secondary. Valid values are Geo and Named.
-ServerName
Specifies the name of the server that hosts the database.
-Tags
Key-value pairs in the form of a hash table. For example: @{key0=”value0″;key1=$null;key2=”value2″}
-VCore
The Vcore number for the Azure Sql database
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
-ZoneRedundant
The zone redundancy to associate with the Azure Sql Database
Inputs
String
Outputs
AzureSqlDatabaseModel
Related Links