-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
azurerm_kusto_database_principal Provider produced inconsistent result after apply when using Azure Function #7383
Comments
Just upgraded terraform to the latest (2.16) and issue still present,
|
So @szaroubi and I worked it out. The docs are wrong, and Microsoft probably aren't making it any easier for you guys (their ARM template refers to the client_id as the principalId which I would expect to be the objectId!). The correct incantation for adding an App is this: # add a service pricinipal (azure app registration) as an APP
# these are the values from the app registration:
# tenant: TENANT_ID
# client/app: CLIENT_ID (aka application id)
# objectid: OBJECT_ID
resource "azurerm_kusto_database_principal" "principal" {
resource_group_name = "myresourcegroup"
cluster_name = "mykustoadx"
database_name = "mydb"
role = "Viewer"
type = "App"
client_id = "TENANT_ID"
object_id = "CLIENT_ID"
} As you can see, the client_id wants the tenant ID, and the object_id wants the client ID, and the real app's object_id is not used at all. Clearly this is not correct/intuitive/sane. |
Seems the example of the doc also points out it. |
True, but any sane person will assume that's a typo or be entirely blind to it. It's quite natural to want to match client_id to client_id - this is intellisense in a nutshell. |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
azurerm_kusto_database_principal
Terraform Configuration Files
Expected Behavior
The Database Principal should be created for the Azure function
Actual Behavior
Steps to Reproduce
terraform apply
terraform apply -var="second_run=1"
Step 2 is due to the fact the the Azure Function needs to be created before it is added to Kusto
Important Factoids
If this is not a priority and you can easily explain how to fix this, I will be happy to try my luck at it
The text was updated successfully, but these errors were encountered: