hashicorp / terraform-provider-azuread

Terraform provider for Azure Active Directory
https://registry.terraform.io/providers/hashicorp/azuread/latest/docs
Mozilla Public License 2.0
426 stars 294 forks source link

Prevent Duplicate Group Names by Default #915

Open glasko-dp opened 1 year ago

glasko-dp commented 1 year ago

Community Note

Description

prevent_duplicate_names = false does not seem to be the sane choice for default here; as overlooking this property and omitting it can result in many duplicate resources being unintentionally created, whereas if the default were true, unintentionally missing it would prompt the user to make a deliberate choice to create the duplicate resources.

New or Affected Resource(s)

Potential Terraform Configuration

resource "azuread_group" "testGroup" {
  display_name       = "testGroup"
  security_enabled   = true
  assignable_to_role = true
}

References

manicminer commented 1 year ago

Hi @glasko-dp, thanks for suggesting this. Changing the default here potentially makes a lot of sense, although as this would e a breaking change to the provider, we'd only be able to do this in the next major version (which currently will be v3.0).

I've assigned this to the v3.0 milestone for consideration when we get closer to that version.