mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-30 10:47:14 -06:00
860140074f
This allows the config loader to read "data" blocks from the config and turn them into DataSource objects. This just reads the data from the config file. It doesn't validate the data nor do anything useful with it.
23 lines
324 B
HCL
23 lines
324 B
HCL
variable "foo" {
|
|
default = "bar"
|
|
description = "bar"
|
|
}
|
|
|
|
provider "aws" {
|
|
access_key = "foo"
|
|
secret_key = "bar"
|
|
}
|
|
|
|
|
|
data "do" "simple" {
|
|
foo = "baz"
|
|
}
|
|
|
|
resource "aws_instance" "db" {
|
|
security_groups = "${aws_security_group.firewall.*.id}"
|
|
}
|
|
|
|
output "web_ip" {
|
|
value = "${aws_instance.web.private_ip}"
|
|
}
|