terraform-provider-azuread
terraform-provider-azuread copied to clipboard
`azuread_claims_mapping_policy`: support the "description" property
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritise this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritise the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform (and AzureAD Provider) Version
❯ terraform -v
Terraform v1.1.8
on linux_amd64
+ provider [registry.terraform.io/hashicorp/azuread](http://registry.terraform.io/hashicorp/azuread) v2.20.0
+ provider [registry.terraform.io/hashicorp/azurerm](http://registry.terraform.io/hashicorp/azurerm) v3.1.0
Affected Resource(s)
azuread_claims_mapping_policy
Terraform Configuration Files
resource "azuread_claims_mapping_policy" "my_policy" {
definition = [
jsonencode(
{
ClaimsMappingPolicy = {
ClaimsSchema = [
{
ID = "employeeid"
JwtClaimType = "name"
SamlClaimType = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"
Source = "user"
},
{
ID = "tenantcountry"
JwtClaimType = "country"
SamlClaimType = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/country"
Source = "company"
}
]
IncludeBasicClaimSet = "true"
Version = 1
}
}
),
]
description = "Policy created with Terraform"
display_name = "My Policy"
}
Expected Behavior
The resource should accept a description attribute
description - (Required) The description for this Claims Mapping Policy.
Actual Behavior
The resource does not accept a description attribute.
Error: Unsupported argument on claims_policies.tf line 50, in resource "azuread_claims_mapping_policy" "my_policy": 50: description = "Policy created with Terraform"
An argument named "description" is not expected here.
Looking at the PR It seems that the description attribute was in the schemas at first but then removed. So either the documentation should be updated, or the description field added to the schema again I suppose.
There's a PR already open to remove the description attribute. I missed it before creating this issue.
https://github.com/hashicorp/terraform-provider-azuread/pull/769
Hi @Flasheh, thanks for reporting. As you noted, this is a documentation bug as we don't support the description property at this time due to an API bug.
However, I'm happy to leave this open to track this and we'll circle back in future to see if this gets unblocked. Thanks!