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

Group membership always shows as needing to be modified if there are > 100 users #6722

Closed
miquella opened this issue May 17, 2016 · 1 comment · Fixed by #6726
Closed

Group membership always shows as needing to be modified if there are > 100 users #6722

miquella opened this issue May 17, 2016 · 1 comment · Fixed by #6726

Comments

@miquella
Copy link
Contributor

miquella commented May 17, 2016

Terraform Version

terraform -v
Terraform v0.6.15

Affected Resource(s)

  • aws_iam_group_membership

Terraform Configuration Files

provider "aws" {
    region = "us-east-1"
}

resource "aws_iam_group" "Users" {
    name = "Users"
}

resource "aws_iam_group_membership" "Users" {
    name = "Users"
    group = "${aws_iam_group.Users.name}"
    users = [
        "${aws_iam_user.user1.name}",
        "${aws_iam_user.user2.name}",
        "${aws_iam_user.user3.name}",
        # ...
        "${aws_iam_user.user151.name}",
    ]
}

Expected Behavior

terraform plan should show:

# …

No changes. Infrastructure is up-to-date. This means that Terraform
could not detect any differences between your configuration and
the real physical resources that exist. As a result, Terraform
doesn't need to do anything.

Actual Behavior

terraform plan shows:

# …

~ aws_iam_group_membership.Users
    users.#:          "100" => "151"
    users.1071630348: "user1" => "user1"
    users.1075486292: "" => "user2"
    # …

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Create an aws_iam_group_membership resource with 101+ users
  2. terraform apply
  3. terraform plan
miquella added a commit to miquella/terraform that referenced this issue May 17, 2016
By default, group membership queries return pages of 100 users at a
time. Because of this, if there are more than 100 users in an
aws_iam_group_membership resource, the resource always reports as
needing to be changed (because it only sees 100 of the users as
existing in the group).

The group membership now queries all pages.

Fixes hashicorp#6722
@ghost
Copy link

ghost commented Apr 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 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.

2 participants