Created
March 12, 2017 22:45
-
-
Save artburkart/d5dd81302179493b2ab2c23fbfcb84b8 to your computer and use it in GitHub Desktop.
Test case for aws_route_table data source
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws" { | |
region = "us-east-1" | |
} | |
data "aws_route_table" "art" { | |
subnet_id = "subnet-########" | |
} | |
data "template_file" "art" { | |
template = "$${rtb_route}" | |
vars { | |
rtb_route = "${data.aws_route_table.art.routes.0.cidr_block}" | |
} | |
} | |
resource "null_resource" "art" { | |
triggers { | |
template = "${data.template_file.art.rendered}" | |
} | |
provisioner "local-exec" { | |
command = "echo \"${data.template_file.art.rendered}\" > art.txt" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment