Reputation: 153
In Terraform it is possible to output values from self created resources.
Now I want to output values from resources that are fetched via data block.
I could not find any information on that.
Is it possible? If yes, how?
Upvotes: 2
Views: 3959
Reputation: 45223
Same way. For example, I defined the data source aws_vpc
data "aws_vpc" "vpc" {
tags {
Name = "development"
}
}
You can use it in output as below
output "vpic_id" {
value = "${data.aws_vpc.vpc.id}"
}
Upvotes: 5