Skip to content
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

Relaxed validation for identifier_uri attribute in azuread_application_identifier_uri resource #1351

Merged
merged 2 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ func (r ApplicationIdentifierUriResource) Arguments() map[string]*pluginsdk.Sche
},

"identifier_uri": {
Description: "The user-defined URI that uniquely identifies an application within its Azure AD tenant, or within a verified custom domain if the application is multi-tenant",
Type: pluginsdk.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validation.IsAppUri,
Description: "The user-defined URI or URI-like string that uniquely identifies an application within its Azure AD tenant, or within a verified custom domain if the application is multi-tenant",
Type: pluginsdk.TypeString,
Required: true,
ForceNew: true,
// Extensive validation is intentionally avoided here, as the accepted values are undocumented, vary wildly and are
// different for each user depending on the tenant domain configuration, whether the application is used for SSO etc
ValidateFunc: validation.StringIsNotEmpty,
},
}
}
Expand Down
6 changes: 4 additions & 2 deletions internal/services/applications/application_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,10 @@ func applicationResource() *pluginsdk.Resource {
Type: pluginsdk.TypeSet,
Optional: true,
Elem: &pluginsdk.Schema{
Type: pluginsdk.TypeString,
ValidateFunc: validation.IsAppUri,
Type: pluginsdk.TypeString,
// Extensive validation is intentionally avoided here, as the accepted values are undocumented, vary wildly and are
// different for each user depending on the tenant domain configuration, whether the application is used for SSO etc
ValidateFunc: validation.StringIsNotEmpty,
},
},

Expand Down
Loading