hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.52k stars 4.6k forks source link

Support for disableLocalAuth for azurerm_cosmosdb_sql_database #23188

Open mariussm opened 1 year ago

mariussm commented 1 year ago

Is there an existing issue for this?

Community Note

Description

I would like to be able to enforce Azure RBAC for the dataplane for cosmosdb account:

https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-setup-rbac#use-azure-resource-manager-templates

New or Affected Resource(s)/Data Source(s)

azurerm_cosmosdb_sql_database

Potential Terraform Configuration

data "azurerm_cosmosdb_account" "example" {
  name                = "tfex-cosmosdb-account"
  resource_group_name = "tfex-cosmosdb-account-rg"
}

resource "azurerm_cosmosdb_sql_database" "example" {
  name                = "tfex-cosmos-sql-db"
  resource_group_name = data.azurerm_cosmosdb_account.example.resource_group_name
  account_name        = data.azurerm_cosmosdb_account.example.name
  throughput          = 400
  disable_local_auth  = true
}

References

https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-setup-rbac

SebSa commented 1 year ago

Doesn't look like it's supported by the cosmos api at the database level yet?

leonardovillela commented 6 months ago

Isn't this supported by the local_authentication_disabled input?