mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-25 08:21:07 -06:00
Fix custom conditions example
Original code block erroneously references `aws_vpc.example` but appears to actually mean `data.aws_vpc.example`.
This commit is contained in:
parent
70ddcc7d0d
commit
50919044d5
@ -312,12 +312,12 @@ data "aws_vpc" "example" {
|
||||
}
|
||||
|
||||
resource "aws_internet_gateway" "example" {
|
||||
for_each = aws_vpc.example
|
||||
for_each = data.aws_vpc.example
|
||||
vpc_id = each.value.id
|
||||
|
||||
lifecycle {
|
||||
precondition {
|
||||
condition = aws_vpc.example[each.key].state == "available"
|
||||
condition = data.aws_vpc.example[each.key].state == "available"
|
||||
error_message = "VPC ${each.key} must be available."
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user