mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-23 23:22:57 -06:00
13 lines
239 B
Terraform
13 lines
239 B
Terraform
|
resource "aws_instance" "foo" {
|
||
|
count = 2
|
||
|
ami = "ami-bcd456"
|
||
|
lifecycle {
|
||
|
ignore_changes = ["ami"]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
resource "aws_eip" "foo" {
|
||
|
count = 2
|
||
|
instance = "${element(aws_instance.foo.*.id, count.index)}"
|
||
|
}
|