Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azuread_group can create multiple groups with the same name #182

Closed
simongottschlag opened this issue Nov 27, 2019 · 4 comments · Fixed by #279
Closed

azuread_group can create multiple groups with the same name #182

simongottschlag opened this issue Nov 27, 2019 · 4 comments · Fixed by #279

Comments

@simongottschlag
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize 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 v0.12.16
+ provider.azuread v0.7.0
+ provider.azurerm v1.37.0

Affected Resource(s)

  • azuread_group

Terraform Configuration Files

resource "azuread_group" "aadGroupOwner" {
    name        = "aad-sec-u-dev-test-owner"
}

Expected Behavior

Create a group if another one with the same name does not exists.

Actual Behavior

Creates a group even if there's another one with the exact same name but different ID.

Steps to Reproduce

Create the group in two different states.

Important Factoids

When using Azure Portal, it's not possible to create a group if there's already an existing one.

@katbyte katbyte added this to the v0.9.0 milestone Mar 11, 2020
@katbyte
Copy link
Collaborator

katbyte commented Mar 11, 2020

Hi @simongottschlag ,

Unfortunately the API works on GUID IDs. For now you can import the group via the app ID. In the future we could add a flag check_name_availiblity/prevent_duplicate_names which checks if the name is in use during creation and fails if it is.

@simongottschlag
Copy link
Author

@katbyte thank you for the clarification! Not a big issue, as long as we don't loose our state. Looking forward to the new release!

@ghost
Copy link

ghost commented Jul 9, 2020

This has been released in version 0.11.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azuread" {
    version = "~> 0.11.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Jul 23, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Jul 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants