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

azuread_group_role_management_policy does not work and result in Invalid policy when authentication context is setup #1605

Open
SuryenduB opened this issue Dec 26, 2024 · 0 comments

Comments

@SuryenduB
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritise this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritise the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureAD Provider) Version

Terraform v1.9.3
on windows_amd64

  • provider registry.terraform.io/hashicorp/azuread v3.0.2
  • provider registry.terraform.io/hashicorp/time v0.12.1

Affected Resource(s)

  • azuread_group_role_management_policy

Terraform Configuration Files

resource "azuread_group" "pimgroup1" {
  display_name            = "glob_gsec_pim_admins_roles_workplace"
  security_enabled        = true
  assignable_to_role      = true
  prevent_duplicate_names = true

}

resource "azuread_group" "pimapprover" {
  display_name            = "glob_gsec_pimapprovers"
  security_enabled        = true
  prevent_duplicate_names = true
}


resource "azuread_group_role_management_policy" "pimpolicy1" {
  group_id = split("/", azuread_group.pimgroup1.id)[2]
  role_id  = "member"

  activation_rules {
    maximum_duration                                   = "PT16H"
    require_justification                              = true
    require_ticket_info                                = true
    required_conditional_access_authentication_context = "c2"

  }


}


resource "azuread_privileged_access_group_eligibility_schedule" "example" {
  for_each        = toset(local.user_ids)
  group_id        = split("/", azuread_group.pimgroup1.id)[2]
  principal_id    = split("/", each.value)[2]
  assignment_type = "member"
  duration        = "P30D"
  justification   = "as requested"
}




Debug Output

https://gist.github.com/SuryenduB/0a81d846643fc653d1b8e9a773e69907

Panic Output

Expected Behavior

image Expected behaviour authentication to be set.

Actual Behavior

Authentication Context is not set.
image

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant