From 50919044d5ed4264ed975c2ea443240b9e757e29 Mon Sep 17 00:00:00 2001 From: Adam Christie Date: Wed, 1 Jun 2022 12:41:15 +0100 Subject: [PATCH] Fix custom conditions example Original code block erroneously references `aws_vpc.example` but appears to actually mean `data.aws_vpc.example`. --- website/docs/language/expressions/custom-conditions.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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." } }