Currently when running complete:overrides:apply and complete:peer-vpc:apply an error is often reported due to a lack of dependency between the vpg being attached and the route table creation since they are referenced in separate modules. The VPG id can exist before it is attached allowing the route table to create but will error out due propagating_vgws = ["${compact(var.vgw_ids)}"] being present but not attached.
To address this issue there is a workaround that is mentioned here by brikis98 I applied this fix/workaround and verified that the issue is no longer seen. Previously this was addressed by simply running the apply twice so that the next time around it will succeed.
Since the fix is more of a workaround I have pushed a branch for reference but will address the recent failures when applying complete:peer-vpc:apply by also running it twice since this will avoid the drift that would be seen on deployments if the null resource fix is used.
Currently when running
complete:overrides:apply
andcomplete:peer-vpc:apply
an error is often reported due to a lack of dependency between the vpg being attached and the route table creation since they are referenced in separate modules. The VPG id can exist before it is attached allowing the route table to create but will error out duepropagating_vgws = ["${compact(var.vgw_ids)}"]
being present but not attached.To address this issue there is a workaround that is mentioned here by brikis98 I applied this fix/workaround and verified that the issue is no longer seen. Previously this was addressed by simply running the apply twice so that the next time around it will succeed.
Since the fix is more of a workaround I have pushed a branch for reference but will address the recent failures when applying
complete:peer-vpc:apply
by also running it twice since this will avoid the drift that would be seen on deployments if the null resource fix is used.A refactor that leverages the aws_vpn_gateway_route_propagation resource instead of the route_table:propagating_vgws may also be a means of ensuring that the az module can create its resources without the vgws presence.