hashicorp / terraform-provider-azuread

Terraform provider for Azure Active Directory
https://registry.terraform.io/providers/hashicorp/azuread/latest/docs
Mozilla Public License 2.0
417 stars 283 forks source link

Relaxed validation for identifier_uri attribute in azuread_application_identifier_uri resource #1351

Closed kenchan0130 closed 2 months ago

kenchan0130 commented 3 months ago

Fix #1342 Related #951

I have tried to call API using various patterns.

Test case IsAppUri() Actual API Trail
(empty string) Invalid Invalid trail
www.example.com?query=param Invalid Invalid trail
this is invalid a url for app with patch! Invalid Invalid trail
arn:aws:iam::123456789012:user/johndoe Invalid Valid trail
valid-url_with-patch Invalid Valid trail
this is valid a url for app with patch Invalid Valid trail
www.example.com Invalid Valid trail

Based on these results, I found it difficult to define custom validation rules. Ultimately, since errors will occur in the API, I concluded that rigorous validation should be abandoned.

Therefore, I made changes to simplify the validation.