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

Configure threads_per_core in subblock settings.advanced_machine_features for SQL Server #683

Open
arouxAgicap opened this issue Dec 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@arouxAgicap
Copy link

TL;DR

Hi !
It would be nice to be able to edit number of threads per core in a SQL Server instance on Cloud SQL.
As the subblock contains only on element we could define it like :

dynamic "advanced_machine_features" {
      for_each = var.threads_per_core == 1 ? [var.threads_per_core] : []
      content {
        threads_per_core = var.threads_per_core
      }
    }

and variable could be defined like this :

variable "threads_per_core" {
  description = "The number of threads per core. Can be 1 or 2. To disable SMT, set this flag to 1. Only for SQL Server instances"
  type = number
  default = 2
}

Terraform Resources

https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/sql_database_instance#threads_per_core-1

Detailed design

No response

Additional information

I had the occasion to test it locally without problem. If value set to 1 subblock is created. value isn't set, set to 2 or more, subblock is not created and default settings remains.

@arouxAgicap arouxAgicap added the enhancement New feature or request label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant