Guest User

Untitled

a guest
Nov 12th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. # File fancy-app-module/variables.tf
  2.  
  3. variable depends_on { default = [], type = "list"}
  4.  
  5.  
  6. # File my-app.tf
  7.  
  8. module "app" {
  9. source = "modules/fancy-app-module"
  10.  
  11. # Wait for resources and associations to be created
  12. depends_on = [
  13. "${aws_alb_target_group.app.arn}"
  14. ]
  15. }
  16.  
  17. resource "aws_alb_target_group" "app" {
  18. name = "app-group"
  19. }
  20.  
  21. resource "aws_alb_listener" "front_end" {
  22. # Association of default_action takes some time and
  23. # if this action is required by you module, it's creation
  24. # might fail due to async provisioning of the
  25. # resources by terraform
  26. default_action {
  27. target_group_arn = "${aws_alb_target_group.app.id}"
  28. type = "forward"
  29. }
  30. }
Add Comment
Please, Sign In to add comment