Skip to content

Plan output keeps changing randomly #53

@brikis98

Description

@brikis98

Terraform Version

Terraform v0.10.7

Affected Resource(s)

  • github_team_repository

Terraform Configuration Files

The basic structure is a module that defines a team and the repos that team can access:

resource "github_team" "team" {
  name = "${var.team_name}"
}

resource "github_team_repository" "repos" {
  count      = "${length(var.team_repo_names)}"
  team_id    = "${github_team.team.id}"
  repository = "${element(var.team_repo_names, count.index)}"
  permission = "pull"
}

We use this module to manage ~40 teams, each with access to 10 - 50 repos.

Expected Behavior

Since all of the code has already been applied, I expect to see "no changes" when I run terraform plan.

Actual Behavior

Every time I run terraform plan, I get a completely different output. Sometimes it says it wants to create team foo and give it access to a bunch of repos, sometimes team bar, sometimes several teams, sometimes "no changes", etc.

Steps to Reproduce

  1. terraform apply
  2. terraform plan

Important Factoids

My best guess is that Terraform is making one API call for every (team, repo) pair, this results in way too many API calls, getting throttled, and Terraform is hiding the error message.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions