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_application using prevent_duplicate_names does not ignore provisioned app #310

Closed
nerddtvg opened this issue Aug 25, 2020 · 7 comments · Fixed by #338
Closed

azuread_application using prevent_duplicate_names does not ignore provisioned app #310

nerddtvg opened this issue Aug 25, 2020 · 7 comments · Fixed by #338

Comments

@nerddtvg
Copy link

https://github.com/terraform-providers/terraform-provider-azuread/blob/d2dfb01976da48d3ff14e92b6858c182da6c2536/azuread/helpers/graph/application.go#L288-L290

When utilizing prevent_duplicate_names, the provisioning process will error out after the app has been created and during the application of other values. The check should ignore the provisioned application that it is updating.

@manicminer
Copy link
Contributor

@nerddtvg Thanks for reporting this bug, we'll look at remediating as soon as we are able.

@Peter-Sternberger
Copy link

Hit the same problem, would appreciate the prevent_duplicate_names check

@tareks
Copy link

tareks commented Nov 4, 2020

Impacted by this as well. Seems to only happen with azuread_application but not azuread_group. If a new resource is created with prevent_duplicate_names = true it will fail with the following error:

Error: existing Application with name "<redacted>" (AppID: "redacted") was found and `prevent_duplicate_names` was specified

@ghost
Copy link

ghost commented Nov 25, 2020

This has been released in version 1.1.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 = "~> 1.1.0"
}
# ... other configuration ...

@nerddtvg
Copy link
Author

Thank you so much!

@scott-doyland-burrows
Copy link

Hi,
The problem still seems to exist with provider 1.1.0.
I try to create an app registration which does NOT yet exist using:
prevent_duplicate_names = true

and still get the error. The application ID in the error IS the application ID of the app registration that terraform has partially managed to create before it has the error.

Error: existing Application with name "burrows-appreg-scott-cadabraui" (AppID: "a79564a0-72cb-4b2d-855e-83079eb05929") was found and `prevent_duplicate_names` was specified

  on cadabraui.tf line 1, in resource "azuread_application" "cadabraui":
   1: resource "azuread_application" "cadabraui" {


terraform version
Terraform v0.13.5
+ provider registry.terraform.io/hashicorp/azuread v1.1.0
+ provider registry.terraform.io/hashicorp/azurerm v2.37.0

@ghost
Copy link

ghost commented Dec 5, 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 as resolved and limited conversation to collaborators Dec 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants