terraform-provider-azuread icon indicating copy to clipboard operation
terraform-provider-azuread copied to clipboard

Terrafrom shows change after resource creation for visibility parameter in azuread_group

Open MayuriD89 opened this issue 3 years ago • 1 comments

Terraform (and AzureAD Provider) Version

  • Terraform v1.0.0
  • Azuread Plugin Version v2.20.0

Affected Resource

  • azuread_group

Expected Behavior

  • azuread_group resource should not show any change once created.

Actual behavior

  • azuread_group gets created successfully after first apply command but when 2nd terraform apply is executed it shows a change for visibility parameter and that is for 'Hiddenmembership' value.

  • visibility parameter have valid values 'public', 'private' and 'Hiddenmembership' when 1st terraform command is executed, on Azure CLI (as this parameter is not directly visible on Azure portal) we can see 'Hiddenmembership' value gets applied with capital 'M' i.e HiddenMembership.

  • Please refer following Screenshot of Azure CLI -

image

  • We can see Hiddenmembership is applied as a HiddenMembership, therefore terraform shows a change for 2nd apply command -

image

  • We tried to apply Hiddenmembership with 'M' i.e. HiddenMembership but terraform throws an error for it, saying that it's not a valid value.

  • It seems like terraform documentation does not provide a correct value for visibility parameter in it's valid value and hence it should be updated with correct valid value for visibilty parameter, which is HiddenMembership, so that terraform will not show any changes.

Steps to Reproduce

  • terraform apply

MayuriD89 avatar Aug 05 '22 12:08 MayuriD89

Hi @MayuriD89, thanks for reporting this casing issue. We'll look into this and issue a fix as necessary.

manicminer avatar Sep 01 '22 14:09 manicminer