Enabled the AKL local zone for Sydney region, after re-run a terraform plan, it’s going to recreate the resources in the new subnets and all resources.
Also local zones can only have limit services, no TGW support, no Nat gateway support, it will break the desired network configuration and topology.
Further investigation:
calculate_subnets module are using data resources to fetch from AWS.
so before data.aws_availability_zones.current returns:
Issue Details:
Enabled the AKL local zone for Sydney region, after re-run a terraform plan, it’s going to recreate the resources in the new subnets and all resources.
Also local zones can only have limit services, no TGW support, no Nat gateway support, it will break the desired network configuration and topology.
Further investigation:
calculate_subnets
module are using data resources to fetch from AWS.so before
data.aws_availability_zones.current
returns:but post-enabled local zones: it returns:
the current logics slice the first x (based on the az_count)
so it and destroy and create resources for those azs.
Suggest add
aws-ia/vpc/aws
to allow explicit specify configuration for az for VPCTo prevent the similar issues in the future.