generated from hashicorp/terraform-provider-scaffolding-framework
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
Description
I try to create a conditional access authentication context. I use the following code:
resource "msgraph_update_resource" "authctx_pim_role_activation" {
url = "identity/conditionalAccess/authenticationContextClassReferences/c2"
api_version = "v1.0"
body = {
displayName = "Privileged Identity Management: Role Activation"
description = "This context is used to apply conditional access policies to Privileged Identity Management (PIM) activations."
isAvailable = true
}
}
However, apply fails with this error:
Error: Failed to read data source
│
│ with module.conditional_access.msgraph_update_resource.authctx_pim_role_activation,
│ on conditional_access/main.tf line 64, in resource "msgraph_update_resource" "authctx_pim_role_activation":
│ 64: resource "msgraph_update_resource" "authctx_pim_role_activation" {
│
│ GET
│ https://graph.microsoft.com/v1.0/identity/conditionalAccess/authenticationContextClassReferences/c2
│ --------------------------------------------------------------------------------
│ RESPONSE 201: 201 Created
│ ERROR CODE UNAVAILABLE
│ --------------------------------------------------------------------------------
│ {
│ "@odata.context": "[https://graph.microsoft.com/v1.0/$metadata#identity/conditionalAccess/authenticationContextClassReferences/$entity",](https://graph.microsoft.com/v1.0/$metadata#identity/conditionalAccess/authenticationContextClassReferences/$entity%22,)
│ "id": "c2",
│ "displayName": "Privileged Identity Management: Role Activation",
│ "description": "This context is used to apply conditional access policies to Privileged Identity Management (PIM) activations.",
│ "isAvailable": true
│ }
The authentication context was created successfully even though terraform reports an error.