Skip to content

Commit

Permalink
XDR-3403: Change the type of group_membership_claims (major)
Browse files Browse the repository at this point in the history
The default value has also been changed.
  • Loading branch information
Gerard Setho committed May 26, 2022
1 parent 0c514cb commit 399b142
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/azuread-application/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ variable "oauth2_implicit_flow_allow_access_token" {

variable "group_membership_claims" {
description = "Configures the `groups` claim issued in a user or OAuth 2.0 access token that the app expects. One of `None`, `SecurityGroup`, `DirectoryRole`, `ApplicationGroup`, or `All`."
type = string
default = null
type = set(string)
default = []
}

variable "owners" {
Expand Down
2 changes: 1 addition & 1 deletion modules/azuread-application/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ resource "azuread_application" "app" {
display_name = var.display_name
identifier_uris = var.identifier_uris

group_membership_claims = var.group_membership_claims == null ? [] : [var.group_membership_claims]
group_membership_claims = var.group_membership_claims
owners = var.owners

sign_in_audience = var.sign_in_audience
Expand Down
8 changes: 6 additions & 2 deletions modules/azuread-application/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,12 @@ variable "oauth2_implicit_flow_allow_access_token" {

variable "group_membership_claims" {
description = "Configures the `groups` claim issued in a user or OAuth 2.0 access token that the app expects. One of `None`, `SecurityGroup`, `DirectoryRole`, `ApplicationGroup`, or `All`."
type = string
default = null
type = set(string)
validation {
condition = can([for c in var.group_membership_claims : contains(["None", "SecurityGroup", "DirectoryRole", "ApplicationGroup", "All"], c)])
error_message = "Allowed values for input_parameter are \"None\", \"SecurityGroup\", \"DirectoryRole\", \"ApplicationGroup\" or \"All\"."
}
default = []
}

variable "owners" {
Expand Down

0 comments on commit 399b142

Please sign in to comment.