From ddc3c4655fb1de37f247d490b1b89989bd178fd5 Mon Sep 17 00:00:00 2001 From: Andrea Gandolfi Date: Tue, 1 Mar 2022 07:14:33 +0000 Subject: [PATCH] Add note to net-vpn-ha module's README file on how to handle cycle errors when using for_each --- modules/net-vpn-ha/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/net-vpn-ha/README.md b/modules/net-vpn-ha/README.md index 84bf7ab00..bbc721b63 100644 --- a/modules/net-vpn-ha/README.md +++ b/modules/net-vpn-ha/README.md @@ -90,6 +90,8 @@ module "vpn_ha-2" { # tftest modules=2 resources=18 ``` +Note: When using the `for_each` Meta-Argument you might experience a Cycle Error due to the multiple `net-vpn-ha` modules referencing each others. To fix this you can create the [google_compute_ha_vpn_gateway](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_ha_vpn_gateway) resources separately and reference them in the `net-vpn-ha` module via the `vpn_gateway` and `peer_gcp_gateway` variables. + ### GCP to on-prem ```hcl