Open sruthikilari opened 5 months ago
Have tried using source content field as well instead of reading the command from blob, same error
resource "azurerm_kusto_script" "metricsdbnativeingestionpolicy" {
name = "metricsdbnativeingestionpolicy"
database_id = azurerm_kusto_database.database.id
continue_on_errors_enabled = true
force_an_update_when_value_changed = "first"
depends_on = [azurerm_kusto_cluster_principal_assignment.user, azurerm_user_assigned_identity.terraform, azurerm_kusto_cluster_principal_assignment.this, azurerm_kusto_cluster_principal_assignment.msi]
script_content = <<SCRIPT
.alter-merge cluster policy managed_identity "[{ 'ObjectId' : '${azurerm_user_assigned_identity.terraform.principal_id}', 'AllowedUsages' : 'NativeIngestion' }]"
SCRIPT
}
Is there an existing issue for this?
Community Note
Terraform Version
1.5.7
AzureRM Provider Version
3.52.0
Affected Resource(s)/Data Source(s)
azurerm_kusto_script
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Expecting policy to be added when I run ".show cluster policy managed identity" but it comes up blank
Actual Behaviour
The command fails through the script, but succeeds when I paste the same command in my database immediately after in portal
Steps to Reproduce
SP and user have both been added as AllDatabaseAdmin on the cluter and Admin on the database through Terraform
Important Factoids
No response
References
No response