Как вы можете видеть ниже, я применяю один и тот же код (без каких-либо изменений) дважды.Первый раз он удаляет таблицы маршрутов.Второй раз он их воссоздает.
Такое поведение сводит меня с ума.Каждый раз, когда у меня происходят изменения в сети, мне нужно дважды запускать terraform, чтобы присутствовали мои таблицы маршрутов.
Любой свет в этом номере приветствуется.
$ terraform apply
aws_vpc.vpc: Refreshing state... (ID: [REDACTED])
aws_route_table.public_route: Refreshing state... (ID: [REDACTED])
aws_route.peer_private_1: Refreshing state... (ID: [REDACTED])
aws_route.billing_private_1: Refreshing state... (ID: [REDACTED])
aws_route.billing_public_1: Refreshing state... (ID: [REDACTED])
aws_route_table_association.route_table_pub_1: Refreshing state... (ID: [REDACTED])
aws_route.rt_public_1b: Refreshing state... (ID: [REDACTED])
aws_route.local_public_1: Refreshing state... (ID: [REDACTED])
aws_route.rt_public_1a: Refreshing state... (ID: [REDACTED])
aws_route_table.private_route_1: Refreshing state... (ID: [REDACTED])
aws_route_table_association.route_table_priv_1: Refreshing state... (ID: [REDACTED])
aws_route.rt_private_1a: Refreshing state... (ID: [REDACTED])
aws_route.local_private_1: Refreshing state... (ID: [REDACTED])
aws_route.rt_private_1b: Refreshing state... (ID: [REDACTED])
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
~ module.vpc_network.aws_route_table.private_route_1
route.#: "4" => "1"
route.1.cidr_block: "" => "[REDACTED]"
route.1.egress_only_gateway_id: "" => ""
route.1.gateway_id: "" => "[REDACTED]"
route.1.instance_id: "" => ""
route.1.ipv6_cidr_block: "" => ""
route.1.nat_gateway_id: "" => ""
route.1.network_interface_id: "" => ""
route.1.vpc_peering_connection_id: "" => ""
route.2.cidr_block: "[REDACTED]" => ""
route.2.egress_only_gateway_id: "" => ""
route.2.gateway_id: "" => ""
route.2.instance_id: "" => ""
route.2.ipv6_cidr_block: "" => ""
route.2.nat_gateway_id: "[REDACTED]" => ""
route.2.network_interface_id: "" => ""
route.2.vpc_peering_connection_id: "" => ""
route.3.cidr_block: "[REDACTED]" => ""
route.3.egress_only_gateway_id: "" => ""
route.3.gateway_id: "" => ""
route.3.instance_id: "" => ""
route.3.ipv6_cidr_block: "" => ""
route.3.nat_gateway_id: "" => ""
route.3.network_interface_id: "" => ""
route.3.vpc_peering_connection_id: "[REDACTED]" => ""
route.4.cidr_block: "[REDACTED]" => ""
route.4.egress_only_gateway_id: "" => ""
route.4.gateway_id: "" => ""
route.4.instance_id: "" => ""
route.4.ipv6_cidr_block: "" => ""
route.4.nat_gateway_id: "" => ""
route.4.network_interface_id: "" => ""
route.4.vpc_peering_connection_id: "[REDACTED]" => ""
route.5.cidr_block: "[REDACTED]" => ""
route.5.egress_only_gateway_id: "" => ""
route.5.gateway_id: "" => ""
route.5.instance_id: "" => ""
route.5.ipv6_cidr_block: "" => ""
route.5.nat_gateway_id: "" => ""
route.5.network_interface_id: "" => ""
route.5.vpc_peering_connection_id: "[REDACTED]" => ""
~ module.vpc_network.aws_route_table.public_route
route.#: "4" => "1"
route.3.cidr_block: "[REDACTED]" => ""
route.3.egress_only_gateway_id: "" => ""
route.3.gateway_id: "" => ""
route.3.instance_id: "" => ""
route.3.ipv6_cidr_block: "" => ""
route.3.nat_gateway_id: "" => ""
route.3.network_interface_id: "" => ""
route.3.vpc_peering_connection_id: "[REDACTED]" => ""
route.6.cidr_block: "[REDACTED]" => "[REDACTED]"
route.6.egress_only_gateway_id: "" => ""
route.6.gateway_id: "[REDACTED]" => "[REDACTED]"
route.6.instance_id: "" => ""
route.6.ipv6_cidr_block: "" => ""
route.6.nat_gateway_id: "" => ""
route.6.network_interface_id: "" => ""
route.6.vpc_peering_connection_id: "" => ""
route.4.cidr_block: "[REDACTED]" => ""
route.4.egress_only_gateway_id: "" => ""
route.4.gateway_id: "" => ""
route.4.instance_id: "" => ""
route.4.ipv6_cidr_block: "" => ""
route.4.nat_gateway_id: "" => ""
route.4.network_interface_id: "" => ""
route.4.vpc_peering_connection_id: "[REDACTED]" => ""
route.5.cidr_block: "[REDACTED]" => ""
route.5.egress_only_gateway_id: "" => ""
route.5.gateway_id: "" => ""
route.5.instance_id: "" => ""
route.5.ipv6_cidr_block: "" => ""
route.5.nat_gateway_id: "" => ""
route.5.network_interface_id: "" => ""
route.5.vpc_peering_connection_id: "[REDACTED]" => ""
Plan: 0 to add, 2 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
module.vpc_network.aws_route_table.private_route_1: Modifying... (ID: [REDACTED])
route.#: "4" => "1"
route.1.cidr_block: "" => "[REDACTED]"
route.1.egress_only_gateway_id: "" => ""
route.1.gateway_id: "" => "[REDACTED]"
route.1.instance_id: "" => ""
route.1.ipv6_cidr_block: "" => ""
route.1.nat_gateway_id: "" => ""
route.1.network_interface_id: "" => ""
route.1.vpc_peering_connection_id: "" => ""
route.2.cidr_block: "[REDACTED]" => ""
route.2.egress_only_gateway_id: "" => ""
route.2.gateway_id: "" => ""
route.2.instance_id: "" => ""
route.2.ipv6_cidr_block: "" => ""
route.2.nat_gateway_id: "[REDACTED]" => ""
route.2.network_interface_id: "" => ""
route.2.vpc_peering_connection_id: "" => ""
route.3.cidr_block: "[REDACTED]" => ""
route.3.egress_only_gateway_id: "" => ""
route.3.gateway_id: "" => ""
route.3.instance_id: "" => ""
route.3.ipv6_cidr_block: "" => ""
route.3.nat_gateway_id: "" => ""
route.3.network_interface_id: "" => ""
route.3.vpc_peering_connection_id: "[REDACTED]" => ""
route.4.cidr_block: "[REDACTED]" => ""
route.4.egress_only_gateway_id: "" => ""
route.4.gateway_id: "" => ""
route.4.instance_id: "" => ""
route.4.ipv6_cidr_block: "" => ""
route.4.nat_gateway_id: "" => ""
route.4.network_interface_id: "" => ""
route.4.vpc_peering_connection_id: "[REDACTED]" => ""
route.5.cidr_block: "[REDACTED]" => ""
route.5.egress_only_gateway_id: "" => ""
route.5.gateway_id: "" => ""
route.5.instance_id: "" => ""
route.5.ipv6_cidr_block: "" => ""
route.5.nat_gateway_id: "" => ""
route.5.network_interface_id: "" => ""
route.5.vpc_peering_connection_id: "[REDACTED]" => ""
module.vpc_network.aws_route_table.private_route_2: Modifying... (ID: [REDACTED])
route.#: "4" => "1"
route.1.cidr_block: "" => "[REDACTED]"
route.1.egress_only_gateway_id: "" => ""
route.1.gateway_id: "" => "[REDACTED]"
route.1.instance_id: "" => ""
route.1.ipv6_cidr_block: "" => ""
route.1.nat_gateway_id: "" => ""
route.1.network_interface_id: "" => ""
route.1.vpc_peering_connection_id: "" => ""
route.2.cidr_block: "[REDACTED]" => ""
route.2.egress_only_gateway_id: "" => ""
route.2.gateway_id: "" => ""
route.2.instance_id: "" => ""
route.2.ipv6_cidr_block: "" => ""
route.2.nat_gateway_id: "[REDACTED]" => ""
route.2.network_interface_id: "" => ""
route.2.vpc_peering_connection_id: "" => ""
route.3.cidr_block: "[REDACTED]" => ""
route.3.egress_only_gateway_id: "" => ""
route.3.gateway_id: "" => ""
route.3.instance_id: "" => ""
route.3.ipv6_cidr_block: "" => ""
route.3.nat_gateway_id: "" => ""
route.3.network_interface_id: "" => ""
route.3.vpc_peering_connection_id: "[REDACTED]" => ""
route.4.cidr_block: "[REDACTED]" => ""
route.4.egress_only_gateway_id: "" => ""
route.4.gateway_id: "" => ""
route.4.instance_id: "" => ""
route.4.ipv6_cidr_block: "" => ""
route.4.nat_gateway_id: "" => ""
route.4.network_interface_id: "" => ""
route.4.vpc_peering_connection_id: "[REDACTED]" => ""
route.5.cidr_block: "[REDACTED]" => ""
route.5.egress_only_gateway_id: "" => ""
route.5.gateway_id: "" => ""
route.5.instance_id: "" => ""
route.5.ipv6_cidr_block: "" => ""
route.5.nat_gateway_id: "" => ""
route.5.network_interface_id: "" => ""
route.5.vpc_peering_connection_id: "[REDACTED]" => ""
module.vpc_network.aws_route_table.public_route: Modifying... (ID: [REDACTED])
route.#: "4" => "1"
route.3.cidr_block: "[REDACTED]" => ""
route.3.egress_only_gateway_id: "" => ""
route.3.gateway_id: "" => ""
route.3.instance_id: "" => ""
route.3.ipv6_cidr_block: "" => ""
route.3.nat_gateway_id: "" => ""
route.3.network_interface_id: "" => ""
route.3.vpc_peering_connection_id: "[REDACTED]" => ""
route.6.cidr_block: "[REDACTED]" => "[REDACTED]"
route.6.egress_only_gateway_id: "" => ""
route.6.gateway_id: "[REDACTED]" => "[REDACTED]"
route.6.instance_id: "" => ""
route.6.ipv6_cidr_block: "" => ""
route.6.nat_gateway_id: "" => ""
route.6.network_interface_id: "" => ""
route.6.vpc_peering_connection_id: "" => ""
route.4.cidr_block: "[REDACTED]" => ""
route.4.egress_only_gateway_id: "" => ""
route.4.gateway_id: "" => ""
route.4.instance_id: "" => ""
route.4.ipv6_cidr_block: "" => ""
route.4.nat_gateway_id: "" => ""
route.4.network_interface_id: "" => ""
route.4.vpc_peering_connection_id: "[REDACTED]" => ""
route.5.cidr_block: "[REDACTED]" => ""
route.5.egress_only_gateway_id: "" => ""
route.5.gateway_id: "" => ""
route.5.instance_id: "" => ""
route.5.ipv6_cidr_block: "" => ""
route.5.nat_gateway_id: "" => ""
route.5.network_interface_id: "" => ""
route.5.vpc_peering_connection_id: "[REDACTED]" => ""
module.vpc_network.aws_route_table.public_route: Modifications complete after 1s (ID: [REDACTED])
module.vpc_network.aws_route_table.private_route_1: Modifications complete after 1s (ID: [REDACTED])
module.vpc_network.aws_route_table.private_route_2: Modifications complete after 1s (ID: [REDACTED])
Apply complete! Resources: 0 added, 5 changed, 0 destroyed.
$ terraform apply
aws_route_table.public_route: Refreshing state... (ID: [REDACTED])
aws_route.peer_private_1: Refreshing state... (ID: [REDACTED])
aws_vpc_peering_connection_accepter.peer: Refreshing state... (ID: [REDACTED])
aws_route.peer_public_1: Refreshing state... (ID: [REDACTED])
aws_route.billing_private_1: Refreshing state... (ID: [REDACTED])
aws_route.billing_public_1: Refreshing state... (ID: [REDACTED])
aws_route_table_association.route_table_pub_1: Refreshing state... (ID: [REDACTED])
aws_route.rt_public_1a: Refreshing state... (ID: [REDACTED])
aws_route.rt_public_1b: Refreshing state... (ID: [REDACTED])
aws_route.local_public_1: Refreshing state... (ID: [REDACTED])
aws_route_table.private_route_1: Refreshing state... (ID: [REDACTED])
aws_route_table_association.route_table_priv_1: Refreshing state... (ID: [REDACTED])
aws_route.local_private_1: Refreshing state... (ID: [REDACTED])
aws_route.rt_private_1a: Refreshing state... (ID: [REDACTED])
aws_route.rt_private_1b: Refreshing state... (ID: [REDACTED])
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
~ update in-place
Terraform will perform the following actions:
~ module.vpc_network.aws_route_table.private_route_1
route.1.cidr_block: "" => "[REDACTED]"
route.1.egress_only_gateway_id: "" => ""
route.1.gateway_id: "" => "[REDACTED]"
route.1.instance_id: "" => ""
route.1.ipv6_cidr_block: "" => ""
route.1.nat_gateway_id: "" => ""
route.1.network_interface_id: "" => ""
route.1.vpc_peering_connection_id: "" => ""
route.2.cidr_block: "[REDACTED]" => ""
route.2.egress_only_gateway_id: "" => ""
route.2.gateway_id: "" => ""
route.2.instance_id: "" => ""
route.2.ipv6_cidr_block: "" => ""
route.2.nat_gateway_id: "[REDACTED]" => ""
route.2.network_interface_id: "" => ""
route.2.vpc_peering_connection_id: "" => ""
+ module.vpc_peering.aws_route.local_private_1
id: <computed>
destination_cidr_block: "[REDACTED]"
destination_prefix_list_id: <computed>
egress_only_gateway_id: <computed>
gateway_id: <computed>
instance_id: <computed>
instance_owner_id: <computed>
nat_gateway_id: <computed>
network_interface_id: <computed>
origin: <computed>
route_table_id: "[REDACTED]"
state: <computed>
vpc_peering_connection_id: "[REDACTED]"
+ module.vpc_peering.aws_route.local_public_1
id: <computed>
destination_cidr_block: "[REDACTED]"
destination_prefix_list_id: <computed>
egress_only_gateway_id: <computed>
gateway_id: <computed>
instance_id: <computed>
instance_owner_id: <computed>
nat_gateway_id: <computed>
network_interface_id: <computed>
origin: <computed>
route_table_id: "[REDACTED]"
state: <computed>
vpc_peering_connection_id: "[REDACTED]"
+ module.vpc_peering_billing.aws_route.rt_private_1a
id: <computed>
destination_cidr_block: "[REDACTED]"
destination_prefix_list_id: <computed>
egress_only_gateway_id: <computed>
gateway_id: <computed>
instance_id: <computed>
instance_owner_id: <computed>
nat_gateway_id: <computed>
network_interface_id: <computed>
origin: <computed>
route_table_id: "[REDACTED]"
state: <computed>
vpc_peering_connection_id: "[REDACTED]"
+ module.vpc_peering_billing.aws_route.rt_private_1b
id: <computed>
destination_cidr_block: "[REDACTED]"
destination_prefix_list_id: <computed>
egress_only_gateway_id: <computed>
gateway_id: <computed>
instance_id: <computed>
instance_owner_id: <computed>
nat_gateway_id: <computed>
network_interface_id: <computed>
origin: <computed>
route_table_id: "[REDACTED]"
state: <computed>
vpc_peering_connection_id: "[REDACTED]"
+ module.vpc_peering_billing.aws_route.rt_public_1a
id: <computed>
destination_cidr_block: "[REDACTED]"
destination_prefix_list_id: <computed>
egress_only_gateway_id: <computed>
gateway_id: <computed>
instance_id: <computed>
instance_owner_id: <computed>
nat_gateway_id: <computed>
network_interface_id: <computed>
origin: <computed>
route_table_id: "[REDACTED]"
state: <computed>
vpc_peering_connection_id: "[REDACTED]"
+ module.vpc_peering_billing.aws_route.rt_public_1b
id: <computed>
destination_cidr_block: "[REDACTED]"
destination_prefix_list_id: <computed>
egress_only_gateway_id: <computed>
gateway_id: <computed>
instance_id: <computed>
instance_owner_id: <computed>
nat_gateway_id: <computed>
network_interface_id: <computed>
origin: <computed>
route_table_id: "[REDACTED]"
state: <computed>
vpc_peering_connection_id: "[REDACTED]"
Plan: 4 to add, 1 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value:
module.vpc_peering_billing.aws_route.rt_public_1a: Creating...
destination_cidr_block: "" => "[REDACTED]"
destination_prefix_list_id: "" => "<computed>"
egress_only_gateway_id: "" => "<computed>"
gateway_id: "" => "<computed>"
instance_id: "" => "<computed>"
instance_owner_id: "" => "<computed>"
nat_gateway_id: "" => "<computed>"
network_interface_id: "" => "<computed>"
origin: "" => "<computed>"
route_table_id: "" => "[REDACTED]"
state: "" => "<computed>"
vpc_peering_connection_id: "" => "[REDACTED]"
module.vpc_peering_billing.aws_route.rt_public_1b: Creating...
destination_cidr_block: "" => "[REDACTED]"
destination_prefix_list_id: "" => "<computed>"
egress_only_gateway_id: "" => "<computed>"
gateway_id: "" => "<computed>"
instance_id: "" => "<computed>"
instance_owner_id: "" => "<computed>"
nat_gateway_id: "" => "<computed>"
network_interface_id: "" => "<computed>"
origin: "" => "<computed>"
route_table_id: "" => "[REDACTED]"
state: "" => "<computed>"
vpc_peering_connection_id: "" => "[REDACTED]"
module.vpc_network.aws_route_table.private_route_1: Modifying... (ID: [REDACTED])
route.1.cidr_block: "" => "[REDACTED]"
route.1.egress_only_gateway_id: "" => ""
route.1.gateway_id: "" => "[REDACTED]"
route.1.instance_id: "" => ""
route.1.ipv6_cidr_block: "" => ""
route.1.nat_gateway_id: "" => ""
route.1.network_interface_id: "" => ""
route.1.vpc_peering_connection_id: "" => ""
route.2.cidr_block: "[REDACTED]" => ""
route.2.egress_only_gateway_id: "" => ""
route.2.gateway_id: "" => ""
route.2.instance_id: "" => ""
route.2.ipv6_cidr_block: "" => ""
route.2.nat_gateway_id: "[REDACTED]" => ""
route.2.network_interface_id: "" => ""
route.2.vpc_peering_connection_id: "" => ""
module.vpc_peering.aws_route.local_public_1: Creating...
destination_cidr_block: "" => "[REDACTED]"
destination_prefix_list_id: "" => "<computed>"
egress_only_gateway_id: "" => "<computed>"
gateway_id: "" => "<computed>"
instance_id: "" => "<computed>"
instance_owner_id: "" => "<computed>"
nat_gateway_id: "" => "<computed>"
network_interface_id: "" => "<computed>"
origin: "" => "<computed>"
route_table_id: "" => "[REDACTED]"
state: "" => "<computed>"
vpc_peering_connection_id: "" => "[REDACTED]"
module.vpc_peering_billing.aws_route.rt_public_1b: Creation complete after 0s (ID: [REDACTED])
module.vpc_peering.aws_route.local_public_1: Creation complete after 0s (ID: [REDACTED])
module.vpc_peering_billing.aws_route.rt_public_1a: Creation complete after 0s (ID: [REDACTED])
module.vpc_network.aws_route_table.private_route_1: Modifications complete after 0s (ID: [REDACTED])
module.vpc_peering_billing.aws_route.rt_private_1b: Creating...
destination_cidr_block: "" => "[REDACTED]"
destination_prefix_list_id: "" => "<computed>"
egress_only_gateway_id: "" => "<computed>"
gateway_id: "" => "<computed>"
instance_id: "" => "<computed>"
instance_owner_id: "" => "<computed>"
nat_gateway_id: "" => "<computed>"
network_interface_id: "" => "<computed>"
origin: "" => "<computed>"
route_table_id: "" => "[REDACTED]"
state: "" => "<computed>"
vpc_peering_connection_id: "" => "[REDACTED]"
module.vpc_peering_billing.aws_route.rt_private_1a: Creating...
destination_cidr_block: "" => "[REDACTED]"
destination_prefix_list_id: "" => "<computed>"
egress_only_gateway_id: "" => "<computed>"
gateway_id: "" => "<computed>"
instance_id: "" => "<computed>"
instance_owner_id: "" => "<computed>"
nat_gateway_id: "" => "<computed>"
network_interface_id: "" => "<computed>"
origin: "" => "<computed>"
route_table_id: "" => "[REDACTED]"
state: "" => "<computed>"
vpc_peering_connection_id: "" => "[REDACTED]"
module.vpc_peering.aws_route.local_private_1: Creating...
destination_cidr_block: "" => "[REDACTED]"
destination_prefix_list_id: "" => "<computed>"
egress_only_gateway_id: "" => "<computed>"
gateway_id: "" => "<computed>"
instance_id: "" => "<computed>"
instance_owner_id: "" => "<computed>"
nat_gateway_id: "" => "<computed>"
network_interface_id: "" => "<computed>"
origin: "" => "<computed>"
route_table_id: "" => "[REDACTED]"
state: "" => "<computed>"
vpc_peering_connection_id: "" => "[REDACTED]"
module.vpc_peering.aws_route.local_private_1: Creation complete after 0s (ID: [REDACTED])
module.vpc_peering_billing.aws_route.rt_private_1b: Creation complete after 0s (ID: [REDACTED])
module.vpc_peering_billing.aws_route.rt_private_1a: Creation complete after 0s (ID: [REDACTED])
Apply complete! Resources: 4 added, 1 changed, 0 destroyed.