-
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
Update property name for kusto database principal #7407
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @neil-yechenwei
Thanks for this PR.
It appears that when the resource was introduced the properties were incorrectly named for the structure they're being used to create. I think object_id
is appropriate, but client_id
is the misleading item in this case, as it's being used to specify the tenant_id
portion of the AAD Principal.
I think we should add a schema entry for the principal string itself (with appropriate parse/validation) to deprecate and eventually replace type
, client_id
and object_id
, rather than trying to unpick this by renaming attributes and adding to the confusion. The new attribute, and the attributes being deprecated will need to be set to Optional
, and still supported/used if specified as they are now to prevent breaking change to existing usage.
@neil-yechenwei @jackofallops Another proposal. We could add a whole new resource Why? Because at the time of writing the Proposal: resource "azurerm_database_principal_assignment" "example" {
"principal_id" = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" // user email, application ID, or security group name.
"principal_type" = "App" // Possible values include: 'App', 'Group', 'User'
"role" = "Viewer" // Possible values include: 'Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewers', 'Viewer'
"tenant_id" = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
} Why not replacing everything within the current implementation?
The same design could be applied to a new |
fqn = fmt.Sprintf("aaduser=%s;%s", objectID, clientID) | ||
fqn = fmt.Sprintf("aaduser=%s;%s", clientID, tenantID) | ||
case "Group": | ||
fqn = fmt.Sprintf("aadgroup=%s;%s", objectID, clientID) | ||
fqn = fmt.Sprintf("aadgroup=%s;%s", clientID, tenantID) | ||
case "App": | ||
fqn = fmt.Sprintf("aadapp=%s;%s", objectID, clientID) | ||
fqn = fmt.Sprintf("aadapp=%s;%s", clientID, tenantID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reasoning behind changing the FQDN format here? as a client belongs in a tenant should it be tenant/client not client/tenant? this will change ther esource id and break existing users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i missed the above review from an old tab in changed - i like the proposal for a new resource and deprecating the old one entirely (and maybe adding notes in the docs & resource/property deprecation messages about the confusion
I've now created a PR for my resource proposal: Please take a look and let me know what you think about it. Deprecation of the current resource is still open, but would be also part of the PR. |
Thanks @jrauschenbusch - That feels like a more comprehensive way to handle the issue; as renaming of the schema here to correct an unfortunate earlier mis-naming feels unwieldy and likely to cause confusion. I'm going to close this in favour of your new resource on the newer API. |
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! |
fixes #7383