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

Graph with count and depends_on seems wrong #244

Closed
sarahhodne opened this issue Aug 29, 2014 · 2 comments
Closed

Graph with count and depends_on seems wrong #244

sarahhodne opened this issue Aug 29, 2014 · 2 comments
Labels

Comments

@sarahhodne
Copy link
Contributor

I have a Terraform config that looks something like this:

resource "aws_security_group" "allow_ssh" {
  name = "allow_ssh"
  description = "Allow all inbound traffic on port 22"

  ingress {
    from_port = 22
    to_port = 22
    protocol = "tcp"
    cidr_blocks = ["0.0.0.0/0"]
  }
}

resource "aws_instance" "worker" {
  security_groups = ["allow_ssh"]
  depends_on = ["aws_security_group.allow_ssh"]

  count = 2

  # …snip…
}

The dependency graph for this, however, looks like this:

graph

I'd expect both aws_instance.worker.0 and aws_instance.worker.1 to depend on aws_security_group.allow_ssh.

@mitchellh
Copy link
Contributor

Yeah this looks funny. I'll take a look.

@mitchellh
Copy link
Contributor

Fixed. Good catch.

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

No branches or pull requests

2 participants