diff --git a/website/docs/language/expressions/custom-conditions.mdx b/website/docs/language/expressions/custom-conditions.mdx index c83fb6a8bf..42f08343fc 100644 --- a/website/docs/language/expressions/custom-conditions.mdx +++ b/website/docs/language/expressions/custom-conditions.mdx @@ -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." } }