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

Not able to remove "assignment_review_settings" block in azuread_access_package_assignment_policy #1355

Closed
1 task done
kumar1708 opened this issue Apr 11, 2024 · 5 comments · Fixed by #1394
Closed
1 task done

Comments

@kumar1708
Copy link

kumar1708 commented Apr 11, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

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

Terraform Version

1.8.0

AzureRM Provider Version

3.81.0

Affected Resource(s)/Data Source(s)

assignment_review_settings

Terraform Configuration Files

resource "azuread_access_package_assignment_policy" "cloud_ops_basic_test_plans" {
  access_package_id = azuread_access_package.cloud_ops_basic_test_plans.id
  display_name      = "cloud-ops-basic-test-plans-assignment-policy"
  description       = "cloud ops Basic Test Plans assignment policy"

  requestor_settings {
    scope_type        = "AllExistingDirectorySubjects"
    requests_accepted = true
  }

  approval_settings {
    approval_required = true

    approval_stage {
      approval_timeout_in_days = 14

      primary_approver {
        object_id    = data.azuread_group.cloud_ops_admins.object_id
        subject_type = "groupMembers"
      }
    }
  }

}

Debug Output/Panic Output

Terraform Plan:

  # azuread_access_package_assignment_policy.cloud_ops_stakeholder will be updated in-place
  ~ resource "azuread_access_package_assignment_policy" "cloud_ops_stakeholder" {
        id                = "xxxxxxxxx"
        # (6 unchanged attributes hidden)

      ~ assignment_review_settings {
          - access_review_timeout_behavior  = "keepAccess" -> null
          - duration_in_days                = 6 -> null
          - enabled                         = true -> null
          - review_frequency                = "monthly" -> null
          - review_type                     = "Reviewers" -> null
            # (3 unchanged attributes hidden)

          - reviewer {
              - backup       = false -> null
              - object_id    = "xxxxxxxxx" -> null
              - subject_type = "singleUser" -> null
            }
        }

        # (2 unchanged blocks hidden)
    }

Expected Behaviour

assignment_review_settings should be removed without any error

Actual Behaviour

AccessPackageAssignmentPolicyClient.BaseClient.Put(): unexpected status 400
with OData error: AccessReviewWrongDurationForRecurrenceType: The access
review duration entered does not work with the selected review frequency ''.
The duration should be between 1 and 0.

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@rcskosir
Copy link

@kumar1708 Thanks for taking the time to open this issue. Since this issue is on the azuread_access_package_assignment_policy resource from the hashicorp/terraform-provider-azuread repository, I am going to move this issue to that repository.

@rcskosir rcskosir transferred this issue from hashicorp/terraform-provider-azurerm Apr 11, 2024
@kumar1708

This comment was marked as off-topic.

@kumar1708

This comment was marked as off-topic.

@kumar1708

This comment was marked as off-topic.

@kumar1708

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants