hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io/
Other
42.48k stars 9.51k forks source link

Azure Sql Server unable to set the TLS version & Public network access setring using Terraform. Also Sql Database license_type unable to set #29476

Closed HarryKishore closed 3 years ago

HarryKishore commented 3 years ago

Terraform Version

...
```Terraform version 2.53
To compile 12.31

### Terraform Configuration Files
<!--
Paste the relevant parts of your Terraform configuration between the ``` marks below.

For Terraform configs larger than a few resources, or that involve multiple files, please make a GitHub repository that we can clone, rather than copy-pasting multiple files in here. For security, you can also encrypt the files using our GPG public key at https://www.hashicorp.com/security.
-->

```resource "azurerm_sql_server" "dasSqlSer" {
  name                         = "sql-${var.sub}-${var.location["***"].code}-${var.prj}${var.env}-01"
  location                     = var.location["***"].region
  resource_group_name          = azurerm_resource_group.resourceGroup***.name
  version                      = "12.0"
  administrator_login          = var.db_admin_username
  administrator_login_password = #######
  public_network_access = "Disabled"
  minimum_tls_version          = "1.2"
}
Error: An argument named "minimal-tls-version" is not expected here.

resource "azurerm_sql_database" "dasDB" {
  name                              = "sqd-${var.sub}-${var.location["***"].code}-${var.prj}${var.env}db-${var.instance}"
  location                          = var.location["***"].region
  resource_group_name               = azurerm_resource_group.resourceGroup***.name
  server_name                       = azurerm_sql_server.dasSqlSer.name
  #edition                           = "Hyperscale"
  requested_service_objective_name  = "HS_Gen5_2"
  max_size_bytes                    = "-1"
  collation                         = "SQL_Latin1_General_CP1_CI_AS"
  license_type = "base_price"
  }
Unable to set the license_type

Error: An argument named "license_type" is not expected here.
...

Debug Output

Crash Output

Expected Behavior

Actual Behavior

Steps to Reproduce

Additional Context

References

HarryKishore commented 3 years ago

│ Error: Unsupported argument │ │ on -main.tf line 73, in resource "azurerm_sql_server" "dasSqlSer": │ public_network_access = "Disabled" │ │ An argument named "public_network_access" is not expected here. ╵ ╷ │ Error: Unsupported argument │ │ on -main.tf line 74, in resource "azurerm_sql_server" "dasSqlSer": minimum_tls_version = "1.2"

HarryKishore commented 3 years ago

Hi Team, Please let me know what settings we could use for Azure Sql server for TLS setting using Terraform. Also what setting we could use for Azure Sql database for license_type to set to "base_price"

jbardin commented 3 years ago

Hello,

This appears to be an issue or question with the AzureRM provider, not with Terraform itself. You can see existing issues and file a new one in their repository here: https://github.com/terraform-providers/terraform-provider-azurerm/issues. If you have questions about Terraform or the AzureRM provider, it's better to use the community forum where there are more people ready to help. The GitHub issues here are monitored only by our few core maintainers.

Thanks!

github-actions[bot] commented 3 years ago

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.