Skip to content
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

azurerm_mssql_database max_size_gb doesn't allow 100MB or 500MB values #28289

Open
1 task done
flcdrg opened this issue Dec 16, 2024 · 3 comments · May be fixed by #28334
Open
1 task done

azurerm_mssql_database max_size_gb doesn't allow 100MB or 500MB values #28289

flcdrg opened this issue Dec 16, 2024 · 3 comments · May be fixed by #28334
Assignees
Labels

Comments

@flcdrg
Copy link
Contributor

flcdrg commented Dec 16, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.9.8

AzureRM Provider Version

3.89.0

Affected Resource(s)/Data Source(s)

azurerm_mssql_database

Terraform Configuration Files

resource "azurerm_mssql_database" "database" {
  name        = "sqldb"
  server_id   = azurerm_mssql_server.mssql.id
  sku_name    = "Basic"
  max_size_gb = 0 # or 0.1 or 0.5
}

Debug Output/Panic Output

-

Expected Behaviour

It should be possible to specify 100MB or 500MB as a database size (as per the Azure Portal

Actual Behaviour

Error: expected max_size_gb to be in the range (1 - 4096), got 0

or

Error: Attribute must be a whole number, got 0.1

Steps to Reproduce

terraform plan

Important Factoids

No response

References

When using Azure Portal, you can specify 100MB which evaluates to maxBytes 104857600, or 500MB, which evaluates to maxBytes 524288000

@github-actions github-actions bot added service/mssql Microsoft SQL Server v/3.x labels Dec 16, 2024
@Chambras
Copy link
Contributor

Hi @flcdrg have you tried with the latest version? 3.89.0 is kind of old :)

@flcdrg
Copy link
Contributor Author

flcdrg commented Dec 16, 2024

Just tested with 3.117.0

Trying 0.1 results in validation error "Error: Attribute must be a whole number, got 0.1"
Trying 0 results in validation error "Error: expected max_size_gb to be in the range (1 - 4096), got 0"

@flcdrg
Copy link
Contributor Author

flcdrg commented Dec 16, 2024

And for good measure 4.14.0

Trying 0 results in validation error "Error: expected max_size_gb to be in the range (1 - 4096), got 0"
and trying 0.5 results in validation error "Error: Attribute must be a whole number, got 0.5"

So latest provider does not seem to help.

@catriona-m catriona-m self-assigned this Dec 17, 2024
sinbai added a commit to sinbai/terraform-provider-azurerm that referenced this issue Dec 18, 2024
@sinbai sinbai linked a pull request Dec 18, 2024 that will close this issue
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants