Closed akselleirv closed 2 months ago
@akselleirv Thanks for reporting this crash and for attaching debug logs. I've fixed up several potential crashes including this one, and we'll push out a patch release early on Monday for this.
Thank you @manicminer for the quick fix!
Community Note
Terraform (and AzureAD Provider) Version
terraform v1.5.7
Affected Resource(s)
azuread_privileged_access_group_eligibility_schedule
Terraform Configuration Files
Debug Output
The first time the terraform files is applied: https://gist.github.com/akselleirv/a0307596843f5ffd18350866a7b8ba5b
The second time the terraform is applied: https://gist.github.com/akselleirv/1711a191372b187329d611a2d43d966f
The line it complains about: https://github.com/hashicorp/terraform-provider-azuread/blob/main/internal/services/identitygovernance/privileged_access_group_eligiblity_schedule_resource.go#L169
I guess it should not check the expiry date as that is probably nil when permanent_assignment = true ?
Expected Behavior
It should have been able to apply it without a crash.
Actual Behavior
It crashes but is able to create the resources with expiration type permanent:
Steps to Reproduce
terraform apply
(first crash)terraform apply
(complains about role assignment already existing)