Merge pull request #31171 from fractos/patch-1

Fix custom conditions example
This commit is contained in:
Laura Pacilio 2022-06-02 10:59:53 -04:00 committed by GitHub
commit 6c7db7186a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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."
}
}