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 ID: does not become available when creating multiple groups simultaneously (intermittent). #72

Closed
TonyLunt opened this issue Apr 8, 2019 · 1 comment · Fixed by #91

Comments

@TonyLunt
Copy link

TonyLunt commented Apr 8, 2019

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

Description

When creating multiple AD Groups simultaneously, there are intermittent errors where the "id" property does not become available on the resource. This is easiest to reproduce when AD Groups are created within a module.

I'm currently working around this by adding dependencies to throttle the AD group creation, but this appears to be an issue unless I'm missing something.

Terraform (and AzureAD Provider) Version

Terraform v0.11.13
provider.azuread v0.2.0

Affected Resource(s)

  • azuread_group

Terraform Configuration Files

##module/main.tf
variable "name" {}

resource "azuread_group" "one" {
  name = "foo-${var.name}1"
}

resource "azuread_group" "two" {
  name = "foo-${var.name}2"
}

resource "null_resource" "echo" {
  provisioner "local-exec" {
    command = "echo ${azuread_group.one.id} ${azuread_group.two.id}",
  }
}
##main.tf
module "bob" {
     source = "module"
     name   = "bob"
}

module "tom" {
    source = "module"
    name   = "tom"
}

module "frank" {
    source = "module"
    name   = "frank"
}

module "larry" {
    source = "module"
    name   = "larry"
}

Debug Output

https://gist.github.com/TonyLunt/9f30ebf4cbdd4c835c4757d9548b48d5

Expected Behavior

Two AD groups created for each instance of the module.

Actual Behavior

Intermittently errors on some AD Groups with an error of:
Resource 'azuread_group.two' does not have attribute 'id' for variable 'azuread_group.two.id'
or
Resource 'azuread_group.one' does not have attribute 'id' for variable 'azuread_group.one.id'.

Errors begin to appear when creating 8+ AD Groups simultaneously.

Steps to Reproduce

  1. Create an empty directory
  2. Place the module code above into /module/main.tf
  3. Place the main.tf code at the root directory
  4. terraform init
  5. terraform apply
@katbyte katbyte changed the title azuread_group ID does not become available when creating multiple groups simultaneously (intermittent). azuread_group ID: does not become available when creating multiple groups simultaneously (intermittent). May 23, 2019
@katbyte katbyte added this to the v0.4.0 milestone May 29, 2019
katbyte added a commit that referenced this issue Jun 4, 2019
@ghost
Copy link

ghost commented Jul 5, 2019

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 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Jul 5, 2019
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.

2 participants