mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 01:41:48 -06:00
14 lines
226 B
HCL
14 lines
226 B
HCL
variable "instance_count" {}
|
|
|
|
resource "aws_instance" "one" {
|
|
count = var.instance_count
|
|
}
|
|
|
|
locals {
|
|
one_id = element(concat(aws_instance.one.*.id, list("")), 0)
|
|
}
|
|
|
|
resource "aws_instance" "two" {
|
|
value = local.one_id
|
|
}
|