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

Support for instance settings on azurerm_mssql_virtual_machine #15824

Closed
tbo-246 opened this issue Mar 14, 2022 · 6 comments · Fixed by #19123
Closed

Support for instance settings on azurerm_mssql_virtual_machine #15824

tbo-246 opened this issue Mar 14, 2022 · 6 comments · Fixed by #19123
Labels
enhancement service/mssql Microsoft SQL Server
Milestone

Comments

@tbo-246
Copy link

tbo-246 commented Mar 14, 2022

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 "+1" or "me too" comments, 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

Description

Option to supply SQL Instance_settings config block when using the azurerm_mssql_virtual_machine resource. When deploying a SQL Server VM in the portal, we have the option to set storage configuration which is supported in the resource. However, we can also set Instance settings which is not supported in the resource. These are the missing settings:

  • Server Collation (string)
  • MAXDOP (number)
  • Minimum server memory (MB) (number)
  • Maximum server memory (MB) (number)
  • Optimize for ad-hoc workload (bool)

New or Affected Resource(s)

  • azurerm_mssql_virtual_machine

Potential Terraform Configuration

resource "azurerm_mssql_virtual_machine" "example" {
  virtual_machine_id               = data.azurerm_virtual_machine.example.id
  sql_license_type                 = "PAYG"
  r_services_enabled               = true
  sql_connectivity_port            = 1433
  sql_connectivity_type            = "PRIVATE"
  sql_connectivity_update_password = "Password1234!"
  sql_connectivity_update_username = "sqllogin"

  auto_patching {
    day_of_week                            = "Sunday"
    maintenance_window_duration_in_minutes = 60
    maintenance_window_starting_hour       = 2
  }

  instance_settings {
    collation         = "SQL_Latin1_General_CP1_CI_AS"
    maxdop            = 0
    min_server_memory = 0
    max_server_memory = 2147483647
    adhoc_workload    = false
  }
}

References

@myc2h6o
Copy link
Contributor

myc2h6o commented Jun 9, 2022

collation is not returned in response after an update of the resource, and we are not able to compare the current collation with the new one. I've opened an issue under Azure/azure-rest-api-specs#19387

@dsiperek-vendavo
Copy link

dsiperek-vendavo commented Sep 13, 2022

This provider needs to have Instance settings! We are not using the provider because of this!

@myc2h6o
Copy link
Contributor

myc2h6o commented Nov 3, 2022

@dsiperek-vendavo sorry for the delay. I've created #19123 to add the support for this.

@github-actions github-actions bot added this to the v3.31.0 milestone Nov 6, 2022
@dsiperek-vendavo
Copy link

THANKS

@github-actions
Copy link

This functionality has been released in v3.31.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement service/mssql Microsoft SQL Server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants