Merge pull request #31171 from fractos/patch-1

Fix custom conditions example
pull/31187/head
Laura Pacilio 4 years ago committed by GitHub
commit 6c7db7186a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save