terraform-provider-azuread
terraform-provider-azuread copied to clipboard
feat: allow data.azuread_application lookup using identifier_uri
This PR introduces a small feature to the azuread_application data source that allows us to get the application based on an identifying URI. This is a feature we would really like to use. It looks like this:
data "azuread_application" "example" {
identifier_uris = [
"api://example-app",
]
}
I've implemented it in a way where you can provide a list of one element to the identifier_uris field, instead of introducing another field called identifier_uri that is just a string, as I thought it might be easy to mix up the two fields, but would love some input on this. I added an error if more than one element is provided in identifier_uris.
Thanks for the review @manicminer, I rebased and added your suggestion 👍 It now looks like this:
data "azuread_application" "test" {
identifier_uri = "api://example-app"
}
Test results