Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. data "aws_vpc" "common" {
  2. filter {
  3. name = "tag:Name"
  4. values = ["common"]
  5. }
  6. }
  7.  
  8. data "aws_subnet" "common" {
  9. count = "${var.availability_zone_count}"
  10. vpc_id = "${data.aws_vpc.common.id}"
  11. availability_zone = "${element(module.region_variables.availability_zones, count.index)}"
  12. }
  13.  
  14. resource "aws_autoscaling_group" "main" {
  15. ...
  16. availability_zones = ["${data.aws_subnet.common.*.availability_zone}"]
  17. vpc_zone_identifier = ["${data.aws_subnet.common.*.id}"]
  18. ...
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement