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

Dependencies in configuration blocks are not shown #104

Open
teru01 opened this issue May 24, 2022 · 1 comment
Open

Dependencies in configuration blocks are not shown #104

teru01 opened this issue May 24, 2022 · 1 comment

Comments

@teru01
Copy link

teru01 commented May 24, 2022

When referencing other resources in the configuration block of a resource block, dependencies on those resources are not displayed.

Example: define aws_ecs_service as follows

resource "aws_ecs_service" "example" {
  name                              = "ecs-sample-service"
  cluster                           = aws_ecs_cluster.example.arn
  task_definition                   = aws_ecs_task_definition.example.arn
  desired_count                     = 1
  launch_type                       = "FARGATE"
  platform_version                  = "1.4.0"
  health_check_grace_period_seconds = 60
  enable_execute_command            = true

  network_configuration {
    assign_public_ip = false
    security_groups  = [module.ecs_app_sg.security_group_id]

    subnets = [
      aws_subnet.private_0.id,
      aws_subnet.private_1.id,
    ]
  }

  load_balancer {
    target_group_arn = aws_lb_target_group.example.arn
    container_name   = "ecs-sample-app"
    container_port   = 80
  }
}

Visualizing this definition would look like this

image

There should be dependencies on the security group in the network_configuration block and the target_group in the load_balancer block, but they are not shown. On the other hand, dependencies on cluster and task_definition, which are written directly under the resource block, are shown.

Another example: define aws_lb_listener_rule as follows

resource "aws_lb_listener_rule" "example" {
  listener_arn = aws_lb_listener.http.arn
  priority     = 100

  action {
    type             = "forward"
    target_group_arn = aws_lb_target_group.example.arn
  }
}

Similar to the above example, the visualization of this definition does not show the dependency on target_group in the action block

image

Thank you.

@crispinboylan-int
Copy link

I see this also with depends_on block, does not render any explicit dependencies declared in that block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants