Open rohernan opened 1 year ago
Thanks for reporting @rohernan. This is an unusual one, would you be able to obtain and send a debug log? This will show the full API request and response which will aid in investigating this. You can post it in a gist and link it here if it's lengthy. Thanks!
Thanks for the update! The debug logs are here: https://gist.github.com/rohernan/89e7c6ca66874e2aa80c0bf6578d2c14
@rohernan That's great, thanks. We'll have to try to infer what that response is supposed to mean, since it's both undocumented and noncompliant (no Location header). Do you perhaps already have a custom role having the same display name?
@rohernan That's great, thanks. We'll have to try to infer what that response is supposed to mean, since it's both undocumented and noncompliant (no Location header). Do you perhaps already have a custom role having the same display name?
This is the first time they are creating a new custom directory role and it is still unique across az resource custom roles as well.
@rohernan That's great, thanks. We'll have to try to infer what that response is supposed to mean, since it's both undocumented and noncompliant (no Location header). Do you perhaps already have a custom role having the same display name?
Good morning. I'm now experiencing a similar issue when attempting to retrieve an existing AAD group when attempting to utilize azurerm_role_assignment with both display name and objectId:
@rohernan Very interesting - many thanks for the feedback, I'll look into this further and try find out what the responses are supposed to be doing.
Good morning! Following up on this as I just tried again and am still receiving the 302 error.
Update I just found a relatively similar issue reported: https://github.com/hashicorp/terraform-provider-azuread/issues/588
Changed the provider to 1.6.0 and I can create AAD groups and reference existing groups now! I'm not able to utilize the security_enabled attribute but this will get my guy moving forward!
Thanks!
Community Note
Terraform (and AzureAD Provider) Version
tf - v1.3.5 azuread - v2.41.0
Affected Resource(s)
azuread_custom_directory_role
Terraform Configuration Files
Debug Output
[ERROR] provider.terraform-provider-azuread_v2.41.0_x5.exe: Response contains error diagnostic: @module=sdk.proto diagnostic_detail="RoleDefinitionsClient.BaseClient.Post(): unexpected status 302 received with no body" tf_proto_version=5.3 tf_provider_addr=provider tf_rpc=ApplyResourceChange diagnostic_severity=ERROR diagnostic_summary="Creating custom directory role "
<Redacted>
" tf_req_id=e9baeda5-da4a-b191-f396-94bed09e3cec tf_resource_type=azuread_custom_directory_role @caller=github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/internal/diag/diagnostics.go:55 timestamp=2023-09-14T16:57:45.444-0400Expected Behavior
The Custom Directory Role should have been provisioned.
Actual Behavior
An error was returned:
RoleDefinitionsClient.BaseClient.Post(): unexpected status 302 received with no body
Steps to Reproduce
terraform plan -out main.tfplan -var-file serviceprincipal-admins.tfvars
terraform apply main.tfplan
Important Factoids
Operating in Azure Government.
References