Skip to content

Conversation

@kenchan0130
Copy link
Contributor

@kenchan0130 kenchan0130 commented Aug 14, 2025

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

Description

Added deletion handling for azuread_directory_role_eligibility_schedule_request, which is automatically removed by the service after 45 days. This complements the previous support added in #1682.

# azuread_directory_role_eligibility_schedule_request.sample will be destroyed
  - resource "azuread_directory_role_eligibility_schedule_request" "sample" {
      - directory_scope_id = "/" -> null
      - id                 = "63d83de6-a801-f7c7-1caa-d749f927bc41" -> null
      - justification      = "Managed by Terraform" -> null
      - principal_id       = "f16915fb-a49e-cbfb-3ab9-3f30bdde3e5b" -> null
      - role_definition_id = "f16915fb-a49e-cbfb-3ab9-3f30bdde3e5b" -> null
    }

Plan: 0 to add, 0 to change, 1 to destroy.

azuread_directory_role_eligibility_schedule_request.sample: Destroying... [id=63d83de6-a801-f7c7-1caa-d749f927bc41]

│ Error: Retrieving Role Management Directory Role Eligibility Schedule Request (Unified Role Eligibility Schedule Request: "63d83de6-a801-f7c7-1caa-d749f927bc41")

│ unexpected status 404 (404 Not Found) with error:
│ RoleAssignmentRequestNotFound: The role assignment request is not found

Changes to existing Resource / Data Source

  • I have added an explanation of what my changes do and why I'd like you to include them (This may be covered by linking to an issue above, but may benefit from additional explanation).
  • I have written new tests for my resource or datasource changes & updated any relevant documentation.
    • It's difficult to wait 45 days, so testing cannot be performed.
  • I have successfully run tests with my changes locally. If not, please provide details on testing challenges that prevented you running the tests.
  • (For changes that include a state migration only). I have manually tested the migration path between relevant versions of the provider.

Testing

  • My submission includes Test coverage as described in the Contribution Guide and the tests pass. (if this is not possible for any reason, please include details of why you did or could not add test coverage)

Change Log

Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.

  • azuread_directory_role_eligibility_schedule_request - fix deletion logic about 45 days the request resources are purged by the service

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Related Issue(s)

#1682

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the provider.

Changes to Security Controls

n/a

Note

If this PR changes meaningfully during the course of review please update the title and description as required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant